summaryrefslogtreecommitdiff
path: root/_source/plugins/aspell/plugin.js
diff options
context:
space:
mode:
Diffstat (limited to '_source/plugins/aspell/plugin.js')
-rwxr-xr-x_source/plugins/aspell/plugin.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/_source/plugins/aspell/plugin.js b/_source/plugins/aspell/plugin.js
new file mode 100755
index 0000000..6ced98f
--- /dev/null
+++ b/_source/plugins/aspell/plugin.js
@@ -0,0 +1,31 @@
+/**
+ * Aspell plug-in for CKeditor 3.0
+ * Ported from FCKeditor 2.x by Christian Boisjoli, SilenceIT
+ * Requires toolbar, aspell
+ */
+
+CKEDITOR.plugins.add('aspell', {
+ init: function (editor) {
+ // Create dialog-based command named "aspell"
+ editor.addCommand('aspell', new CKEDITOR.dialogCommand('aspell'));
+
+ // Add button to toolbar. Not sure why only that name works for me.
+ editor.ui.addButton('SpellCheck', {
+ label: editor.lang.spellCheck.toolbar,
+ command: 'aspell'
+ });
+
+ // Add link dialog code
+ CKEDITOR.dialog.add('aspell', this.path + 'dialogs/aspell.js');
+
+ // Add CSS
+ var aspellCSS = document.createElement('link');
+ aspellCSS.setAttribute( 'rel', 'stylesheet');
+ aspellCSS.setAttribute('type', 'text/css');
+ aspellCSS.setAttribute('href', this.path+'aspell.css');
+ document.getElementsByTagName("head")[0].appendChild(aspellCSS);
+ delete aspellCSS;
+ },
+ requires: ['toolbar']
+});
+