Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 WYSIWYG 窗口 4 接收用户的输入,因此他可以输入粗体、斜体等字体。如何存储这些数据,以便当我在其他页面上显示时,返回相同的字体样式和格式?
WYSIWYG 只不过是一个带有“Contenteditable”属性的 Div 标签,这将有助于捕获粗体、斜体等,并且您看到的内容是 html 的渲染版本。
如果您想获取 HTML,只需获取 contenteditable div 的 innerHTML,它将为您提供 html 代码。如果您需要更多帮助,请告诉我。
您可以创建一个名为 的类FontMetadata,并将数据存储在一个元组中,例如
FontMetadata
Tuple<Data, DataStyle>