2
如何從這個插入圖像tiny_mce插入/編輯圖像自定義HTML
時改變HTML輸出:
<img title="?" src="?" alt="?" width="xxx" height="xxx" />
到這一點:
<a href="?" rel="?" title="?"> <img src="?" alt="?"></a>
如何設置變量。
如何從這個插入圖像tiny_mce插入/編輯圖像自定義HTML
時改變HTML輸出:
<img title="?" src="?" alt="?" width="xxx" height="xxx" />
到這一點:
<a href="?" rel="?" title="?"> <img src="?" alt="?"></a>
如何設置變量。
找到我自己的答案。 我編輯tiny_mce \插件\的advimage \ JS \ image.js
ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.createHTML('img', args), {skip_undo : 1});
到
ed.execCommand('mceInsertContent', false, tinyMCEPopup.editor.dom.setHTML(tinyMCE.activeEditor.dom, '<a href="'+ foo +'" rel="lightbox[article]" title="'+ args['title'] +'"> <img src="'+ args['src'] +'" alt="'+ args['title'] +'"></a>'), {skip_undo : 1});