この後、優先リストの一番上になかったので、しばらくそのままにしておきました。今ではそれが私のリストの最後のものであり、tinyMCEとそれをコード化することでより多くの作業を行ったため、私はすぐに解決策を見つけました。
ルートeditor_template.jsに移動する必要があると思いました。これは、画像がアクティブに設定されていたため、変更する必要がありました。
私のyoutubeの画像(そして今ではvimeoも)には、それがyoutubeなのかvimeoのビデオなのかを教えてくれる代替属性があります。次に、これらのプラグインのいずれかを無効にする必要があります。
このコード(すべてのimgタグのアクティブ状態を設定する)の後に1117行目に配置しました。
p = getParent('IMG');
if (c = cm.get('image'))
c.setActive(!co && !!p && n.className.indexOf('mceItem') == -1);
そして私のコード:
if(ed.selection.getNode())
if(ed.selection.getNode().getAttribute('alt') === 'videoYoutube' || ed.selection.getNode().getAttribute('alt') === 'videoVimeo') // Get the current selection in the editor and compare
{
cm.setDisabled('image', true); // Change disable state
cm.setActive('image', false); // Change active state state
}
else
{
cm.setDisabled('image', false);
}
if(ed.selection.getNode().getAttribute('alt') === 'videoYoutube')
{
cm.setDisabled('addvimeo', true);
}
else if(ed.selection.getNode().getAttribute('alt') === 'videoVimeo')
{
cm.setDisabled('addyoutube', true);
}
else
{
cm.setDisabled('addvimeo', false);
cm.setDisabled('addyoutube', false);
}