My plugin does not appear in tinymce, although I can see that it is called. Does anyone see Ive missed?
(function () {
tinymce.PluginManager.requireLangPack('prettifier');
tinymce.create('tinymce.plugins.PrettifierPlugin', {
init: function (ed, url) {
debugger;
ed.addButton('prettifier', {
title: 'prettifier.desc',
cmd: 'mcePrettifier',
image: url + '/img/prettifier.gif',
onclick: function () {
ed.focus(),
ed.selection.setContent('<pre class="prettifier">' + ed.selection.getContent() + '</pre>');
}
});
},
createControl: function (n, cm) {
return null;
},
getInfo: function () {
return {
longname: 'Code Prettifier plugin',
author: 'blah',
authorurl: 'http://blah.com',
infourl: 'http://blah.com',
version: "1.0"
};
}
});
debugger;
tinymce.PluginManager.add('prettifier', tinymce.plugins.PrettifierPlugin);
})();
thank
source
share