无法看到换行符< BR>突出显示时 [英] Cannot see line break <BR> when highlighted
问题描述
我希望它能像MS Word一样
(更新:早前输入错误 - 指出的语法错误)
顺便说一句,
< div contenteditable ='true'> < DIV> <跨度><峰; br />< /跨度> < / div>< / div>
< br>
标记之后。 < div contenteditable ='true'>< div>< h4> test 1< / h4>< span>测试< / span>测试< / span> < / div>< div>< h4> test 2< / h4>< span>测试& nbsp;< br>测试< / span>< / div>< div> < h4> test 3< / h4>< span> test< / $ c $< / div>测试< / span>< / div><
更新:
$ b $ b 这可以起作用,因为就像MSWord一样,您应该为新行添加空格(& nbsp;
用于HTML )。因此,您可以突出显示文本并查看新行。
In a div content editable, when highlighting, I can't see the thickness of the BR just like this:
I want it to be like this in MS Word
(Updated: Typo earlier -- wrong syntax as pointed out)
By the way, the <BR>
is enclosed like this
<div contenteditable='true'>
<div>
<span><br/></span>
</div>
</div>
Should I use CSS to set BR's thickness? or there's another way? Please shed some light.Thanks!
解决方案 Put
after <br>
tag.
<div contenteditable='true'>
<div>
<h4>test 1</h4>
<span>test
<br/>
<br/>
test
</span>
</div>
<div>
<h4>test 2 </h4>
<span>test
<br>
<br>
test
</span>
</div>
<div>
<h4>test 3</h4>
<span>test
<br/>
<br/>
test
</span>
</div>
</div>
UPDATE :
This works, because just like MSWord, you should put white space for a new line (
for HTML). So you can highlight the text and see the new lines.
这篇关于无法看到换行符< BR>突出显示时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!