mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
33 lines
695 B
HTML
33 lines
695 B
HTML
<!doctype html>
|
|
<html lang="en">
|
|
<meta charset="utf-8">
|
|
<head>
|
|
<link rel="stylesheet" type="text/css" href="CSS_PLACE_HOLDER">
|
|
<script src="qrc:/utils/marked/marked.min.js"></script>
|
|
<script src="qrc:/resources/qwebchannel.js"></script>
|
|
</head>
|
|
<body>
|
|
<div id="placeholder"></div>
|
|
<script>
|
|
'use strict';
|
|
|
|
var placeholder = document.getElementById('placeholder');
|
|
|
|
var updateText = function(text) {
|
|
placeholder.innerHTML = marked(text);
|
|
}
|
|
|
|
new QWebChannel(qt.webChannelTransport,
|
|
function(channel) {
|
|
var content = channel.objects.content;
|
|
updateText(content.text);
|
|
content.textChanged.connect(updateText);
|
|
}
|
|
);
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|