我正在为tinyMCE添加一个按钮,并且我想知道如何使用javascript将标签内部的文本封装在标签中(例如,这种突出显示的文本被包装在[highlight][/highlight]
标签中)。 并且现在整个tinymcejavascript wrap with text标签
(function() {
tinymce.create('tinymce.plugins.shoutButton', {
init : function(ed, url) {
ed.addButton('shout.button', {
title : 'shout.button',
image : 'viral.gif',
onclick : function() {
window.alert("booh");
});
},
createControl : function(n, cm) {
return null;
},
getInfo : function() {
return {
longname : "Shout button",
author : 'SAFAD',
authorurl : 'http://safadsoft.com/',
infourl : 'http://safadsoft.com/',
version : "1.0"
};
}
});
tinymce.PluginManager.add('shout.button', tinymce.plugins.ShoutButton);
})();
我投下了你的答案,因为你没有发布实现最终目标的最终代码。 – Webnet 2012-05-01 19:16:39
同意,为此我编辑了答案,接受我真诚的道歉! – SAFAD 2013-03-05 10:51:20