Page 1 of 1

JavaScript Editor

Posted: Sat Jul 03, 2010 10:41 am
by hemi19
Hi All,


Can anyone tell is it possible to create a editor only depending on the JavaScript without the help of Iframe or ContentWindow.
For Example see this

http://ckeditor.com/demo
(the above link uses IFRAME)
can i have exactly like this.

I dont want in a way like that keeping one textarea above and the box below and when i select some text and click on bold displaying in the second box.

I want everyhting should happen in the same textarea or anything like without the help of IFRAME or ContentWindow. If it is possible please help me out

Re: JavaScript Editor

Posted: Sat Jul 03, 2010 7:14 pm
by PHPHorizons
A textarea element in HTML is very limiting. You cannot have styling inside a textarea (like bold, italic, different font sizes), so you probably cannot do what you want to do.

In other words, the entire textarea can be bold, but you cannot bold individual portions of it.

Re: JavaScript Editor

Posted: Sun Jul 04, 2010 3:38 am
by hemi19
PHPHorizons wrote:A textarea element in HTML is very limiting. You cannot have styling inside a textarea (like bold, italic, different font sizes), so you probably cannot do what you want to do.

In other words, the entire textarea can be bold, but you cannot bold individual portions of it.


ok is there any way without using textarea

Re: JavaScript Editor

Posted: Sun Jul 04, 2010 1:52 pm
by kaszu
Using HTML5 contentEditable attribute, it's supported even by IE7, but it will be almost the same as using iframe, where instead of iframe will be DIV (http://nicedit.com/).