2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-09-24 16:40:55 -06:00

fix htm rendering

This commit is contained in:
Benedikt Rötsch 2019-04-17 21:04:38 +07:00
parent 55ca47f9da
commit 0a978d65c5

View File

@ -13,7 +13,7 @@ require('codemirror/mode/gfm/gfm.js');
require('codemirror/mode/xml/xml.js');
var CodeMirrorSpellChecker = require('codemirror-spell-checker');
var marked = require('marked');
var htm = require('htm');
var htm = require('htm/preact/standalone');
// Some variables
var isMac = /Mac/.test(navigator.platform);
@ -1657,7 +1657,7 @@ EasyMDE.prototype.renderPreview = function(previewTarget) {
return;
}
htm.render(
htm.html(editor.options.previewRender(editor.value())),
htm.html([editor.options.previewRender(editor.value())]),
editor.previewElement
);
};