Hi,
I’m a new member this forum, and i have a issue.
I’m building a editor style WYSIWYG, and i’m doing the editable area…
When the user type a word, like int, this word receive a styling, for example, bold and color: blue.
But i’m with some troubles:
DIV Editable: Recently, i discover a div property : content Editable. It allow I edit the content of the div, like a textarea, but it continues with the properties of a div; … I tried replace the word searched, in this case ‘int’, e replace by formatted word. But when i do this, my cursor (caret) going to begin of the div (it should stay where the user typed that word…)… Troubles, troubles, troubles…
Textarea: Do not support css to single words, just for all text.
Iframe: Finally, i thought i saw a small light… Theorically, i can do it, because inside a frame has a HTML, that support “all things”… But, i can’t capture the ‘onkeydown’ event (and many others events). This way, i can’t control the new words that are typing.
The question is: What i do? What i use? Anyone know another object that do what i want? Anyone know how to fix above troubles?
Since yet, thanks!