What does the editor check for bold code?

Source: Internet
Author: User
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]

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.