Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

fix: minor editor fixes

thecodrr2b058650b5cd
diff --git a/apps/web/src/components/editor/editor.css b/apps/web/src/components/editor/editor.css
index 643abb16e..5549cc1b9 100644
--- a/apps/web/src/components/editor/editor.css
+++ b/apps/web/src/components/editor/editor.css
@@ -39,12 +39,14 @@
margin-right: 2px;
}
-.ql-formats > span.ql-header {
+.ql-formats > span.ql-header,
+.ql-formats > span.ql-size {
padding: 0px !important;
height: auto !important;
}
-.ql-formats > span.ql-header > .ql-picker-label {
+.ql-formats > span.ql-header > .ql-picker-label,
+.ql-formats > span.ql-size > .ql-picker-label {
padding: 5px !important;
height: auto !important;
border-radius: 5px;
@@ -125,7 +127,6 @@
.ql-snow .ql-toolbar .ql-picker-item:hover .ql-stroke-miter,
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter {
- stroke: var(--primary) !important;
fill: var(--primary) !important;
}
@@ -158,7 +159,6 @@
.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,
.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill {
fill: var(--primary) !important;
- stroke: var(--primary) !important;
}
.ql-snow.ql-toolbar :not(.ql-background).ql-picker .ql-picker-item:hover,
diff --git a/apps/web/src/components/editor/index.js b/apps/web/src/components/editor/index.js
index db8ed1250..de1816929 100644
--- a/apps/web/src/components/editor/index.js
+++ b/apps/web/src/components/editor/index.js
@@ -222,7 +222,7 @@ function Editor(props) {
onSelectAll={(quill) => {
const { pages, currentPage } = quillRef.current;
const percentageLoaded =
- (currentPage + 1 / pages.length) * 100;
+ ((currentPage + 1) / pages.length) * 100;
if (percentageLoaded < 70) {
if (
window.confirm(
@@ -231,14 +231,12 @@ function Editor(props) {
) {
const delta = quill.getContents().ops;
quillRef.current.currentPage = pages.length;
- quill.setContents(
- appendPages(
- delta,
- quillRef.current.pages,
- quillRef.current.currentPage
- ),
- "init"
+ const fullContent = appendPages(
+ delta,
+ pages,
+ currentPage
);
+ quill.setContents(fullContent, "init");
} else return;
}
quill.setSelection(0, quill.getLength(), "user");
diff --git a/apps/web/src/components/editor/react-quill.js b/apps/web/src/components/editor/react-quill.js
index d2ab9ac2e..5dc4e485b 100644
--- a/apps/web/src/components/editor/react-quill.js
+++ b/apps/web/src/components/editor/react-quill.js
@@ -216,11 +216,13 @@ export default class ReactQuill extends Component {
}
if (onSelectAll) {
+ console.log("ADDING");
this.quill.keyboard.addBinding(
{
- key: "A",
- shortKey: true,
+ key: 65,
+ ctrlKey: true,
},
+ {},
onSelectAll.bind(this, this.quill)
);
}