How can I show HTML formatting inside a text box?

I have a code that allows me to format text in a text box with bold, underline, underline, or italics. But it displays html tags instead of the actual formatting. I know, as soon as I output it inside the div, it will be formatted, but I want to show the formatting while the user writes the text.

How to enable formatting? JavaScript is fine, I'm using jQuery at the moment. I would prefer not to use the WYSIWYG editor if there is another option.

Thanks for any help.

+5
source share
5 answers

contentEditable div

 <div contentEditable="true"> 
 </div

, , , .

+14

; , , , " " div / . onKeyUp, div, , . , , , , , WYSIWYG.

, contentEditable + WYSIWYG, , , IMHO.

+2

, div html, , . Javascript .

, , , SO? , , WYSIWYG.

0

Textarea, wysiwyg - . . :

Devgurus wysiwyg

0

All Articles