mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2025-09-24 16:40:55 -06:00
Added support for the sanitize option of 'marked'
This commit is contained in:
parent
6abda7ab68
commit
6b010b1fe7
@ -1402,6 +1402,12 @@ SimpleMDE.prototype.markdown = function(text) {
|
||||
markedOptions.breaks = true;
|
||||
}
|
||||
|
||||
if(this.options && this.options.renderingConfig && this.options.renderingConfig.sanitize === true) {
|
||||
markedOptions.sanitize = true;
|
||||
} else {
|
||||
markedOptions.sanitize = false;
|
||||
}
|
||||
|
||||
if(this.options && this.options.renderingConfig && this.options.renderingConfig.codeSyntaxHighlighting === true && window.hljs) {
|
||||
markedOptions.highlight = function(code) {
|
||||
return window.hljs.highlightAuto(code).value;
|
||||
|
Loading…
x
Reference in New Issue
Block a user