For those of you who are struggling integrating JSpell Evolution into Confluence 2.9.2 here is the outline:
Shutdown your Confluence instance
If you have a standalone version you can perform edits right in your file tree. If you have a packaged version you would need to unpack it, or patch the files in the "build" structure where you run Ant to get your packaged version
Navigate to /confluence/WEB-INF/classes/com/atlassian/confluence/setup
Extract atlassian-tinymce-plugin-3.0-rc2.jar from bundled plugins archive (you may need to verify the file name if you are trying to patch a version different from 2.9.2)
Edit file tinyMceAdaptor.js. You need to change two functions onShowEditor and tinyMCEOnInit so they look like the following:
function onShowEditor()
{
if (navigator.appName != "Microsoft Internet Explorer") {
tinyMCE.execCommand("mceAddControl", true, "wysiwyg" +
escape(AJS.params.parametersName));
// begin: JSpell integration patch
setTimeout(jspellInit,500);
// end: JSpell integration patch
}
}
And
function tinyMCEOnInit(inst) {
// begin: JSpell integration patch
if (navigator.appName == "Microsoft Internet Explorer") {
setTimeout(jspellInit,500);
}
// end: JSpell integration patch
// Once the content has finished loading, make a note of it
tinyMCEHasInit = true;
// tinyMCE.getContent() was used here previously,
// but returned nullfor FireFox.
// As a workaround, grab the textarea's contents
// and set that as the original value (CONF-4498)
tinyMCE.originalHTML = AJS.$("wysiwygTextarea").value;
}
Zip the plugin back up
zip atlassian-tinymce-plugin-3.0-rc2.jar
com/atlassian/confluence/extra/tinymceplugin/tinyMceAdaptor.js
Zip the bundled plugins archive back up
zip atlassian-bundled-plugins.zip
atlassian-tinymce-plugin-3.0-rc2.jar
Remove the copy of the plugin from your confluence home directory, it will be under YOUR_CONFLUENCE_HOME/bundled-plugins
Place the following code-snippet on your clipboard. (This assumes you have JSpell Evolution deployed into your server on /jspellEvolution context, if different - edit accordingly)
I'm trying to do similarly do this for Confluence 2.10.
Yet, had no luck with it.
For 2.10, I have made the following assumptions and changes:
At 2.10, they have a new TinyMCE version in place.
The file "tinyMceAdaptor.js" is now called "tinyMceAdapt*e*r.js" and looks very different..
The "tinyMceAdapter.js" function "onShowEditor" should now look like that:
// called just after the DIV containing the editor is made visible
onShowEditor : function () {
// begin: JSpell integration patch
setTimeout(jspellInit,500);
// end: JSpell integration patch
},
content-editor.vm is not to be changed.
wiki-textarea.vm needs this snippet at the beginning:
Paul, thanks for sharing, I haven't tried implementing this with 2.10 yet, but will probably have to do it soon for a client of mine. I am a bit concerned about frame identifiers - the reason for a more complex code in my post was due to different behavior of TinyMCE in FF and IE.
In FF it was changing the name of the frame (incrementing the number at the end) on every switch away from the rich-text editor (for example Preview and back). I'd test the above for this.
Editing both content-editor and wiki-textarea was required to have JSpell work everywhere - new/edit pages/blogs/comments.
I'm trying to do similarly do this for Confluence 2.10.
Yet, had no luck with it.
For 2.10, I have made the following assumptions and changes:
Paul-Dieter Klumpp
Ehm...Okay!?!
And I thought I had no luck...
The stuff I just posted even works!
Paul
Paul, thanks for sharing, I haven't tried implementing this with 2.10 yet, but will probably have to do it soon for a client of mine. I am a bit concerned about frame identifiers - the reason for a more complex code in my post was due to different behavior of TinyMCE in FF and IE.
In FF it was changing the name of the frame (incrementing the number at the end) on every switch away from the rich-text editor (for example Preview and back). I'd test the above for this.
Editing both content-editor and wiki-textarea was required to have JSpell work everywhere - new/edit pages/blogs/comments.
Hi Ed,
I wanted to add a comment to the article (problems with the captcha)
You guys had integrated jspell with 2.9.2
I'm trying to do similarly do this for Confluence 2.8.
I have TinyMCE tabbing from RT to WM and JSpell works fine.
That is of course if my default happens to be RT Mode and not
WM mode.
I stuck this code in the setEditorValue() function in "tinyMceAdaptor.js",
after the editor has been declared. this allows me to tab back forth from RT to WM.
if (navigator.appName == "Microsoft Internet Explorer")
**The problem arises when you declare WM mode your default. JSpell doesn't work.
Even if you go back to RT mode jspell never pops up. Can someone help
I've run out of ideas and I'm starting to bang my head against the table. Any ideas to get jspell
to work when your default is wiki markup mode and how to have it work between tabs?
Is there a javascript snippet I need to include. Any help would greatly be appreciated.
Thanks,
Sam