Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Color highlight items in CDATA block. #5504

Closed
fr32c opened this issue Oct 13, 2013 · 2 comments
Closed

Color highlight items in CDATA block. #5504

fr32c opened this issue Oct 13, 2013 · 2 comments

Comments

@fr32c
Copy link

fr32c commented Oct 13, 2013

Hi.

I've read issue #5058 and realize it might be connected to my problem.

For scripting matters, i have to embed html+js inside an .xml file

My xml file looks like:

<?xml version="1.0" encoding="UTF-8"?>
<!-- blah blah -->
<xmlNodes>
    <node1>
    </node1>

    <myHTMLnode>
        <![CDATA[
            <p> here i put html</p>
            <script> //and sometimes javascript </script>
        ]]>
    </myHTMLnode>
</xmlNodes>

I know CDATA often means "don't open, read, translate…" but since all this is a big embed around my html element, i would love to have them in a readable way, syntax highlighted.

Do you think this is something we could build or is it too complicate ?

PS : xml is not live previewed or anything here, i'm just looking for syntax highlight inside…

@njx
Copy link

njx commented Oct 14, 2013

@fr32c - I'm not sure how we would know that the contents of a CDATA tag is HTML as opposed to some other kind of language. It might be possible to write a one-off CodeMirror mode extension that would handle your particular XML schema and look for this, and then hook it up to a Brackets extension. But it's not something that we would generally put in core, I think.

Closing.

@njx njx closed this as completed Oct 14, 2013
@fr32c
Copy link
Author

fr32c commented Oct 20, 2013

Hi Narcisco. Ok for this one I'll have to skp because "code mirror" and "writing an extension" sounds way over my capacities… I guess that extension would require some kind of comment inside the CDATA, like /* //i am html */ to be read… well… thanks for reading :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants