html - TextArea: preserve color and size of pasted text -
i have textarea in form. user should paste there different text comes other parts of web or other webs. (so not know color or size of text. cannot control origin of text either) there way preserve information of color , size of original text when pasted in textarea?
(i use jquery or php if necessary)
here have example simplified help:http://jsfiddle.net/nbkvb/
css:
h1 { color:blue; font-family:verdana;font-size:20px; } p { font-family:verdana; font-size:15px; }
html:
<form action='html-normal.php' method='post'> <textarea name='texthtml' rows='15' cols='60'></textarea> <br/> <input type='submit' value='submit' /> </form> <div id=" "> <h1>some title</h1> <p>some text, text, text, text, text, text, text, text, text, text, text, text, text,</p>
textarea desgined plain text only. if want able copy/paste rich text(html) need use div contenteditable="true"
instead of textarea
Comments
Post a Comment