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

Syntax highlighting in markdown code snippets #3947

Closed
lioneltay opened this issue May 4, 2019 · 3 comments
Closed

Syntax highlighting in markdown code snippets #3947

lioneltay opened this issue May 4, 2019 · 3 comments

Comments

@lioneltay
Copy link

lioneltay commented May 4, 2019

Just discovered this project and it's awesome!

Is there a way to have syntax highlighting in markdown code snippets? I noticed it works for js/css/html snippets but does not work for languages like typescript even though syntax highlighting for typescript is a supported by the editor.

This works

```javascript
    var JavaScriptMode = require("ace/mode/javascript").Mode;
    editor.getSession().setMode(new JavaScriptMode());
```

Is there a way to make this have syntax highlighting?

```typescript
    var JavaScriptMode = require("ace/mode/javascript").Mode;
    editor.getSession().setMode(new JavaScriptMode());
```

```tsx
  console.log('Typescript React')
  const x = (
    <div>
      <h1>Hello</h1>
    </div>
  )
```

From https://ace.c9.io/build/kitchen-sink.html

@nightwing
Copy link
Member

this will be possible to implement once we merge #3837

@YellowAfterlife
Copy link
Contributor

I was able to implement this by giving mode states non-colliding names and then merging them into markdown mode.

@nightwing nightwing added this to ToDo in markdown May 23, 2019
@github-actions
Copy link

github-actions bot commented May 9, 2022

This issue has not received any attention in 1 year. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
markdown
  
ToDo
Development

No branches or pull requests

3 participants