我想在javascript中的selectbox的onchange事件的觸發器上添加一些內容來填充tinymce主體。我嘗試了一些東西,但它確實不適合我,請引導我向正確的方向發展。 這裏是我的代碼,在附加textarea的如何在JavaScript事件的觸發器上添加一些內容的tinymce?
$(function() {
appendTinyMCE();
function appendTinyMCE(){
tinyMCE.init({
// General options
mode : "textareas",
theme : "advanced",
plugins : "preview",
// Theme options
theme_advanced_buttons1 : "forecolor,backcolor,|,justifyleft,justifycenter,justifyright,justifyfull,bullist,numlist,|,formatselect,fontselect,fontsizeselect,sub,sup,|,bold,italic,underline,strikethrough",
theme_advanced_buttons2 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});}
})TinyMCE的;
下面是HTML代碼
<td>
<textarea rows="15" name="MyTinymceContent" cols="90" >MyTestContent</textarea>
現在我想填充新的內容TinyMCE的,在JavaScript的選擇框的變化。所以我寫一篇關於選擇框
function populateMyTinyMCE() {
document.form.MyTinymceContent.value ="MyNewContent";
}
的變化 下面的代碼片段,但它並沒有放在TinyMCE的身體新的內容。我不確定我在這裏錯過了什麼?
+1準確和詳盡的問題 – Thariama 2012-07-17 11:12:25