我需要在 contenteditable div 中显示段落标记、空格和其他格式标记,就像在 MS Word 中一样,方法是按格式标记按钮 Formatting Marks button http://blogs.mccombs.utexas.edu/the-most/files/2011/04/show-hide-button-in-outlook.jpg
有没有简单的方法可以做到这一点?
最佳答案
<html>
<head>
<style>
span::after{
color:black;
content:"\00b6";
}
p::after{
color:black;
content:"\00b6";
}
</style>
</head>
<body>
<h3>
<span class="label">This is the main label</span>
<span class="secondary-label">secondary label</span>
</h3>
<P>Quote me</p>
</body>
</html>
关于html - 在内容可编辑的 div 中显示段落标记、空格和其他格式标记,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25154954/