English 中文(简体)
完全拆除JQuery tinyMCE
原标题:Completely remove 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
});

以上法典是完美的。 问题在于我试图去除小孔径。

我删除的法典是:

$( #text ).tinymce().execComm以及( mceRemoveControl , false,  text );

我还尝试:

$( #text ).remove();

以及

$( #text ).tinymce().remove();

第一点似乎没有做任何事情。 最后两点给我这个错误:

参考书:t

尽管紫外线是用超文本文件装载的,但我正在用以下文字装载另一个文字:

$.getScript(viewPath +  /mod/adminContent/js/editContent.js , function(){
    initEditContent(popup);
});

人口是指装满微粒的人群。 这只是用 j子制造的iv。 div的成分是用jquery ajax装载的。

editContent.js认为:

var contentID;
function initEditContent(popup){
    contentID = $( #contentID ).val();

    tinyMCE.execComm以及("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" />&nbsp;Please wait...</div> );
        },

        // Once submit completed
        success: function(responseText){
            tinyMCE.execComm以及("mceRemoveControl", true,  text );
            //closePopup(popup);

            // Update button with new data
            $( #  + contentID).html(responseText);
        }
    });
}
问题回答

问题已经解决。 对于有兴趣的人,我用超文本文件装上了中枢,然后当我需要开首时,我确实:

tinyMCE.init({
    mode : "textareas",
    // 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,

    oninit: function(){
        alert( tinyMCE loaded );
    }
});

上述法典每当需要中校编辑时就被称作。 我随后在我这样说的时候就去了:

tinyMCE.remove( text );

审判

$( #text ).tinymce().execCommand( mceRemoveControl , true,  text );

页: 1

<textarea id= text  .....




相关问题
getGridParam is not a function

The HTML: <a href="javascript:void(0)" id="m1">Get Selected id s</a> The Function: jQuery("#m1").click( function() { var s; s = jQuery("#list4").getGridParam( selarrrow )...

selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

jQuery cycle page with links

I am using the cycle plugin with pager functionality like this : $j( #homebox ) .cycle({ fx: fade , speed: fast , timeout: 9000, pager: #home-thumbs , ...

jquery ui dialog opens only once

I have a button that opens a dialog when clicked. The dialog displays a div that was hidden After I close the dialog by clicking the X icon, the dialog can t be opened again.

jConfirm with this existing code

I need help to use jConfirm with this existing code (php & Jquery & jAlert). function logout() { if (confirm("Do you really want to logout?")) window.location.href = "logout.php"; } ...

Wrap text after particular symbol with jQuery

What I m trying to do, is wrap text into div inside ll tag. It wouldn t be a problem, but I need to wrap text that appears particularly after "-" (minus) including "minus" itself. This is my html: &...

热门标签