I don't know how to save font size or color on the web

Asked 2 years ago, Updated 2 years ago, 54 views

We are building a personal blog using node.js and Mongodivi.

When posting a blog, there is no problem with the enter or space bar in the article when you select it from the string and save it as &nbsp via regular expression in db, and to enter and reload it.

I don't know how to save fonts or colors of letters. For example, if you look at Naver Blog alone, you can use various functions such as changing the thickness of fonts, various colors, and letters, and you can even put pictures in posts to post.

I don't know how to implement that function. Help me.

node.js html5 html javascript

2022-09-22 20:11

1 Answers

When you look at the Wizwick Editor, the text you create is converted into an HTML tag.

For example, if the author wrote a bold "hello world" in red letters in the editor:

<p><span style="color: red; font-weight: bold;">hello&nbsp;world</span></p>

This is how it's converted and stored in a database.

I hope it's helpful.


2022-09-22 20:11

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.