Toggle superscript, subscript, and clear formatting
The old API page grouped these three commands together. This example does the same and shows the resulting HTML
after each step, including removeFormat.
Target this selected phrase to compare script toggles and formatting cleanup.
HTML output
Ready.
Example configuration - Script and Cleanup
summernote.create('#font-script-editor', {
height: 240,
});
summernote.invoke('#font-script-editor', 'superscript');
summernote.invoke('#font-script-editor', 'subscript');
summernote.invoke('#font-script-editor', 'removeFormat');