Rich-text editing plug-ins based on jquery and Bootstrap-summernote_ Rich Text editor

Source: Internet
Author: User
Tags sendfile cloudflare
1, the use of HTML5 DOCTYPE 2, the introduction of jquery, Bootstrap, font-awesome files
<!--include libraries (JQuery, bootstrap)-->
<link href= "http://netdna.bootstrapcdn.com/bootstrap/ 3.3.5/css/bootstrap.css "rel=" stylesheet ">
<script src=" http://cdnjs.cloudflare.com/ajax/libs/jquery/ 2.1.4/jquery.js "></script> 
<script src=" http://netdna.bootstrapcdn.com/bootstrap/3.3.5/js/ Bootstrap.js "></script> 

<!--include summernote css/js-->
<link href=" http:// Cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.css "rel=" stylesheet ">
<script src=" http:// Cdnjs.cloudflare.com/ajax/libs/summernote/0.8.2/summernote.js "></script>
3, add div to body, set id= "Summernote"; This target element will later be rendered as the Summernote editing tool.
<div id= "Summernote" ></div>
4, the document is ready to run the following script.
Initialize the plug-in
$ (function () {
    $ (' #summernote '). Summernote ();
5. Basic setting height and focus
$ (' #summernote '). Summernote ({
  height:300,                 //Set editor height
  minheight:null,             //Set minimum height  of editor
  Maxheight:null,             //Set maximum height of editor
  focus:true                  //Set focus to editable Initializing Summernote
});
Language
Lang: ' Zh-cn ',
customizing toolbars
Toolbar: [
    //[GroupName, [List of Button]]
    [' style ', [' bold ', ' italic ', ' underline ', ' clear ']],
    [' Font ', [' Strikethrough ', ' superscript ', ' subscript ']],
    [' fontsize ', [' fontsize ']],
    [' Color ', [' color ']],
    [ ' Para ', [' ul ', ' ol ', ' paragraph ']],
    [' Height ', [' height ']]
  ]
6, picture upload

Multi-Map Upload Demo

<! DOCTYPE html>  

Official documents poking around here Yes U ェ *u

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.