I have created a custom plugin for text input. When click on a new icon(which I added) it just opens a dialog. It will have one input box. On click of 'OK' it shows the input box in the CKeditor.
When again double click on the input box in the editor it is not opening my plugin rather it is defaults to CKEditor's textinput plugin. I need to get my plugin on double click of input. Please help. Plugin code is as below
init: function (editor) { editor.addCommand( 'insertlink', new CKEDITOR.dialogCommand( 'insertlink' ) ); editor.ui.addButton( 'SimpleLink', { label: 'Insert a Link', command: 'insertlink' } ); CKEDITOR.dialog.add( 'insertlink', function( editor ) { return { title : 'Short Answer', minWidth : 200, minHeight : 100, contents : [ { id : 'general', label : 'Settings', elements : [ { type : 'html', html : 'Enter the size of the box for answer.' }, { type : 'text', id : 'url', label : 'Size', maxLength: 3, size: 4, validate: CKEDITOR.dialog.validate.number('Enter valid value.'), required : true, commit : function( data ) { data.size = this.getValue(); } } ] } ], onOk : function() { var dialog = this, data = {}, link = editor.document.createElement( 'input' ); this.commitContent( data ); link.setAttribute( 'type', 'text'); link.setAttribute( 'id', 'shortanswer'); link.setAttribute( 'size', data.size); link.setHtml( data.contents ); editor.insertElement( link ); } }; }); }
Are someone going to assist
Are someone going to assist me on this?