mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°3896 - CKeditor icon for enhance WikiText URLs syntax
This commit is contained in:
46
js/ckeditor/plugins/objectshortcut/dialogs/objectshortcut.js
Normal file
46
js/ckeditor/plugins/objectshortcut/dialogs/objectshortcut.js
Normal file
@@ -0,0 +1,46 @@
|
||||
CKEDITOR.dialog.add( 'objectshortcutDialog', function( editor ) {
|
||||
return {
|
||||
|
||||
// Basic properties of the dialog window: title, minimum size.
|
||||
title: 'Object shortcut',
|
||||
minWidth: 300,
|
||||
minHeight: 200,
|
||||
|
||||
// Dialog window content definition.
|
||||
contents: [
|
||||
{
|
||||
id: 'tab-basic',
|
||||
label: 'Basic Settings',
|
||||
|
||||
elements: [
|
||||
{
|
||||
type: 'text',
|
||||
id: 'class',
|
||||
label: 'Class',
|
||||
|
||||
validate: CKEDITOR.dialog.validate.notEmpty( "Class field cannot be empty." )
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
id: 'id',
|
||||
label: 'Id',
|
||||
validate: CKEDITOR.dialog.validate.notEmpty( "Id field cannot be empty." )
|
||||
},
|
||||
{
|
||||
type: 'text',
|
||||
id: 'label',
|
||||
label: 'Label',
|
||||
},
|
||||
]
|
||||
},
|
||||
],
|
||||
|
||||
// This method is invoked once a user clicks the OK button, confirming the dialog.
|
||||
onOk: function() {
|
||||
editor.insertHtml( '[[' + this.getValueOf( 'tab-basic', 'class' ) + ':'
|
||||
+ this.getValueOf( 'tab-basic', 'id' ) +
|
||||
( this.getValueOf( 'tab-basic', 'label' ) ? '|' + this.getValueOf( 'tab-basic', 'label' ) : '') +
|
||||
']]' );
|
||||
}
|
||||
};
|
||||
});
|
||||
Reference in New Issue
Block a user