を削除:完全に私はそうのようなTinyMCEのを初期化しているjQueryのTinyMCEの
は$('#text').tinymce({
// Location of TinyMCE script, optional, already loaded in page.
script_url : '../adminContent/js/tiny_mce/tiny_mce.js',
// General options
theme : "advanced",
plugins : "table,advimage,advlink,iespell,inlinepopups,preview,contextmenu,paste,visualchars",
// Theme options
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,forecolor,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image",
theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,removeformat,cleanup,code,|,preview,tablecontrols,|,hr,visualaid,|,charmap,iespell",
theme_advanced_buttons3 : "",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_resizing : true
});
上記のコードは完璧に動作します。問題は、私がtinyMCEを取り除こうとするときです。
マイ削除コードは次のとおりです。私も試した
$('#text').tinymce().execCommand('mceRemoveControl', false, 'text');
:
$('#text').remove();
と
$('#text').tinymce().remove();
最初のものは何もしていないようです。最後の二つは私に、このエラーを与える:
$.getScript(viewPath + '/mod/adminContent/js/editContent.js', function(){
initEditContent(popup);
});
ポップアップがTinyMCEのがロードされるポップアップへの参照です:TinyMCEのは、HTMLドキュメントによってロードされているが
Uncaught ReferenceError: t is not defined
は、私が使用して別のスクリプトをロードしています。これは単にjqueryを使って作成されたdivです。 divの内容は、jquery ajaxを使用してロードされます。
はeditContent.jsは、次のようになります。
var contentID;
function initEditContent(popup){
contentID = $('#contentID').val();
tinyMCE.execCommand("mceAddControl", true, 'text');
setTimeout(reposition, 50);
setTimeout(reposition, 150);
setTimeout(reposition, 250);
// Submit form
$('#editTextForm').ajaxForm(
{
// Before submit
beforeSubmit: function(){
//setPopupMessage(popup, '<div id="loading"><img src="../../img/loading.gif" /> Please wait...</div>');
},
// Once submit completed
success: function(responseText){
tinyMCE.execCommand("mceRemoveControl", true, 'text');
//closePopup(popup);
// Update button with new data
$('#' + contentID).html(responseText);
}
});
}
'.tinymce()削除()'トリックを行う必要があります。問題が再現された[jsFiddle](http://jsfiddle.net)にテストケースを投稿できますか? – mekwall
私は初期の質問を編集して詳細を教えてくれました。 jsFiddleを使用することはできません。必要な外部部品が多すぎるため、恐れがあります。 – JPardoe
と呼ばれるtinyMCE.remove(); 「Uncaught TypeError:tiny_mce_src.jsの11264行の 'undefinedのID'プロパティを読み取れません。 – JPardoe