The following code is in the editor by clicking the H2 button, the popup input information output this result: [H2] Popup input content [/H2]
(function () {function Wecenterh2dialog (editor) {return {title: ' H2 ', minwidth:470, minheight:110, buttons: [CKEDITOR.dialog.okButton, CKEDITOR.dialog.ca Ncelbutton], Contents: [{elements: [{id: ' text ', type: ' Text ', Required:true, Commit:function () {if (this.get Value ()) {editor.inserthtml (' [H2] ' + this.getvalue () + ' [/h2] '); Editor.inserttext ('!! [Input content] (' + this.getvalue () + ') '); }}}, {type: ' HTML ', HTML: 'We currently support: H2!
'}]}], onload:function () { Alert (' OnLoad '); }, Onshow:function () {//alert (' onshow '); }, Onhide:function () {//alert (' onhide '); }, Onok:function () {this.commitcontent (); }, Oncancel:function () {//alert (' onCancel '); }, Resizable:false}; } CKEDITOR.dialog.add (' Wecenterh2 ', function (editor) {return wecenterh2dialog (editor); });}) ();
Now I do not want him to enter through the window, how to modify the editor can be "B" is also bold way directly, select some content in the article (such as selected in the article: Popup input, and then press the editor's H2) directly output: [H2] Popup input [/H2]
Reply content:
The following code is in the editor by clicking the H2 button, the popup input information output this result: [H2] Popup input content [/H2]
(function () {function Wecenterh2dialog (editor) {return {title: ' H2 ', minwidth:470, minheight:110, buttons: [CKEDITOR.dialog.okButton, CKEDITOR.dialog.ca Ncelbutton], Contents: [{elements: [{id: ' text ', type: ' Text ', Required:true, Commit:function () {if (this.get Value ()) {editor.inserthtml (' [H2] ' + this.getvalue () + ' [/h2] '); Editor.inserttext ('!! [Input content] (' + this.getvalue () + ') '); }}}, {type: ' HTML ', HTML: 'We currently support: H2!
'}]}], onload:function () { Alert (' OnLoad '); }, Onshow:function () {//alert (' onshow '); }, Onhide:function () {//alert (' onhide '); }, Onok:function () {this.commitcontent (); }, Oncancel:function () {//alert (' onCancel '); }, Resizable:false}; } CKEDITOR.dialog.add (' Wecenterh2 ', function (editor) {return wecenterh2dialog (editor); });}) ();
Now I do not want him to enter through the window, how to modify the editor can be "B" is also bold way directly, select some content in the article (such as selected in the article: Popup input, and then press the editor's H2) directly output: [H2] Popup input [/H2]