我在使用TinyMCE时遇到了一个奇怪的问题。当我单击光标到最后时,根据行的长度,编辑器可能会改变它的大小(宽度/高度)。
演示不会发生这种情况,我似乎无法找到我的选项与默认选项的根本区别。
以下是当光标位于每行末尾时相同文本但大小不同的示例:
还有其他人看过这种行为吗?
我的初始化代码:
$('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 :(得分: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;
});
然后文本进入未格式化状态,并且在单击文本的不同部分时也不会更改编辑器的大小。
这对我来说没问题。我并不太关心捕获粘贴的格式。