A Summernote extension that adds additional text-level semantic elements (html tags) that are already provided with styling by Bootstrap 3 and 4. A backport for older Summernote version (0.6.16) is available in a separate branch.
-
<mark>
highlighted text<small>
fine print<ins>
indicate text added to a document<delete>
indicating text deleted from a document
-
<code>
for inline code snippets<samp>
for sample output<kbd>
for indicating user input.<var>
for indicating variables.
-
Include the js and css
-
add
add-text-tags
to your toolbar in thestyle
orfont
group:$('#summernote').summernote({ toolbar: [ ... ['style', ['bold', 'italic', 'underline', 'add-text-tags', 'clear']] ] });
See Example/example.html or the fiddle here.
- This extension doesn't use Summernote's built in parser, but it can handle some basic cross-node insertions.
- The elements won't toggle on and off, however they will clear with Summernote's
Remove Font Style
button (rubber icon).