我的網站上有一個簡單的TinyMCE編輯器設置。我也有一個簡單的圖像庫白色每個圖像下的鏈接。我已經想出了在按下鏈接時如何打開高級圖像對話框,但我想將圖像的URL作爲圖像的源代碼傳遞給它。我知道這是可能的,而且我在TinyMCE論壇上看到了很多鏈接,但都指向Wiki並因爲某些原因被打破。我總是在這裏結束:http://tinymce.moxiecode.com/wiki.php。將參數傳遞給tinyMCE AdvImage
這是我如何配置TinyMCE的:
tinyMCE.init({
theme : "advanced",
skin : "cirkuit",
mode : "textareas",
language : 'sl',
plugins : "pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template",
theme_advanced_buttons1 : "newdocument,|,styleselect,formatselect,fontselect,fontsizeselect",
theme_advanced_buttons2 : "bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,cut,copy,paste,pastetext,pasteword,|,search,replace",
theme_advanced_buttons3 : "bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,cleanup,code,|,forecolor,backcolor",
theme_advanced_buttons4 : "image,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,|,fullscreen",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true,
theme_advanced_resize_horizontal : false,
extended_valid_elements : "img[class|src|border=0|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name]",
width : 520,
height: 500
});
,我用它來打開對話框:
tinyMCE.activeEditor.execCommand('mceAdvImage');
我知道這是一個愚蠢的問題,但請幫助我。
+1清楚的問題 – Thariama