Open biilmann opened 7 years ago
Since we'll be moving to Slate soon, we can use the code highlighting example there, which uses Prism underneath: http://slatejs.org/#/code-highlighting.
It'd be awesome to use this instead of prism: https://github.com/conorhastings/react-syntax-highlighter
No stylesheet to include, built for React.
Whatever we do here, it should not be included in the main bundle, needs to be provided as some kind of add-on.
Is there a rough timeline when Slate support could be expected? Would that also somehow benefit me if I'd like to edit a single json file in the editor without defining each field separately?
Best, andreas
Two different things there, you still need to define fields. Editing an entire raw entry is an interesting concept, don't think I've heard of anyone requesting that before 🤔
But yeah, that's probably not something we would do right now. This ticket is about using a proper code-editing UI within the markdown widget when editing raw markdown for a single field.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Right now our
markdown
widget has a visual and raw mode, but the raw mode is just a wrapper around a textarea.We should integrate CodeMirror as the raw editor, so we can do syntax highlighting of markdown and HTML.
See @ohadpr's PR #203 for more context.