私はこの問題を抱えています:私のサイトにはtinymceのテキストエリアがあり、すべてのtextareaを正しく表示できますが、textarea内でカラーボックスを開くと、これはtinymceプロパティを継承しません。これは、カラーボックスを開くための私のコードです。
$("#edit_item"+val.iditem).colorbox({
href: $(this).attr('href'),
data: data,
onComplete: function(){ setup_tiny(); }
});
これは私の関数'setup_tiny'です:
function setup_tiny(){
tinyMCE.init({
mode : "exact",
elements : "description",
width : "40%",
height: "200",
// General options
theme: "advanced",
// Theme options
theme_advanced_buttons1: "bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull",
theme_advanced_buttons2: "bullist,numlist,separator,outdent,indent,separator,undo,redo,separator,link,unlink,anchor,image,cleanup,help,code",
theme_advanced_buttons3: "hr,removeformat,separator,sub,sup,separator",
theme_advanced_buttons4: "",
theme_advanced_toolbar_location: "top",
theme_advanced_toolbar_align: "left",
theme_advanced_resizing: true
});
}
カラーボックスを読み込んだ後、この方法を試しました。
tinyMCE.execCommand('mceFocus', false, 'the_textareas_id_here');
tinyMCE.execCommand('mceRemoveControl', false, 'the_textareas_id_here');
しかし、それはうまくいきません。また、このサイト'http://mktgdept.com/jquery-tinymce-plugin'からtinymceプラグインをインポートしようとしましたが、これも機能しません。
カラーボックス内にtinymceをロードするにはどうすればよいですか?ありがとう