Search code examples
javascripthtmlwysiwygwysihtml5

In HTML, is it possible to partially format <input> or <textarea> box?


Is it possible to partially format text in an <input> or a <textarea> box ? When writting an email with Gmail, the content of the message can be formatted as in the following example:

Example of formatted text in Gmail

I know that I can find existing JS libraries to write message like in Stack Overflow, but I would prefer something like Gmail (WYSIWYG).


Solution

  • It is not possible. All the WYSIWYG redactors uses the contentEditable attribute on <div> (or another element) and the execCommand JS API to format the editor content.