Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JavaScript WYSIWYG Rich Text Editor

What is the basic method of styling text inside input boxes? Can you show me the most simple example of how to change text color separately?

like image 937
Denis Bobrovnikov Avatar asked Dec 17 '25 04:12

Denis Bobrovnikov


1 Answers

Very simply:

window.document.designMode = “On”;

document.execCommand(‘ForeColor’, false, ‘red’);

For more detail:

http://shakthydoss.com/javascript/html-rich-text-editor/

and then

http://shakthydoss.com/javascript/stxe-html-rich-text-editor/

like image 78
shakthydoss Avatar answered Dec 19 '25 18:12

shakthydoss



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!