PermaLink Integrating Blogsphere 2.1 and FCKEditor 2.212/25/2005 03:33 AM

Prior to becomming a blogger, I implemented FCKEditor 2.11 for use with a domino database (This was 4 days ago).

 

Upon entering the bloggingsphere environment (later that same day, unrelated timing) I noticed that my implementation had some advantages (and some drawbacks, for drawback, it must be implemented on the OS of the server)

 

If you want to dive right into the design elements and can the chit chat, here they are, just the modified elements, it requires a download of FCKEditor 2.2 on the OS.  Remember, if you go that way, its never too late to start reading the details.

 

http://www.dwightwilbanks.org/dwightwilbanks/blog.nsf/htdocs/DWIS6KEBQA.htm/$file/fck.zip

 

So, Heres the details.

 

My first pass at implementing FCK 2.11 into a notes database I slammed everything into file resources.   Ok, you caught me, I watched my http trafic & only uploaded the needed files, there are a lot of files in an FCK implementation.

 

It bombed when it was trying to read an html file with ?something instead of a valid domino command.  At this point, I put a hold on that development stream, it seemed to me that knowing all the places that a non-domino like URL existed might be a little hairy.

 

So, I moved on to try two.   I copied all the files to my %data%\domino\html directory on the server & fired it off.

 

With syntax from the IBM ND6 forum I fired off a page, and it worked for text editing, but, it bombed on uploads of images, files and flash  (yeah, that would really be too easy), so  a little bit of digging and I found the fckconfig.js

 

In there is shows that the default settings are for a PHP server, if you want IIS or something else, you have to change some settings.   I also download code & implement first, then read more when things bomb.

 

Basically there are 6 URL that I change in the fckconfig.js, a browse URL and an upload URL for Images, Files and flash.  Then I need to build forms in the notes database to respond to those URLS.

 

No problem.

 

I put some data in manually and got the browse to work pretty quicky, its just an open form with an embedded view.  All the anchors have an on click event that calls some javascript on the parent with what was the URL that they selected.

 

The way that the upload works is that the URL is used in a post command.   So, I used a ?CreateDocument URL and in the $$return, it needed to call some javascript with the final URL of the image (based on UNID) and overwrote the NAME on the file upload input. and it worked!   Now all it needed was polish!

 

So I jumped out to the FCKEditor website to make sure I had the URL right for my  documentation and credits, low and behold a new release came out, that very day, some strange timing has been happening.  So, I backed up and implemented 2.2 in a symilar fasion.

 

However, I did things a little different.

 

When I overwrite the file input name attribute, I only do it if a variable was set on the configuration object.  This allows for non-domino implementation to use the same code (hopefully we can get this into FCKEditor Core) thats in fck_flash.js, fck_image.js and fck_link.js

 

I also left alone the fckconfig.js this time, I allow the PHP settings to get made normally then I overwrite them before the values get used (in the onload of the form)   This leaves us with only 3 files changed in the core FCKEditor and none of them should impact a non-domino environment. 

 

In a domino implementation there are some domino specific tricks, when we use the ?CreateDocument post command with a File Upload input, it creates a name attribute with the replicaID of the DB, and the UNID of the form, (and a squence number for the control), so we need to configure them and they should not be global for the server, they should be valid for any DB on the server (thats why I left that

 

The JSHeader on the story has the database ReplicaID and UNIDS of the forms, in a full implementation we should parse this out of the DXL, I've got the code for it if anyone needs it.


Comments :v

1. John Tasler12/31/2005 01:22:16 PM


I like how close FCK is to another choice word in my vocabulary. I have to imagine that was intentional.




Add Manual Trackback
Please enter the details of the trackback post. Your trackback will not appear on the site until it has been verified. This won't be immediate, as trackbacks are validated on a scheduled basis. Be patient.











Powered By :

BlogSphere

Join The WebLog Revolution at BlogSphere.net

Dwight Pic
Hot Links
These are my heavy hitters
MSDN DHTML Objects
MSDN JScript

Contact Me
Left Block 3
Monthly Archive
Todays Referrers
No Referrals
RSS News Feed RSS Comments Feed Geo URL Blog Admin OpenNTF BlogSphere