simple-code-editor
simple-code-editor copied to clipboard
Plans for integration hljs.highlightAuto()?
Any plans to implement hljs.highlightAuto() from highlight.js for auto detection of the language? If not, plans to make a searchable language selector, as alternative?
I'm working on a local Snippet database tool. Having all languages available makes the dropdown list long and not 'easy' to pick the right language.
I'm now doing it as below, which works quite decent for already stored snippets, but feels kind of 'hackish' and does not work when writing a new snippet (yet).
const detectedLanguage = hljs.highlightAuto(props.resource.content)['language']
const language = [[detectedLanguage]]
A searchable language selector seemed like a good idea.