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
How to use code syntax highlight plugin in react wrapper #909
Labels
Comments
In my case, It worked using import React from "react";
import 'codemirror/lib/codemirror.css';
import 'highlight.js/styles/github.css';
import 'tui-color-picker/dist/tui-color-picker.css';
import '@toast-ui/editor/dist/toastui-editor.css';
import { Editor } from "@toast-ui/react-editor";
import colorSyntaxPlugin from "@toast-ui/editor-plugin-color-syntax";
import hljs from "highlight.js";
import codeSyntaxHighlightPlugin from "@toast-ui/editor-plugin-code-syntax-highlight";
export default class App extends React.Component<any, any> {
render() {
return (
<div>
<Editor
initialValue="Hello World"
previewStyle="vertical"
height="600px"
plugins={[codeSyntaxHighlightPlugin.bind(hljs), colorSyntaxPlugin]}
/>
</div>
);
}
} |
thank you... I fixed the problem by reinstalling the @toast-ui/editor-plugin-code-syntax-highlight |
ghost
mentioned this issue
Jun 9, 2021
js87zz
pushed a commit
that referenced
this issue
Jun 17, 2021
Getting parent without selection, when user right click on a cell which contains a inline tags around text(span) failed. #909
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
How to use code syntax highlight plugin in react wrapper
Screenshot
Version
Write the version of the editor you are currently using.
Additional context
The text was updated successfully, but these errors were encountered: