Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Color highlight items in CDATA block. #5054

Open
core-ai-bot opened this issue Aug 30, 2021 · 3 comments
Open

[CLOSED] Color highlight items in CDATA block. #5054

core-ai-bot opened this issue Aug 30, 2021 · 3 comments

Comments

@core-ai-bot
Copy link
Member

Issue by fr32c
Sunday Oct 13, 2013 at 11:26 GMT
Originally opened as adobe/brackets#5504


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…

@core-ai-bot
Copy link
Member Author

Comment by njx
Monday Oct 14, 2013 at 18:58 GMT


@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.

@core-ai-bot
Copy link
Member Author

Comment by fr32c
Sunday Oct 20, 2013 at 05:36 GMT


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 :)

@tuanttdev
Copy link

hi, I have same problem to you. Have you had any solutions for this problem?

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

No branches or pull requests

2 participants