English 中文(简体)
在加固CKEditor的习俗标签后,白色空间被 tri平。
原标题:white space get trimmed after adding custom tags in CKEditor
function sidebar(editor)
{   
    var selection = editor.getSelection();
    if(selection.getSelectedText()!="")
    {       
        var range = selection.getRanges();  
        var customNode = editor.document.createElement(  cdl:sidebar  );
        var extractedContent = range[0].extractContents();
        customNode.append(extractedContent);
        var sidebarHolder = editor.document.createElement("sidebarHolder");
        sidebarHolder.append(customNode);
        var nodeHtml = sidebarHolder.getHtml();
        editor.insertHtml(nodeHtml+" ");        
    }  
    else {
        showErrorMessage("Selection is not proper");
    }   
}

这是我的法典。 在加插标签后,在“请张贴评论或更正”表中选择“请”一词。 “Please Post”之间的空间已经平息。 但是,在选择“请”时,该守则是正确的。 而且,如果说主角不能在编辑中看到,就应当在来源小组中看到。

最佳回答

Try appending html to ckeditor instance but add text.

问题回答

暂无回答




相关问题
Unicode generated by toEscapedUnicode method is without spaces

For this word चौरेउत्तमयादव the Unicode is==> u0938u0941u0916u091Au0948u0928u093Eu0928u0940 u0930u0940u091Du0941u092Eu0932 u091Cu093Fu0935u0924u0930u093Eu092E and look it has ...

Problems with space within parameters of a php function

Sorry for not formatting my code. the toolbar was gone... I want to insert some data into a mysql db. I ve wrote a function in php: function add_ID($ID, $token) { $add = "INSERT INTO ids (ID, ...

True tablespace size in oracle

I need to know true tablespace size in Oracle. I have some tablespace and I need to know how many space it uses now and how many space is free (and maybe percent of free space). I found in web some ...

Java/Graphics: Plotting 3d coordinates?

I m coding a programm, that will produce 3d coordinates for a rocket and I would like to do a rudimentally graphic output for this. it just has to be scaleable and rotationable, so that you can ...

MySQL query to replace spaces in a column with underscores

I have a MySQL database table photos with a column filename . I need to replace the spaces in the filename column values with underscores. Is it possible with a single/multiple query? If so how?

热门标签