2012-01-07 79 views
1

TinyMCE出現奇怪的問題。當我點擊光標到最後,根據行的長度,編輯器可以改變它的大小(寬度/高度)。Tinymce編輯器在不同長度的文本行上更改大小

這不會發生在演示中,我似乎無法找到我的選項與默認設置完全不同。

這裏是相同的文字,但不同大小的一個例子,當光標在每一行的末尾:

1.

2.

有其他人看到這種類型的行爲?

我的初始化代碼,因爲它是:

$('textarea.tinymce').tinymce({ 
     // Location of TinyMCE script 
     script_url : '/assets/modules/tiny_mce/tiny_mce_gzip.php', 

     // General options 
     mode : "textareas", 
     theme : "advanced", 
     plugins : "spellchecker", 
     editor_selector : "tinymce", 

     // Theme options 
     theme_advanced_buttons1 : "bold,italic,underline,strikethrough,|,formatselect,fontselect,fontsizeselect", 
     theme_advanced_buttons2 : "justifyleft,justifycenter,justifyright,justifyfull,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,forecolor,backcolor,spellchecker", 
     theme_advanced_buttons3 : "", 
     theme_advanced_buttons4 : "", 
     theme_advanced_toolbar_location : "top", 
     theme_advanced_toolbar_align : "left", 
     theme_advanced_statusbar_location : "bottom", 
     theme_advanced_resizing : false, 

     apply_source_formatting : true, 
     paste_auto_cleanup_on_paste : true, 
     paste_retain_style_properties : false, 
     paste_strip_class_attributes : true, 
     paste_remove_spans : true, 
     paste_remove_styles : true, 
     paste_remove_styles_if_webkit : true, 
     cleanup : true, 

     content_css : '/assets/modules/tiny_mce/themes/advanced/skins/default/myownstyle.css', 
+0

這是否發生在tinymce演示頁上? – Thariama 2012-01-09 11:36:07

+0

正如我在發帖中所說的。沒有這樣的演示沒有發生。我想我知道這個問題是什麼,但是我遇到了技術上的困難,並且不能將這個帖子標記爲答案。 – PaulM 2012-01-09 13:20:55

回答

0

從我能確定這再次尋找。

如果我有:

apply_source_formatting : false, 
    /*paste_auto_cleanup_on_paste : true, 
    paste_retain_style_properties : false, 
    paste_strip_class_attributes : true, 
    paste_remove_spans : true, 
    paste_remove_styles : true, 
    paste_remove_styles_if_webkit : true,*/ 
    cleanup : true, 

ed.onInit.add(function(ed) { 
      ed.pasteAsPlainText = true; 
     }); 

然後文本進來格式化,也對文本的不同部分點擊時不改變編輯器的大小。

這對我來說很好。我不太爲獲取粘貼的格式而煩惱。

相關問題