mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 12:41:45 +02:00
66 lines
1.5 KiB
HTML
66 lines
1.5 KiB
HTML
<html>
|
|
<head>
|
|
<meta content="width=device-width, initial-scale=1, user-scalable=no" name="viewport"/>
|
|
<link href="fonts.css" rel="stylesheet">
|
|
<link href="styles.css" rel="stylesheet">
|
|
<style>
|
|
.ql-toolbar {
|
|
overflow-x: auto;
|
|
width: 100vw;
|
|
white-space: nowrap;
|
|
position: fixed;
|
|
height: 0px;
|
|
bottom: 0px;
|
|
left: 0px;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body class="app-body">
|
|
<div id="editor"></div>
|
|
<div id="toolbar"></div>
|
|
</body>
|
|
|
|
<script src="constants.js"></script>
|
|
<script src="listeners.js"></script>
|
|
<script src="module.js"></script>
|
|
<script src="quill.js"></script>
|
|
|
|
<script>
|
|
let editor;
|
|
|
|
function loadAction() {
|
|
|
|
const Quill = require('quill');
|
|
setFonts();
|
|
Quill.register("modules/imageCompressor", imageCompressor);
|
|
|
|
editor = new Quill('#editor', {
|
|
modules: {
|
|
toolbar: [
|
|
[],],
|
|
imageCompressor: {
|
|
quality: 0.9,
|
|
maxWidth: 1024,
|
|
imageType: 'image/jpeg'
|
|
},
|
|
},
|
|
placeholder: ' ',
|
|
});
|
|
|
|
let Font = Quill.import('formats/font');
|
|
Font.whitelist = fontNames;
|
|
Quill.register(Font, true);
|
|
|
|
addLinkMatcher();
|
|
attachTitleInputListeners();
|
|
setTheme();
|
|
attachEditorListeners();
|
|
}
|
|
|
|
loadAction()
|
|
</script>
|
|
|
|
|
|
</html> |