upgrade
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
( function(){
|
||||
|
||||
var wikilinkDialog = function(editor){
|
||||
return {
|
||||
title : "Wikilink",
|
||||
minWidth : 100,
|
||||
minHeight : 50,
|
||||
buttons:[CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton],
|
||||
onOk: function()
|
||||
{
|
||||
var data = {};
|
||||
this.commitContent(data);
|
||||
editor.insertText('[['+data.wikiLinkText+']]');
|
||||
},
|
||||
contents:
|
||||
[
|
||||
{
|
||||
id : 'general',
|
||||
label : 'Settings',
|
||||
elements :
|
||||
[
|
||||
{
|
||||
type : 'text',
|
||||
id : 'wikiLinkText',
|
||||
label : 'TIP: You can also create a wiki link placing between double brackets [[]] a word',
|
||||
validate : CKEDITOR.dialog.validate.notEmpty( 'The wikilink field cannot be empty.' ),
|
||||
required : true,
|
||||
commit : function(data)
|
||||
{
|
||||
data.wikiLinkText = this.getValue();
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
CKEDITOR.dialog.add('wikilink', function(editor) {
|
||||
return wikilinkDialog(editor);
|
||||
});
|
||||
|
||||
})();
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1007 B |
16
main/inc/lib/javascript/ckeditor/plugins/wikilink/plugin.js
Normal file
16
main/inc/lib/javascript/ckeditor/plugins/wikilink/plugin.js
Normal file
@@ -0,0 +1,16 @@
|
||||
CKEDITOR.plugins.add('wikilink',
|
||||
{
|
||||
init: function(editor)
|
||||
{
|
||||
var pluginName = 'wikilink';
|
||||
CKEDITOR.dialog.add(pluginName, this.path + 'dialogs/wikilink.js');
|
||||
|
||||
editor.addCommand(pluginName, new CKEDITOR.dialogCommand(pluginName));
|
||||
editor.ui.addButton('Wikilink',
|
||||
{
|
||||
label: 'Wikilink',
|
||||
command: pluginName,
|
||||
icon : this.path + 'images/wikilink.gif'
|
||||
});
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user