作者:Jing | 来源:互联网 | 2023-05-18 13:37
I am in a situation where I do not control the creation of one or many YUI Rich Text Editors; it is done in someone else's library.
我处于一种我无法控制一个或多个YUI富文本编辑器的创建的情况;它是在别人的图书馆里完成的。
For the purposes of this discussion:
出于本讨论的目的:
By creation I mean:
通过创作我的意思是:
var myEditor = new YAHOO.widget.Editor(control, {
// toolbar config would go here if I controled this code
});
myEditor.render();
The problem is that I would like these editors to have a different toolbar configuration to what they have. To be precise, I would like to remove a bunch of buttons (The default is a bit bloated).
问题是我希望这些编辑器具有不同的工具栏配置。确切地说,我想删除一堆按钮(默认有点臃肿)。
I managed to get the editor with the EditorInfo
tool, but I couldn't really do anything with it. There is apparently a variable on the Editor that allows you to get the Toolbar
instance but when I tried it all I got was null
.
我设法使用EditorInfo工具获取编辑器,但我无法用它做任何事情。编辑器上显然有一个变量可以让你获得工具栏实例,但是当我尝试它时,我得到的只是null。
So, is there a way to modify a YUI Rich Text Editor after render()
has been called to remove toolbar buttons?
那么,有没有办法在调用render()后删除工具栏按钮来修改YUI富文本编辑器?
1 个解决方案