mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
Preview: add hint for live preview
This commit is contained in:
parent
56bcc9be54
commit
8055f17d1f
@ -1400,9 +1400,15 @@ var handleGraphvizResult = function(id, timeStamp, format, result) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var setPreviewEnabled = function(enabled) {
|
var setPreviewEnabled = function(enabled) {
|
||||||
|
var hint = '<div class="preview-hint">' +
|
||||||
|
'<h3>Live Preview for Diagrams</h3>' +
|
||||||
|
'<p>Place the cursor on the definition of a diagram to preview.</p>' +
|
||||||
|
'</div>';
|
||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
contentDiv.style.display = 'none';
|
contentDiv.style.display = 'none';
|
||||||
previewDiv.style.display = 'block';
|
previewDiv.style.display = 'block';
|
||||||
|
previewDiv.innerHTML = hint;
|
||||||
} else {
|
} else {
|
||||||
contentDiv.style.display = 'block';
|
contentDiv.style.display = 'block';
|
||||||
previewDiv.style.display = 'none';
|
previewDiv.style.display = 'none';
|
||||||
|
@ -225,6 +225,16 @@ div.img-caption {
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.preview-hint {
|
||||||
|
opacity: 0.5;
|
||||||
|
margin-top: 30%;
|
||||||
|
margin-bottom: 30%;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
/* For Highlight.js Line Number */
|
/* For Highlight.js Line Number */
|
||||||
table.hljs-ln tr {
|
table.hljs-ln tr {
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -223,6 +223,16 @@ div.img-caption {
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.preview-hint {
|
||||||
|
opacity: 0.5;
|
||||||
|
margin-top: 30%;
|
||||||
|
margin-bottom: 30%;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
/* For Highlight.js Line Number */
|
/* For Highlight.js Line Number */
|
||||||
table.hljs-ln tr {
|
table.hljs-ln tr {
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -217,6 +217,16 @@ div.img-caption {
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.preview-hint {
|
||||||
|
opacity: 0.5;
|
||||||
|
margin-top: 30%;
|
||||||
|
margin-bottom: 30%;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
/* For Highlight.js Line Number */
|
/* For Highlight.js Line Number */
|
||||||
table.hljs-ln tr {
|
table.hljs-ln tr {
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -219,6 +219,16 @@ div.img-caption {
|
|||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
div.preview-hint {
|
||||||
|
opacity: 0.5;
|
||||||
|
margin-top: 30%;
|
||||||
|
margin-bottom: 30%;
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
/* For Highlight.js Line Number */
|
/* For Highlight.js Line Number */
|
||||||
table.hljs-ln tr {
|
table.hljs-ln tr {
|
||||||
border: none;
|
border: none;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user