dominoGuru.com

Your Development & Design Resource

FCKeditor and the Domino URL Command

Spent the majority of my night last night (after reeling from the Jack-has-a-son-by-Nathan-Petrelli's-wife, and the return of the Bluetooth-man as Cain to Bauer's Able) getting FCKeditor to work with a Domino-based CMS solution that I've been working on. The great news - it's working! The not-so-great-but-expected (I'm in a hyphen mood this morning) news: you need to modify it to work with Domino!

FCKeditor Demo 
Screenshot

I'm still making changes to the libraries et al in order to get it to *really* work with Domino as it's server and data store, but even the more simple adoptions of this amazing WYSIWYG markup generating editor mandates a minor change before even being able to get it running. The issue: the fckeditor.js Javascript Library and Domino URL Commands. More accurately, it's line 145 in the fckeditor.js library.

The original:

var sLink = this.BasePath + 'editor/' + sFile + '?InstanceName=' + this.InstanceName ;
This tries to launch a URL Command of InstanceName - which we know that Domino will die a horrible death around, as it's not a recognized command. The solution is to give Domino a URL Command that it will recognize that won't impact your functionality while implementing this across various design element types (unlike, say ?OpenForm as this will break on File Resources, Pages and other non-Form design elements)

The solution:

var sLink = this.BasePath + 'editor/' + sFile + '?Open&InstanceName=' + this.InstanceName ;
Yep - it's simple and it gets the job done! As you can see here, we've used the ?Open Domino URL Command... and that's all you need! Your simple editor should now be working perfectly!

In the next few days, I'll put up a FCKeditor/Domino hybrid database that will allow the Image and File resource links within the full-on FCKeditor to grab items from a Domino database store instead of (what it's currently expecting/utilizing) a server file directory. Until then, here's a zip file containing the modified fckeditor.js that you can use to replace the build-in one and allow Domino to utilize this great tool!

Domino URL 
Command-friendly FCKeditor fckeditor.js Javascript Library


About the author: Chris Toohey

Thought Leadership, Web & Mobile Application Development, Solutions Integration, Technical Writing & Mentoring

A published developer and webmaster of dominoGuru.com, Chris Toohey specializes in platform application development, solutions integration, and evangelism of platform capabilities and best practices.



More from dominoGuru.com


dominoGuru.com is powered by IBM Notes Domino XPages & hosted by Prominic.NET

Contact Us

Use our Contact / Feedback form or one of these email addresses:

Creative Commons License

Except where otherwise noted, dominoGuru.com by Chris Toohey is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.