1

バックエンドからCKEditorへの入力を設定しています。段落値のセットを指定すると、自動的に。が挿入されます<p>&nbsp;</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&iuml;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&#39;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>
&nbsp;</p>

私はその余分なことを避けたいです<p>&nbsp;</p>

そして、私は以下のコードを使用しましたが、使用しません。

CKEDITOR.on( 'instanceReady', function( ev )
{
    ev.editor.dataProcessor.writer.setRules( 'p',
        {
            indent : false,
            breakBeforeOpen : false,
            breakAfterOpen : false,
            breakBeforeClose : false,
            breakAfterClose : false
        });
});

誰かが私を助けることができますか。

4

1 に答える 1

2

HTMLが無効です!;)

HTMLでは、段落をネストすることはできません。これを試して、すべてが正常であることを確認してください(ゴーストなし&nbsp;):

<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>
于 2012-10-04T15:44:15.593 に答える