upgrade
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 1016 B |
35
main/inc/lib/javascript/ckeditor/plugins/glossary/plugin.js
Normal file
35
main/inc/lib/javascript/ckeditor/plugins/glossary/plugin.js
Normal file
@@ -0,0 +1,35 @@
|
||||
CKEDITOR.plugins.add('glossary',
|
||||
{
|
||||
init: function(editor)
|
||||
{
|
||||
var pluginName = 'glossary';
|
||||
editor.addCommand(
|
||||
pluginName,
|
||||
{
|
||||
exec: function(editor)
|
||||
{
|
||||
var selectedText = editor.getSelection().getSelectedText();
|
||||
if (selectedText !== '') {
|
||||
var spanElement = new CKEDITOR.dom.element("span");
|
||||
spanElement.setAttributes({
|
||||
class: 'glossary',
|
||||
style: 'color: rgb(0, 151, 74);' +
|
||||
'cursor: pointer;' +
|
||||
'font-weight: bold;'
|
||||
});
|
||||
spanElement.setText(selectedText);
|
||||
editor.insertElement(spanElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
editor.ui.addButton(
|
||||
'Glossary',
|
||||
{
|
||||
label: 'Glossary',
|
||||
command: pluginName,
|
||||
icon: this.path + 'images/glossary.gif'
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user