段落标签不能断行(django,ckeditor)

时间:2018-08-17 15:25:40

标签: html django django-templates ckeditor

我们网站的用户在保存故事格式时遇到麻烦。他们正在使用ckeditor字段上传故事。这是原始输入:

<p style="margin-left:0in; margin-right:0in"><span style="color:#191c1f">I asked him what his tattoo meant. It was a cartoon mouse with a bandit mask. </span></p>

<p style="margin-left:0in; margin-right:0in">&nbsp;</p>

<p style="margin-left:0in; margin-right:0in"><span style="color:#191c1f">He&rsquo;s meant to be me, he said.</span></p>

<p style="margin-left:0in; margin-right:0in">&nbsp;</p>

<p style="margin-left:0in; margin-right:0in"><span style="color:#191c1f">* * *</span></p>

<p style="margin-left:0in; margin-right:0in">&nbsp;</p>

<p style="margin-left:0in; margin-right:0in"><span style="color:#191c1f">The first time I slept with someone else, he found out the next day.</span></p>

<p style="margin-left:0in; margin-right:0in">&nbsp;</p>

<p style="margin-left:0in; margin-right:0in"><span style="color:#191c1f">I didn&rsquo;t know we were exclusive, I said.</span></p>

<p style="margin-left:0in; margin-right:0in">&nbsp;</p>

<p style="margin-left:0in; margin-right:0in"><span style="color:#191c1f">You didn&rsquo;t know we were exclusive.</span></p>

<p style="margin-left:0in; margin-right:0in">&nbsp;</p>

<p style="margin-left:0in; margin-right:0in"><span style="color:#191c1f">Yes.</span></p>

这是输入的显示方式: “我问他的纹身是什么意思。那是一只戴着土匪面具的卡通老鼠。

他说的是要成为我。* * *

我第一次和别人一起睡,第二天他就知道了。

我不知道我们是排他性的。您不知道我们是排他性的。是的。“

网页上的html看起来与源html相同。每当我从网站复制文本时,格式都是正确的,我必须手动使其看起来像网站上的文本。

我在CSS中尝试过此操作:

word-wrap: break-word;
margin-bottom: 1em;

我还在config.js中一次为ckeditor尝试了所有这些方法:

config.copyFormatting_allowRules = true;
config.allowedContent = true;
config.FormatSource = false;

0 个答案:

没有答案