mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-24 17:04:14 +01:00
97b1130a36
phpgwapi/js/ckeditor3/plugins/aspell -changed phpgwapi/js/ckeditor3/plugins/aspell/spellerpages/server-scripts/spellchecker.php to allow only configured aspell, tmp dirs and language settings -removed other than php spellchecker pages from phpgwapi/js/ckeditor3/plugins/aspell/spellerpages/server-scripts/ -added toolbar options to reflect the use/change of calls of SpellCheck(er) via toolbar button configure options for CKeditor to use aspell (if available) or/and scayt
32 lines
957 B
JavaScript
32 lines
957 B
JavaScript
/**
|
|
* 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']
|
|
});
|
|
|