久しぶりにTinyMCEをカスタマイズする案件があり、以下のカスタマイズを行いました。
bタグがstrongに変換されないようにする
| 1 2 3 4 | extended_valid_elements: 'b', formats:{   bold:[{inline:"b",remove:"all"}], }, | 
見出しの選択肢をカスタマイズする
| 1 | block_formats: "見出し1(h2)=h2;見出し2(h3)=h3;見出し3(h4)=h4", | 
※見出しをツールバーに出すのは「formatselect」
下線をstyleではなくuで追加する
| 1 2 3 | formats:{   underline:[{inline:"u",remove:"all"}] }, | 
Bとは別でstrongボタンを作る
| 1 2 3 4 5 6 7 8 9 10 | setup: function(editor) {   editor.addButton('strong', {     text: 'STRONG', // 「強調」とかでもいい     onclick: function() {       let editor = tinymce.activeEditor;       let html = editor.selection.getContent();       editor.insertContent( '<strong>' + html + '</strong>' );     }   }); }, | 
(ツールバーに「strong」を追加)
設定はすべて
| 1 | tinymce.init({}); | 
の中に書きます。
