I have found that contentEditable on pre also works great <pre id="my_pre" contentEditable="true"> <span style="color:red">red</span><span style="color:blue">blue</span> </pre>
There is one more question: I can get the text of my_pre using innerHTML, but in my case I need plain text (redblue) Is there any way to extract the text from the pre element without format? On Wed, May 27, 2009 at 1:59 PM, Neil <[email protected]> wrote: > joe ertaba wrote: > > I want a textarea in my xul which is able to compile html span + pre tags, >> so I will be able to show text with correct syntax dynamically >> > > Sounds like NVu's source view. I think that's just a regular <editor>, > although in that case the span tags are generated using a serialiser > (basically the equivalent of loading a view-source page in to the editor). > _______________________________________________ > Project_owners mailing list > [email protected] > https://www.mozdev.org/mailman/listinfo/project_owners >
_______________________________________________ Project_owners mailing list [email protected] https://www.mozdev.org/mailman/listinfo/project_owners
