mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 04:31:46 +02:00
76 lines
1.8 KiB
HTML
76 lines
1.8 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 !important;
|
|
bottom: 0px;
|
|
left: 0px;
|
|
}
|
|
</style>
|
|
|
|
</head>
|
|
|
|
<body class="app-body">
|
|
<div id="editor"></div>
|
|
<div id="toolbar"></div>
|
|
</body>
|
|
<script>
|
|
let editor;
|
|
let isTablet = false;
|
|
</script>
|
|
<script src="quill.js"></script>
|
|
<script src="constants.js"></script>
|
|
<script src="module.js"></script>
|
|
<script src="magic-url.js"></script>
|
|
<script src="listeners.js"></script>
|
|
<script src="image-resize.min.js"></script>
|
|
<script>
|
|
attachMessageListener();
|
|
function loadAction() {
|
|
|
|
setFonts();
|
|
Quill.register("modules/imageCompressor", imageCompressor);
|
|
|
|
editor = new Quill('#editor', {
|
|
modules: {
|
|
toolbar: [
|
|
[],],
|
|
imageCompressor: {
|
|
quality: 0.9,
|
|
maxWidth: 1024,
|
|
imageType: 'image/jpeg'
|
|
},
|
|
history: {
|
|
delay: 2000,
|
|
maxStack: 500,
|
|
userOnly: true,
|
|
},
|
|
imageResize: {
|
|
displaySize: true,
|
|
},
|
|
magicUrl: true
|
|
},
|
|
placeholder: 'Type something here',
|
|
});
|
|
|
|
let Font = Quill.import('formats/font');
|
|
Font.whitelist = fontNames;
|
|
Quill.register(Font, true);
|
|
|
|
addLinkMatcher();
|
|
setTheme();
|
|
attachEditorListeners();
|
|
}
|
|
loadAction();
|
|
</script>
|
|
|
|
|
|
</html> |