[Project_owners] Pre tag + XUL

joe ertaba belaviyo at gmail.com
Wed May 27 12:47:58 PDT 2009

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>

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 <neil at parkwaycc.co.uk> 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
> Project_owners at mozdev.org
> https://www.mozdev.org/mailman/listinfo/project_owners
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mozdev.org/pipermail/project_owners/attachments/20090528/73d4abb4/attachment.html>

More information about the Project_owners mailing list