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

Different language highlighting examples #23

Open
yasuf opened this issue Apr 16, 2018 · 3 comments
Open

Different language highlighting examples #23

yasuf opened this issue Apr 16, 2018 · 3 comments

Comments

@yasuf
Copy link

yasuf commented Apr 16, 2018

Can you point me on the right direction as to how to select a different language other than JS when highlighting using this decorator?

I can try putting something together so that this repo could have an example on the README on how to do that.

@sebalvarez07
Copy link

I have the same question! Thanks again:)

@LuzLabLLC
Copy link

Yeah same, I would like for it to auto detect which language!

@pleerock
Copy link

pleerock commented Mar 4, 2020

Here is how you are able to do that:

      {
        type: "code-block",
        text: 'var message = "This is awesome!";',
        data: {
          syntax: "javascript",
        },
      },
      {
        type: "code-block",
        text: "<h1>I am superman</h1>",
        data: {
          syntax: "html",
        },
      },

so, you just need to figure out how blocks are working and add a block with syntax you need

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

4 participants