i want to create a comment box like this website for my forum
can any one help me to solv tis code
Post your relevant code, describe the issue you are having to help solve your problem.
yes jorgem you got my point.i want to create a textarea and a button by which i can make the selected text bold.
My thought is display a textarea element, a button, and then a div for the preview.
Call a function when you click on a button, and in the function use the values of the selectionStart and selectionEnd properties of the textarea and assign that to a string. Then take the string and wrap that string with
<b> tags for bold, display it in the preview div...
I don't think you can directly show the bold effect in the textarea. As JorgeM mentioned, you should manipulate the content in a seperate div tag or paragraph in order to display the change. So you should have another button called preview textarea.