In the editor, click the H2 button and enter information in the pop-up window to output this result: [h2] the content entered in the pop-up window [h2] {code ...} now I don't want him to input it in the pop-up window. how can I modify it? you can use [B] in the editor, that is, the bold method to directly select some content in the article... in the editor, click the H2 button. in the pop-up window, enter the information and output the result: [h2] the input content in the pop-up window [/h2]
(Function () {function Wecenterh2Dialog (editor) {return {title: 'h2 ', minWidth: 470, minHeight: 110, buttons: [CKEDITOR. dialog. okButton, CKEDITOR. dialog. cancelButton], contents: [{elements: [{id: 'text', type: 'text', required: true, commit: function () {if (this. getValue () {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 don't want him to input it in the pop-up window. how to modify it? you can select some content in the article (for example, in the selected article: the content entered in the pop-up window, and then press H2 in the editor to directly output: [h2] the content entered in the pop-up window [/h2]
Reply content:
In the editor, click the H2 button. in the pop-up window, enter the information and output the result: [h2] the input content in the pop-up window [/h2]
(Function () {function Wecenterh2Dialog (editor) {return {title: 'h2 ', minWidth: 470, minHeight: 110, buttons: [CKEDITOR. dialog. okButton, CKEDITOR. dialog. cancelButton], contents: [{elements: [{id: 'text', type: 'text', required: true, commit: function () {if (this. getValue () {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 don't want him to input it in the pop-up window. how to modify it? you can select some content in the article (for example, in the selected article: the content entered in the pop-up window, and then press H2 in the editor to directly output: [h2] the content entered in the pop-up window [/h2]