Welcome to Geeklog Monday, May 20 2013 @ 04:30 PM EDT
|
||||||||
![]() |
Forum Index > Extensions > Plugins |
New Topic
|
Post Reply
|
Can't figure out how to get the advanced editor to work in a plugin... |
|||
| timatlee |
|
||||||
![]() ![]() ![]() ![]() ![]() Newbie Status: offline ![]() Registered: 06/06/04 Posts: 14 |
So I'm trying to use the advanced editor in a plugin I'm putting together.
Either I'm having a blonde moment, or I just don't get it. I can download a copy of FCKeditor and install it, and it works like a charm. But why have 2 copies of the same software package? It doesn't make a lot of sense to me. So if I wanted to make use of the advanced editor that ships with GL 1.4+, what do I need to do? Thanks in advance..... |
||||||
|
|||||||
| Blaine |
|
||||||
![]() ![]() ![]() ![]() ![]() Full Member ![]() Status: offline ![]() Registered: 07/16/02 Posts: 1233 |
Your right, you don't need to install another copy and GL has enabled the editor in the storyEditor, staticpages and comments. We use the FCKeditor ReplaceTextarea method and can look at the staticpage plugin for example to see how it's used by viewing the page source
The javascript that is included for the staticpage example is /javascript/staticpages_fckeditor.js An example of the JS, you need to include: PHP Formatted Code var oFCKeditor1 = new FCKeditor( 'sp_content' ) ; oFCKeditor1.BasePath = geeklogEditorBasePath; oFCKeditor1.Height = 200 ; oFCKeditor1.ReplaceTextarea() ; replace 'sp_content' with that id name Include this JS code at the end of the form (once the field id is known) I use the window.onload method which executes the JS after the page loads and the target textarea id is defined. Geeklog components by PortalParts -- www.portalparts.com |
||||||
|
|||||||
| Content generated in: 1.16 seconds |
|
|
|