I'm making a php mysqli forum, and i would like users to be able to style their posts so it doesn't look so dull.

I want some basic buttons, like [Header1,Header,Header3,Normal,] and also [italic,bold,underlined]

I now have two questions,

1. How do I make the buttons and style the textarea?

How do i get styled text into a mysql db?

Thanks in advance.

Daniel Holst

有帮助吗?

解决方案

Use things like TinyMCE, it as all the things you need and manymore. It will make you textarea a full richtext editor. You can't do it as is without any javascript. You can use another editor.

To get styled texte from you database, you need to save the text with the formatting before restoring it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top