Topics

User Functions

Events

There are no upcoming events

What's New

Stories

No new stories

Comments last 2 weeks

No new comments

Trackbacks last 2 weeks

No new trackback comments

Links last 2 weeks

No recent new links

NEW FILES last 14 days

No new files

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
 05/30/06 08:03PM (Read 2086 times)  
+----
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.....

 
Profile Email
 Quote
Blaine
 05/30/06 09:44PM  
+++++
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() ;

 
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
 
Profile Email Website
 Quote
Content generated in: 1.16 seconds
New Topic Post Reply

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