最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

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

programmeradmin0浏览0评论

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});
发布评论

评论列表(0)

  1. 暂无评论