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.....
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:
var oFCKeditor1 = new FCKeditor( 'sp_content' ) ;
oFCKeditor1.BasePath = geeklogEditorBasePath;
oFCKeditor1.Height = 200 ;
oFCKeditor1.ReplaceTextarea() ;
Need to add an id to the textarea field
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.