これが私が見つけた回避策です。私にとって素晴らしい作品
tinyMCE.PluginManager.add('FormatingToolbarButtons', function (editor, url) {
['pre', 'p', 'code', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6'].forEach(function (name) {
editor.addButton("style-" + name, {
tooltip: "Toggle " + name,
text: name.toUpperCase(),
onClick: function () {
if (this.active()) {
editor.execCommand('mceToggleFormat', false, name);
this.active(false)
}
else {
editor.selection.setContent('<' + name + '>' + editor.selection.getContent() + '</' + name + '>');
this.active(true)
}
},
onPostRender: function () {
var self = this, setup = function () {
editor.formatter.formatChanged(name, function (state) {
self.active(state);
});
};
editor.formatter ? setup() : editor.on('init', setup);
}
})
});
});