Customizing Bootstrap WYSIWYG

Asked

Viewed 134 times

0

Colleagues.

I’m using Bootstrap’s WYSIWYG, but I’d like to remove some buttons, leave only the Normal up to the Underline.

inserir a descrição da imagem aqui

The code I have is:

 <script>
     $(function () {
       $(".textarea").wysihtml5();
     });
  </script>

1 answer

0

The bootstrap-wysihtml5 it’s simple, light... and quite a bit limited. This button setting 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 in the page, after the call of wysihtml5();.

Fortunately the buttons are easily identifiable by the attribute title.

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

Browser other questions tagged

You are not signed in. Login or sign up in order to post.