All,
some information on how to integrate Mozile with Orbeon Forms from James Overton. Thought you might be interested. I'll keep whacking at this. Henrik ---------- Forwarded message ---------- From: James A. Overton <[hidden email]> Date: Nov 22, 2006 3:06 PM Subject: Re: [Mozile] New to Mozile - attempting javascript integration To: Mozile <[hidden email]> Hi Henrik, I'm happy to help you get Mozile working with your system. I hadn't heard of Orbeon before now. It looks like an interesting project. I expect that it will be possible to make it work with Mozile, although it will take a bit of work. Mozile makes changes directly to the page using standard DOM methods. The mozile.save module just provides some tools for cleaning up the DOM, removing changes that Mozile has made, and returning a string version of the content. Yes, there is one Mozile instance for the whole page, although multiple areas of the page may be editable. I've looked at the /ops/ops/javascript/xhtml.js file that is loaded in the Orberon HTMLArea demo (http://www.orbeon.com/ops/goto-example/ xforms-html-area). There are only a few mentions of FCKeditorAPI in that file, and the trick will be to replace that functionality. You will probably want to use your own modified version of the xhtml.js file. Here is what you need to do (in broad strokes): 1. Get Mozile into the page (as described in the Mozile README) 2. Load the data into the target DIV 3. Attach replacements for ORBEON.xforms.Events.focus and ORBEON.xforms.Events.blur. 4. Tell Mozile to start editing the target DIV For (2) you can load the data into the target DIV by using innerHTML or an equivalent. For (3) key is ORBEON.xforms.Events.blur, which stores the value of the FCKEditor, like this: var editorInstance = FCKeditorAPI.GetInstance(target.name); target.value = editorInstance.GetXHTML(); xformsValueChanged(target, null); You can get the "value" out of Mozile using mozile.save.getContent(), so this should work. target.value = mozile.save.getContent () ; xformsValueChanged(target, null); The other thing is that Mozile doesn't fire "focus" and "blur" events like FCKEditor does. This isn't a hard thing to do, the question is whether you really want to store the editor's content on blur, or at some other time. You could create a trivial mozile.save.Module (like mozile.dave.display) which just has these two lines, and will be run when the user presses the "save" button. I'm sure that doesn't answer all your questions. But it should give you an idea of how to solve your problems, and you can ask more specific question either here or in IRC (irc://irc.freenode.net/ #mozile). James _______________________________________________ Mozile mailing list [hidden email] http://mozdev.org/mailman/listinfo/mozile -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Henrik,
Wow, he certainly spent time on this! Please keep us posted! -Erik Henrik Pettersen wrote: > All, > > some information on how to integrate Mozile with Orbeon Forms from James > Overton. Thought you might be interested. > > I'll keep whacking at this. > > Henrik > > ---------- Forwarded message ---------- > From: *James A. Overton* <[hidden email] <mailto:[hidden email]>> > Date: Nov 22, 2006 3:06 PM > Subject: Re: [Mozile] New to Mozile - attempting javascript integration > To: Mozile <[hidden email] <mailto:[hidden email]>> > > Hi Henrik, > > I'm happy to help you get Mozile working with your system. > > I hadn't heard of Orbeon before now. It looks like an interesting > project. I expect that it will be possible to make it work with > Mozile, although it will take a bit of work. > > Mozile makes changes directly to the page using standard DOM methods. > The mozile.save module just provides some tools for cleaning up the > DOM, removing changes that Mozile has made, and returning a string > version of the content. > > Yes, there is one Mozile instance for the whole page, although > multiple areas of the page may be editable. > > I've looked at the /ops/ops/javascript/xhtml.js file that is loaded > in the Orberon HTMLArea demo (http://www.orbeon.com/ops/goto-example/ > xforms-html-area). There are only a few mentions of FCKeditorAPI in > that file, and the trick will be to replace that functionality. You > will probably want to use your own modified version of the xhtml.js > file. > > Here is what you need to do (in broad strokes): > 1. Get Mozile into the page (as described in the Mozile README) > 2. Load the data into the target DIV > 3. Attach replacements for ORBEON.xforms.Events.focus and > ORBEON.xforms.Events.blur. > 4. Tell Mozile to start editing the target DIV > > For (2) you can load the data into the target DIV by using innerHTML > or an equivalent. > > For (3) key is ORBEON.xforms.Events.blur, which stores the value of > the FCKEditor, like this: > var editorInstance = FCKeditorAPI.GetInstance(target.name > <http://target.name>); > target.value = editorInstance.GetXHTML(); > xformsValueChanged(target, null); > You can get the "value" out of Mozile using mozile.save.getContent(), > so this should work. > target.value = mozile.save.getContent () ; > xformsValueChanged(target, null); > > The other thing is that Mozile doesn't fire "focus" and "blur" events > like FCKEditor does. This isn't a hard thing to do, the question is > whether you really want to store the editor's content on blur, or at > some other time. You could create a trivial mozile.save.Module (like > mozile.dave.display) which just has these two lines, and will be run > when the user presses the "save" button. > > I'm sure that doesn't answer all your questions. But it should give > you an idea of how to solve your problems, and you can ask more > specific question either here or in IRC (irc://irc.freenode.net/ > #mozile). > > James > > > > > > > _______________________________________________ > Mozile mailing list > [hidden email] <mailto:[hidden email]> > http://mozdev.org/mailman/listinfo/mozile > > > ------------------------------------------------------------------------ > > > -- > You receive this message as a subscriber of the [hidden email] mailing list. > To unsubscribe: mailto:[hidden email] > For general help: mailto:[hidden email]?subject=help > ObjectWeb mailing lists service home page: http://www.objectweb.org/wws -- Orbeon Forms - XForms Everywhere http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |