Created
April 6, 2020 05:43
-
-
Save nazarbek7/2ab5aaee01a0f838c04c9f51edb60597 to your computer and use it in GitHub Desktop.
Summernote wysiwyg test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="editor-wrapper"> | |
<div id="editor" class="editor"></div> | |
</div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function() { | |
$("#editor").summernote({ | |
height: 300, // set editor height (toolbar not included???) | |
focus: false, // set focus to editable area after initializing summernote | |
toolbar: [ | |
// [groupName, [list of button]] | |
["style", ["bold", "italic", "underline", "clear"]], | |
["font", ["strikethrough", "superscript", "subscript"]], | |
["fontsize", ["fontsize"]], | |
["color", ["color"]], | |
["para", ["ul", "ol", "paragraph"]], | |
["height", ["height"]], | |
['insert', ['link', 'picture']] | |
] | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.editor-wrapper{ | |
width: 600px; | |
height: 400px; | |
box-shadow: 3px 0 10px black; | |
margin: 0 auto; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.css" rel="stylesheet" /> | |
<link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.9/summernote.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment