48 lines
1.4 KiB
Diff
48 lines
1.4 KiB
Diff
diff --git a/editor_plugin_src.js b/editor_plugin_src.js
|
|
index 4e9ba99..a96e310 100644
|
|
--- a/editor_plugin_src.js
|
|
+++ b/editor_plugin_src.js
|
|
@@ -7,6 +7,7 @@
|
|
|
|
(function() {
|
|
var JSONRequest = tinymce.util.JSONRequest, each = tinymce.each, DOM = tinymce.DOM;
|
|
+ tinymce.PluginManager.requireLangPack('wgspellchecker');
|
|
|
|
tinymce.create('tinymce.plugins.SpellcheckerPlugin', {
|
|
getInfo : function() {
|
|
@@ -269,6 +270,16 @@
|
|
}
|
|
});
|
|
|
|
+ m.add({
|
|
+ title : 'spellchecker.add_word',
|
|
+ onclick : function() {
|
|
+ t._sendRPC('addWord', [t.selectedLang, dom.decode(e.target.innerHTML)], function(r) {
|
|
+ t._removeWords(dom.decode(e.target.innerHTML));
|
|
+ t._checkDone();
|
|
+ });
|
|
+ }
|
|
+ });
|
|
+
|
|
m.update();
|
|
});
|
|
|
|
@@ -333,5 +344,5 @@
|
|
});
|
|
|
|
// Register plugin
|
|
- tinymce.PluginManager.add('spellchecker', tinymce.plugins.SpellcheckerPlugin);
|
|
-})();
|
|
\ No newline at end of file
|
|
+ tinymce.PluginManager.add('wgspellchecker', tinymce.plugins.SpellcheckerPlugin);
|
|
+})();
|
|
diff --git a/dev/null b/langs/en.js
|
|
new file mode 100644
|
|
index 0000000..602b23c
|
|
--- /dev/null
|
|
+++ b/langs/en.js
|
|
@@ -0,0 +1,4 @@
|
|
+tinyMCE.addI18n('en.spellchecker',{
|
|
+ add_word : 'Add word to dictionary'
|
|
+});
|
|
+
|