Skip to content

Buttons

Subscript and Superscript

subscript-superscript

Try it yourself:

To use subscript and superscript, just make sure that you include these buttons in the buttons list using the toolbarButtons option.


Edit in JSFiddle

HTML

<div id="froala-editor">
  <p>To use <code>subscript</code> and <code>superscript</code>, just make sure that you include these buttons in the buttons list using the <a href="../docs/options#toolbarButtons" title="toolbarButtons option" target="_blank">toolbarButtons</a> option.</p>
</div>

JAVASCRIPT

<script>
  $(function() {
    $('div#froala-editor').froalaEditor({
      // Include the subscript and superscript buttons.
      toolbarButtons: ['bold', 'italic', '|', 'indent', 'outdent', 'formatOL', 'formatUL', '|',
        'insertLink', 'insertImage', 'subscript', 'superscript'],
    })
  });
</script>
File: 3637