1
我從後端設置CKEditor的輸入。當我給出一組段落值時,它會自動插入<p> </p>
。我如何避免這種標籤的插入。如何避免在CKEditor中自動插入<p> </p>?
<p>A wolf wants to eat the girl but is afraid to do so in public. He approaches the girl, and she naïvely tells him where she is going. <p>He suggests the girl pick some flowers, which she does. In the meantime, he goes to the grandmother's house and gains entry by pretending to be the girl.</p> He swallows the grandmother whole, and waits for the girl, disguised as the grandmother.</p>
加載到編輯器之後它改變成:
<p>
A wolf wants to eat the girl but is afraid to do so in public. He approaches the girl, and she naïvely tells him where she is going.</p>
<p>
He suggests the girl pick some flowers, which she does. In the meantime, he goes to the grandmother's house and gains entry by pretending to be the girl.</p>
<p>
He swallows the grandmother whole, and waits for the girl, disguised as the grandmother.</p>
<p>
</p>
我想避免額外的<p> </p>
。
而我已經使用下面的代碼,但沒有用。
CKEDITOR.on('instanceReady', function(ev)
{
ev.editor.dataProcessor.writer.setRules('p',
{
indent : false,
breakBeforeOpen : false,
breakAfterOpen : false,
breakBeforeClose : false,
breakAfterClose : false
});
});
任何一個可以幫助我..
謝謝你的答案。 – Ramesh