Skip to content

Commit 4575960

Browse files
author
minjk-bl
committed
Show label for empty Markdown block
1 parent de366a9 commit 4575960

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

css/boardFrame.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,10 @@
315315
.vp-block-markdown.vp-focus .vp-block-header {
316316
border: 2px solid var(--highlight-color);
317317
}
318+
.vp-block-markdown .vp-block-header:empty::after {
319+
content: 'Double click to edit.';
320+
font-style: italic;
321+
}
318322

319323
/* block sortable style */
320324
.vp-sortable-placeholder .vp-block-header {

js/m_apps/Markdown.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,9 @@ define([
209209
marked(text, { renderer: renderer }, function (err, html) {
210210
html = mathjaxutils.replace_math(html, math);
211211
let preview = `<div>${html}</div>`;
212+
if (html == '') {
213+
preview = '';
214+
}
212215
that.state.preview = preview;
213216
document.getElementById("vp_markdownPreview").innerHTML = preview;
214217

0 commit comments

Comments
 (0)