Welcome to Geeklog, Anonymous Wednesday, December 04 2024 @ 01:07 pm EST

Geeklog Forums

Can't figure out how to get the advanced editor to work in a plugin...


Status: offline

timatlee

Forum User
Newbie
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.....
 Quote

Status: offline

Blaine

Forum User
Moderator
Registered: 07/16/02
Posts: 1232
Location:Canada
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:
Text Formatted Code

        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.


Geeklog components by PortalParts -- www.portalparts.com
 Quote

All times are EST. The time is now 01:07 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content