Customize Bootstrap WYSIWYG

0

Colleagues.

I'm using Bootstrap's WYSIWYG, however I would like to remove some buttons, just leave Normal to Underline .

ThecodeIhaveis:

<script>$(function(){$(".textarea").wysihtml5();
     });
  </script>
    
asked by anonymous 21.04.2017 / 18:40

1 answer

0

bootstrap-wysihtml5 is simple, lightweight ... and somewhat limited. This button configuration is not provided in code. To do this, you need to run a command in JQuery to delete the buttons, after they have already been inserted into the page, after calling wysihtml5(); .

Fortunately the buttons are easily identifiable by the title attribute.

$('a[title="CTRL+B"]').remove(); // Remove o botão Bold
$('a[title="CTRL+I"]').remove(); // Remove o botão Italic
    
17.07.2017 / 14:53