Reputation: 61
How do I build a very simple rich textbox using javascript or jquery to make selected text bold ?
< textarea id="editor">< /textarea>
< input type="button" onclick="bold()" value="Bold selected" />
Here, the text should be appeared to be really bold but not between < b> and < /b> tag. I mean actually like we are editing in wordpress or other rich textbox.
Upvotes: 3
Views: 11613
Reputation: 570
The WYSIWYG
editor plugins don't actually use a textarea
.They use an editable div
which makes it possible to show rich text .
These links should help you get started:
Upvotes: 5
Reputation: 7769
You cannot make just a selected text inside a textarea
to be bold
unless you use some plugins (if exist) or create your own. But instead of inventing the wheel, just use free editors like codemirror or ckeditor
Upvotes: 1