mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-09-07 08:12:35 -06:00
Allow html to stay on preview page.
This commit is contained in:
parent
786c5b63c6
commit
f831662fdd
@ -791,7 +791,10 @@ function toggleSideBySide(editor) {
|
||||
}
|
||||
|
||||
var sideBySideRenderingFunction = function () {
|
||||
preview.innerHTML = editor.options.previewRender(editor.value(), preview);
|
||||
var newValue = editor.options.previewRender(editor.value(), preview);
|
||||
if (newValue != null) {
|
||||
preview.innerHTML = newValue;
|
||||
}
|
||||
};
|
||||
|
||||
if (!cm.sideBySideRenderingFunction) {
|
||||
@ -799,7 +802,10 @@ function toggleSideBySide(editor) {
|
||||
}
|
||||
|
||||
if (useSideBySideListener) {
|
||||
preview.innerHTML = editor.options.previewRender(editor.value(), preview);
|
||||
var newValue = editor.options.previewRender(editor.value(), preview);
|
||||
if (newValue != null) {
|
||||
preview.innerHTML = newValue;
|
||||
}
|
||||
cm.on('update', cm.sideBySideRenderingFunction);
|
||||
} else {
|
||||
cm.off('update', cm.sideBySideRenderingFunction);
|
||||
|
Loading…
x
Reference in New Issue
Block a user