我有一个简单的问题,我有一个文本区域,我在 jquery 中为其分配了文本。这是带有一些行空格等的纯文本。这里是一个文本示例
Brand new!!!
Huge size of 3 bedroom apartment located in Dubai Marina Orra tower for rent
Situated on high floor, overlooking a gorgeous view of Marina
现在当我分配给textarea时,它和上面一样。这是我分配的代码
$("#description").val(val);//val is above text
现在当我应用tinymce时,它变成了这样
Brand new!!! Huge size of 3 bedroom apartment located in Dubai Marina Orra tower for rent Situated on high floor, overlooking a gorgeous view of Marina
空格线打破了一切丢失。这是我的tinymce代码
$().ready(function() {
$('#description').tinymce({
// Location of TinyMCE script
script_url : 'application/views/tinymce/jscripts/tiny_mce/tiny_mce.js',
// General options
width : "830",
height: "300",
theme : "advanced",
theme_advanced_toolbar_align : "left",
theme_advanced_statusbar_location : "bottom",
theme_advanced_toolbar_location : "top",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,bullist,numlist,",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
theme_advanced_buttons4 : "",
force_br_newlines : true,
force_p_newlines : false,
gecko_spellcheck : true,
forced_root_block : '', // Needed for 3.x
plugins : "paste"
});
});
为什么我的文字变形?小提琴