javascript - Trying to remove html from a package I downloaded -
i've downloaded trumbowyg wysiwyg editor: http://alex-d.github.io/trumbowyg/ site. toolbar has lot of buttons text align, quoting, etc., don't need. want remove it, i'm not sure how because there isn't html file, because buttons seem generated javascript. i've gone js file lists buttons this:
btns: [/* ['viewhtml'], ['undo', 'redo'],*/ ['formatting'], 'btngrp-semantic', /*['superscript', 'subscript'], ['link'],*/ ['insertimage'],/* 'btngrp-justify', 'btngrp-lists', ['horizontalrule'], ['removeformat'], ['fullscreen']*/ ],
as can see i've left couple buttons. doesn't anything. buttons still appear. can set buttons display:none
, isn't semantically. , doesn't work each button nested in own div, have same class .trumbowyg-button-group
, no individual identifier. i've tried remove individual .trumbowyg-button-group
s via javascript using .css('display', 'none')
, isn't working. advice appreciated.
to customize button pane, don't need change trumbowvg's source code. there public api so. can define used buttons when initializing trumbowvg:
$('#demo').trumbowyg({ btns: [['formatting'], 'btngrp-semantic', ['insertimage']] });
for approach, guess it's because changed trumbowvg's src
code, didn't build dist
?
Comments
Post a Comment