"summernote"
Bootstrap 3.1.0 Snippet by escapedlion

<link href="//netdna.bootstrapcdn.com/bootstrap/3.1.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.min.css" rel="stylesheet"> <div class="container"> <div class="row"> <div class="col-lg-12"> <div class="well"> <form class="form-horizontal" METHOD="POST" name="example" ID="edit" ACTION="?"> <div class="form-group"> <div class="col-lg-12"> <label for="title">Title</label> <input type="text" class="form-control" Name="title" placeholder="title"> </div> </div> <div class="form-group"> <div class="col-lg-12"> <div class="summernote"> <div id="summernote" class="summernote"> <p></p> </div> </div> </div> </div> <button type="submit" class="btn btn-primary">Save</button> <button type="button" class="btn btn-default" id="cancel" class="btn">Cancel</button> </form> </div> </div> <script src="//cdn.bootcss.com/summernote/0.5.0/summernote.js"></script>
.form-control { color: rgb(69, 76, 84); border-width: 2px; border-color: rgb(189, 195, 199); border-radius: 2px; box-shadow: none; } .form-control:focus { border-color: rgb(22, 160, 133); outline: 0px none; box-shadow: none; } .note-editor { border: 1px solid rgb(169, 169, 169); } .note-editor .note-dropzone { position: absolute; z-index: 1; display: none; color: rgb(135, 206, 250); background-color: white; border: 2px dashed rgb(135, 206, 250); opacity: 0.95; } .note-editor .note-dropzone .note-dropzone-message { display: table-cell; font-size: 28px; font-weight: bold; text-align: center; vertical-align: middle; } .note-editor .note-toolbar { padding-bottom: 5px; padding-left: 5px; margin: 0px; background-color: rgb(245, 245, 245); border-bottom: 1px solid rgb(169, 169, 169); } .note-editor .note-toolbar > .btn-group { margin-top: 5px; margin-right: 5px; margin-left: 0px; } .note-editor .note-toolbar .note-table .dropdown-menu { min-width: 0px; padding: 5px; } .note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker { font-size: 18px; } .note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker .note-dimension-picker-mousecatcher { position: absolute ! important; z-index: 3; width: 10em; height: 10em; cursor: pointer; } .note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker .note-dimension-picker-unhighlighted { position: relative ! important; z-index: 1; width: 5em; height: 5em; background: url('undefined') repeat scroll 0% 0% transparent; } .note-editor .note-toolbar .note-table .dropdown-menu .note-dimension-picker .note-dimension-picker-highlighted { position: absolute ! important; z-index: 2; width: 1em; height: 1em; background: url('undefined') repeat scroll 0% 0% transparent; } .note-editor .note-toolbar .note-style h1, .note-editor .note-toolbar .note-style h2, .note-editor .note-toolbar .note-style h3, .note-editor .note-toolbar .note-style h4, .note-editor .note-toolbar .note-style h5, .note-editor .note-toolbar .note-style h6, .note-editor .note-toolbar .note-style blockquote { margin: 0px; } .note-editor .note-toolbar .note-color .dropdown-toggle { width: 20px; padding-left: 5px; } .note-editor .note-toolbar .note-color .dropdown-menu { min-width: 290px; } .note-editor .note-toolbar .note-color .dropdown-menu .btn-group { margin: 0px; } .note-editor .note-toolbar .note-color .dropdown-menu .btn-group:first-child { margin: 0px 5px; } .note-editor .note-toolbar .note-color .dropdown-menu .btn-group .note-palette-title { margin: 2px 7px; font-size: 12px; text-align: center; border-bottom: 1px solid rgb(238, 238, 238); } .note-editor .note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset { padding: 0px 3px; margin: 5px; font-size: 12px; cursor: pointer; border-radius: 5px; } .note-editor .note-toolbar .note-color .dropdown-menu .btn-group .note-color-reset:hover { background: none repeat scroll 0% 0% rgb(238, 238, 238); } .note-editor .note-toolbar .note-para .dropdown-menu { min-width: 216px; padding: 5px; } .note-editor .note-toolbar .note-para .dropdown-menu > div:first-child { margin-right: 5px; } .note-editor .note-statusbar { background-color: rgb(245, 245, 245); } .note-editor .note-statusbar .note-resizebar { width: 100%; height: 8px; cursor: s-resize; border-top: 1px solid rgb(169, 169, 169); } .note-editor .note-statusbar .note-resizebar .note-icon-bar { width: 20px; margin: 1px auto; border-top: 1px solid rgb(169, 169, 169); } .note-editor .note-popover .popover { max-width: none; } .note-editor .note-popover .popover .popover-content { padding: 5px; } .note-editor .note-popover .popover .popover-content a { display: inline-block; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; } .note-editor .note-popover .popover .popover-content .btn-group + .btn-group { margin-left: 5px; } .note-editor .note-popover .popover .arrow { left: 20px; } .note-editor .note-handle .note-control-selection { position: absolute; display: none; border: 1px solid black; } .note-editor .note-handle .note-control-selection > div { position: absolute; } .note-editor .note-handle .note-control-selection .note-control-selection-bg { width: 100%; height: 100%; background-color: black; opacity: 0.3; } .note-editor .note-handle .note-control-selection .note-control-holder { width: 7px; height: 7px; border: 1px solid black; } .note-editor .note-handle .note-control-selection .note-control-sizing { width: 7px; height: 7px; background-color: white; border: 1px solid black; } .note-editor .note-handle .note-control-selection .note-control-nw { top: -5px; left: -5px; border-right: 0px none; border-bottom: 0px none; } .note-editor .note-handle .note-control-selection .note-control-ne { top: -5px; right: -5px; border-bottom: 0px none; border-left: medium none; } .note-editor .note-handle .note-control-selection .note-control-sw { bottom: -5px; left: -5px; border-top: 0px none; border-right: 0px none; } .note-editor .note-handle .note-control-selection .note-control-se { right: -5px; bottom: -5px; cursor: se-resize; } .note-editor .note-handle .note-control-selection .note-control-selection-info { right: 0px; bottom: 0px; padding: 5px; margin: 5px; font-size: 12px; color: white; background-color: black; border-radius: 5px; opacity: 0.7; } .note-editor .note-dialog > div { display: none; } .note-editor .note-dialog .note-help-dialog { font-size: 12px; color: #666666; background-image: none; background-repeat: repeat; background-attachment: scroll; background-position: 0% 0%; background-clip: border-box; background-origin: padding-box; background-size: auto auto; border: 0px none; opacity: 0.9; } .note-editor .note-dialog .note-help-dialog .modal-content { background-color: #ffffff ! important; background: none repeat scroll 0% 0% transparent; border: 1px solid #777777; border-radius: 5px; box-shadow: none; } .note-editor .note-dialog .note-help-dialog a { font-size: 12px; color: #777777; } .note-editor .note-dialog .note-help-dialog .title { padding-bottom: 5px; font-size: 14px; font-weight: bold; color: #777777; border-bottom: 1px solid #777777; } .note-editor .note-dialog .note-help-dialog .modal-close { font-size: 14px; color: #222222; cursor: pointer; } .note-editor .note-dialog .note-help-dialog .note-shortcut-layout { width: 100%; } .note-editor .note-dialog .note-help-dialog .note-shortcut-layout td { vertical-align: top; } .note-editor .note-dialog .note-help-dialog .note-shortcut { margin-top: 8px; } .note-editor .note-dialog .note-help-dialog .note-shortcut th { font-size: 13px; color: #222222; text-align: left; } .note-editor .note-dialog .note-help-dialog .note-shortcut td:first-child { min-width: 110px; padding-right: 10px; font-family: "Courier New"; color: #222222; text-align: right; } .note-editor .note-dialog .note-help-dialog .modal-dialog .modal-content .modal-body .modal-background p, .note-editor .note-dialog .note-help-dialog .modal-dialog .modal-content .modal-body .modal-background p a {color: #ffffff;} .note-editor .note-editable { padding: 10px; overflow: auto; outline: 0px none; } .note-editor .note-codable { display: none; width: 100%; padding: 10px; margin-bottom: 0px; font-family: Menlo,Monaco,monospace,sans-serif; font-size: 14px; color: rgb(204, 204, 204); background-color: rgb(34, 34, 34); border: 0px none; border-radius: 0px; box-shadow: none; -moz-box-sizing: border-box; resize: none; } .note-editor .dropdown-menu { min-width: 90px; } .note-editor .dropdown-menu li a i { color: deepskyblue; visibility: hidden; } .note-editor .note-fontsize-10 { font-size: 10px; } .note-editor .note-color-palette { line-height: 1; } .note-editor .note-color-palette div .note-color-btn { width: 17px; height: 17px; padding: 0px; margin: 0px; border: 1px solid rgb(255, 255, 255); } .note-editor .note-color-palette div .note-color-btn:hover { border: 1px solid rgb(0, 0, 0); } .summernote { font-family: Verdana,Helvetica,Arial,sans-serif; line-height: 1.2; color: rgb(51, 51, 51); background-color: rgb(255, 255, 255); text-align: left; padding: 0px; } .summernote h1, .summernote h2, .summernote h3, .summernote h4, .summernote h5, .summernote h6 { margin: 10px 0px; font-family: inherit; font-weight: bold; line-height: 1.5; color: inherit; }
$(document).ready(function() { $('#summernote').summernote({height: 300, codemirror: {theme: 'monokai'}}); }); var postForm = function() { var content = $('textarea[name="content"]').html($('#summernote').code()); }

Related: See More


Questions / Comments: