I have been trying to integrate the "JSpell Evolution" AJAX Spellchecker with the wiki software Confluence (Version 2.10) this morning. And, finally, it works.
<a class='serendipity_image_link' href='/blog/uploads/Wiki-Bilder/jspell-conf210.png' onclick="F1 = window.open('/blog/uploads/Wiki-Bilder/jspell-conf210.png','Zoom','height=410,width=1080,top=202.5,left=107.5,toolbar=no,menubar=no,location=no,resize=1,resizable=1,scrollbars=yes'); return false;"><!-- s9ymdb:7 --><img class="serendipity_image_right" width="150" height="56" style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;" src="/blog/uploads/Wiki-Bilder/jspell-conf210.serendipityThumb.png" alt="" /></a>
With a little help (http://techtime.co.nz/display/TECHTIME/2008/12/15/Integrating+JSpell+into+Confluence+2.9.2) my braincells began working.
Similarily to the above resource, I made up another step by step procedure for you folks..
- Stop 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. Note: The next steps apply to the standalone version of Confluence. If your installation archive was marked with "-std" you use the standalone version.
- Navigate to "/confluence/WEB-INF/lib" and find the file "confluence-tinymce-plugin-2.10.jar"
- Extract the file "tinyMceAdapter.js" from the jar:
unzip confluence-tinymce-plugin-2.10.jar tinyMceAdapter.js
..or use any other archive tool
- Edit the file "tinyMceAdapter.js". You need to change two functions onShowEditor and tinyMceOnInit so they look like the following:
onShowEditor : function () {
// begin: JSpell integration patch
if (navigator.appName != "Microsoft Internet Explorer") {
setTimeout(jspellInit,500);
}
// end: JSpell integration patch
},
tinyMceOnInit : function() {
// begin: JSpell integration patch
if (navigator.appName == "Microsoft Internet Explorer") {
setTimeout(jspellInit,500);
}
// end: JSpell integration patch
console.log("Adapter:tinyMceOnInit oninit callback");
this._tinyMceHasInit = true;
if (this.onInitCallback) {
this.onInitCallback();
}
},
Note: If function seems to be somehow different just notice the "{{JSpell integration patch}}"-markers to know what parts are important.
Put the modified file "tinyMceAdapter.js" back into the jar where it came from. :) Use your favorite archive tool.
Note: If you update your TinyMCE plugin from the plugin repository, your changes to "tinyMceAdapter.js" will be lost - I guess. :) Keep that in mind.
Remove the copy of the plugin from your confluence home directory, it will be under CONFLUENCE_HOME/bundled-plugins
Navigate to "/confluence/template/notable" and edit "wiki-textarea.vm"
Put this code at the very front:
- If you use the packaged version - build your package with Ant and deploy
- Start your Confluence instance
Resources:
* http://techtime.co.nz/display/TECHTIME/2008/12/15/Integrating+JSpell+into+Confluence+2.9.2
* some brain
On a sidenote:
* It works but Internet Explorer 6.0 still sucks.
* JSpell doesn't seem to be actively developed anymore. For me, it's a dead piece and overpriced.
* Share your comments :)