Closed ianstormtaylor closed 8 years ago
It doesn't depend on it, but it works well with it: https://github.com/SamyPesse/draft-js-prism/blob/master/lib/options.js#L22
You can change the options to use a custom syntax resolver:
var decorator = new PrismDecorator({
getSyntax: function(block) {
return 'python'
}
});
(Keep in mind that the syntax should exists in Prism.languages
otherwise it'll throw an error.
Does this library currently depend on the "metadata for blocks" branch? Just wondering how you've gone about getting the syntax to work.
In other news, setting this up was amazingly simple. Thanks for sharing!