Closed fhemberger closed 2 years ago
Not sure this is possible to inject as an "advanced option" instead, as preAttributes
only allows static attributes.
Rather than a hardcoded option here, we are shipping #50 that will allow you to specify your own callbacks for any attribute name!
You’ll want something like this to replicate what you have in this PR:
preAttributes: {
"data-language-name": ({language}) => language
}
Great, thank you! Much cleaner solution.
Allows displaying highlight language name as a hint, e.g.:
results in: