javascript - How to remove upload button in nicEdit text editor - Stack Overflow

I am fine with all the buttons of nicedit for my website. But i would like to remove upload button of t

I am fine with all the buttons of nicedit for my website. But i would like to remove upload button of the editor in one of my website. I got an option of ppulating button list, but i am searching for setting like:

fullPanel: true, hideButton: 'upload'

I am fine with all the buttons of nicedit for my website. But i would like to remove upload button of the editor in one of my website. I got an option of ppulating button list, but i am searching for setting like:

fullPanel: true, hideButton: 'upload'

Share Improve this question asked Jan 28, 2012 at 9:25 KoolKabinKoolKabin 17.7k37 gold badges111 silver badges145 bronze badges 1
  • why don't you hide it from the property? ..visible=false – jjj Commented Jan 28, 2012 at 9:30
Add a ment  | 

4 Answers 4

Reset to default 4

Just put buttons that you need.

new nicEditor({buttonList : ['fontSize','bold','italic','underline','strikeThrough','subscript','superscript','html','image']}).panelInstance('area1');

The plugin does not seem to have a hideButton option.
You can either have the full button list, or explicitely choose the buttons to show with the buttonList option.

Documentation

I was thinking that maybe you could hide it using CSS but the plugin does add any class or IDs to the buttons so it would make it pretty unreliable to target.

You can go to nicEdit.js try to find .. buttonList .. at there you can see button list. Delete the ,upload

I've been extending and fixing the nicEdit plugin (added easy YouTube embedding and DragNDropz https://dragndropz. image upload support) quite a bit lately, and I added an ignore buttons option as well to easily ignore specific buttons.

Source and updated version is here:

https://dev.x-null/own3mall/nic-edit/tree/yt-videos

Example of how to use it:

myNicEditor = new nicEditor({fullPanel : true, buttonIgnoreList: new Array('upload', 'youtube')}).panelInstance('go_nicedit',{hasPanel : true});

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745362091a4624406.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信