本文介绍了在contenteditable div中显示段落标记,空格和其他格式标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在MS Word中按照格式标记按钮

有没有简单的方法来达到这个目的?

解决方案

创建一个以段落标记的形式将空格绘制为点和换行符的字体可以解决您的问题。



在代码中,它看起来像

  .editable-div { 
font-family:您的自定义字体,空格为点和东西,实际字体字体;
}

这篇文章阐述了这种方法


I need to show paragraph marks, spaces and other formatting marks in a contenteditable div as you can in MS Word by pressing the Formatting Marks button Formatting Marks button http://blogs.mccombs.utexas.edu/the-most/files/2011/04/show-hide-button-in-outlook.jpg

Is there a simple way to achieve this?

解决方案

Creating a font which draws spaces as dots and newlines as paragraph marks should solve your problem.

In code it will look like

.editable-div {
    font-family: "Your custom font with spaces as dots and stuff", "Actual character font";
}

Here's an article which elaborates on this approach http://www.sitepoint.com/joy-of-subsets-web-fonts/

这篇关于在contenteditable div中显示段落标记,空格和其他格式标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-06 03:35