我遇到問題,可能是由於TinyMCE。如何使用TinyMCE和jQuery將<textarea>中的文本
我想用jQuery將文本置於標記中。
這是我的代碼:
$(".page").change(function(){
tinyMCE.triggerSave(true, true);
$(".description").val("my text");
});
你有一個答案?
我遇到問題,可能是由於TinyMCE。如何使用TinyMCE和jQuery將<textarea>中的文本
我想用jQuery將文本置於標記中。
這是我的代碼:
$(".page").change(function(){
tinyMCE.triggerSave(true, true);
$(".description").val("my text");
});
你有一個答案?
試試這個。
$('.description').tinymce().execCommand('mceInsertRawHTML', false, "my text");
事情是這樣的:
$(".page").change(function(){
var ed = tinyMCE.get(0);
var contents = ed.getContent();
tinyMCE.triggerSave(true, true);
$('.description').val(contents);
});
的問題是還活着:( – bahamut100 2010-02-18 21:22:28
它不工作:( – bahamut100 2010-02-18 20:22:33