当我看到http://demo.silverstripe.com/admin/用户名:admin,密码:admin
我注意到它们有重写、插入图像按钮以及插入闪存按钮
他们已经用自己的小部件替换了它。
的问题是,实现这一目标的最简单方法是什么?或者最好的指南是什么?
注意:我不使用滑条或任何现成的CMS
发布于 2011-02-24 08:40:29
在TinyMCE web:http://tinymce.moxiecode.com/tryit/custom_toolbar_button.php中很好地描述了添加自己的按钮
从现场粘贴的:
tinyMCE.init({
mode : "textareas",
theme : "advanced",
theme_advanced_buttons1 : "mybutton,bold,italic,underline,separator,strikethrough,justifyleft,justifycenter,justifyright, justifyfull,bullist,numlist,undo,redo,link,unlink",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
plugins : 'inlinepopups',
setup : function(ed) {
// Add a custom button
ed.addButton('mybutton', {
title : 'My button',
image : 'img/example.gif',
onclick : function() {
// Add you own code to execute something on click
ed.focus();
ed.selection.setContent('Hello world!');
}
});
}
});你想换就换吧。
https://stackoverflow.com/questions/5102092
复制相似问题