Click here to Skip to main content
15,074,668 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
Hello Friends,

how to type the text in bold ..after clicking the bold button..

Not only bold..i want it in italic,underline,font color...

i want it in customize button .canu please help me.
Posted
Updated 25-Apr-21 8:33am

This is done using css properties font-weight etc - http://www.w3schools.com/cssref/pr_font_weight.asp[^].
Multi-line - https://css-tricks.com/multi-line-padded-text/[^]
   
v2
Comments
Sergey Alexandrovich Kryukov 16-Nov-15 12:38pm
   
This is not what the inquirer wants. This is a re-post question; in the previous question, the problem is formulated better. Please see Solution 2.
—SA
The question is not clear. It's possible that you want edit not just text, but formatted text. Say, part of text would be bold, some other part have different font style of size, different indent, and so on.

Such editors are created based not on input control (what you call "textbox" is actually the input element), but some element, such as div with the attribute contenteditable:
https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_Editable[^],
https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/contentEditable[^].

Such elements can be edited by the users. You can also have some controls which modify the style properties of the selected fragment of text using JavaScript. This is the way to developed the behavior like in other the formatted document editors.

This is a good example of one of such products: open-source TinyMCE:
https://en.wikipedia.org/wiki/TinyMCE[^],
http://www.tinymce.com/[^].

There are many more: https://en.wikipedia.org/wiki/Comparison_of_HTML_editors[^].

—SA
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900