Bootstrap Rich Text editor-BOOTSTRAP-WYSIWYG

Source: Internet
Author: User

In the entry of English test questions, because English questions often have similar questions as follows:

My friend watches dragon Boat races at the Dragon boat Festival. (Ask a question in the dash section)

--_______ is the Double ninth Festival?

--it is in October.

In the above topic, we need to look for a rich text editor capable of editing the underline, and in order to speed up the editing, can be used in the entry of the question of several patterns are often predefined, such as the--,_____ symbol of the automatic input.

After a survey on the Internet, we found that BOOTSTRAP-WYSIWYG can meet our needs.

This control can be found from HTTPS://GITHUB.COM/STEVEATHON/BOOTSTRAP-WYSIWYG (the latest version).

In the bootstrap-wysiwyg/examples/html-editor.html official example, you can find the relevant HTML editor to use.

In this official example, when downloaded down will be found not to use, mainly the lack of jquery.hotkeys.js and google-code-prettify/src/prettify.js, these JS can be from https://github.com/ Obtained in mindmup/bootstrap-wysiwyg/tree/master/external.

The specific use of this control rules is relatively simple, this article is no longer simple to repeat, the specific can refer to the official website of the use of instructions, no few lines of code can be simple to use, the reader can try to see for themselves.

In order to achieve the click of a button can automatically output the predefined template text, the specific implementation of the following:

<a class= "btn btn-default" data-edit= "inserttext ____" title= "" ><i class= "fa fa-align-justify" > </i></a>

In the simple code above, the InsertText command is used mainly in the Data-edit attribute, which can be followed by the relevant text parameters.

The complete command can be consulted: https://developer.mozilla.org/en-US/docs/Web/API/document/execCommand#Commands

Bootstrap Rich Text editor-BOOTSTRAP-WYSIWYG

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.