我正在角度使用PrimeNG Quill p-editor
。默认情况下,羽毛笔修剪额外的空间。如何在羽毛笔中保留编辑器中的额外空间?
E.g。 - 模型绑定属性 - text ="嗨,我是Angular"
编辑中的输出 - "嗨我是Angular"
期待编辑 - "嗨,我是Angular"
全文示例:
<p>Data & control</p><ul><li>Comply with Our Code, How do we manage business </li><li>Provide proactive identification and effective management and/or escalation of conduct risk to deliver key customer outcomes</li><li>Own, manage and supervise risks within the business area, ensuring mechanisms are in place to identify</li><li>Ensure risk practices and behaviour are consistent with the target risk culture where work collaboratively with others</li></ul>
答案 0 :(得分:0)
Quill配置中可能有一个选项,但如果没有,您可以用
替换字符串模型前面的空格:
this.text = "<p> Desk Strategist </p><ul><li> value 1</li><li>Value 2 </li><li> Value 3</li><li></ul>";
this.text = this.text.replace(/\s/g, ' ');
请参阅Plunker
答案 1 :(得分:0)
您可以使用主轴参数saveWhitespace。 将preserveWhitespace设置为true。
while (!cancellationToken.IsCancellationRequested)
{
ConsumeResult<string, string> consumeResult = _consumer.Consume(cancellationToken);
... processing here
_consumer.Commit(consumeResult);
}