mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-03 12:41:45 +02:00
93 lines
2.2 KiB
HTML
93 lines
2.2 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: 50px;
|
|
bottom: 0px;
|
|
left: 0px;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body class="app-body">
|
|
<div class="app-main">
|
|
<div id="titlebar">
|
|
<form id="formBox">
|
|
<input id="titleInput" placeholder="Title here" />
|
|
<div class="info-bar">
|
|
<p id="infowords"></p>
|
|
<p>-</p>
|
|
<p id="infodate"></p>
|
|
<p>-</p>
|
|
<p id="infosaved"></p>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
<div id="editor"></div>
|
|
<div id="toolbar"></div>
|
|
</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(premium, noMenu) {
|
|
let titleIn = document.getElementById('titlebar');
|
|
titleIn.style['padding-left'] = 0;
|
|
titleIn.style['padding-right'] = 0;
|
|
|
|
let mainToolbar = premium ? proToolbar : simpleToolbar;
|
|
|
|
const Quill = requiring('quill');
|
|
|
|
setFonts();
|
|
|
|
Quill.register('modules/imageCompressor', imageCompressor);
|
|
|
|
editor = new Quill('#editor', {
|
|
modules: {
|
|
toolbar: mainToolbar,
|
|
imageCompressor: {
|
|
quality: 0.9,
|
|
maxWidth: 1024,
|
|
imageType: 'image/jpeg',
|
|
},
|
|
history: {
|
|
delay: 2000,
|
|
maxStack: 500,
|
|
userOnly: true,
|
|
},
|
|
},
|
|
placeholder: 'Start writing your note',
|
|
theme: 'snow',
|
|
scrollingContainer: '.app-main',
|
|
});
|
|
|
|
let Font = Quill.import('formats/font');
|
|
Font.whitelist = fontNames;
|
|
Quill.register(Font, true);
|
|
|
|
addLinkMatcher();
|
|
attachTitleInputListeners();
|
|
setTheme();
|
|
attachEditorListeners();
|
|
fixDropdownMenuLocations();
|
|
}
|
|
</script>
|
|
</html>
|