change Editor import

This commit is contained in:
Ammar Ahmed
2022-07-01 10:26:50 +05:00
parent 4113d1f4b3
commit f9269daa0e
5 changed files with 24724 additions and 47080 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -3,21 +3,17 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@notesnook/theme": "file:../themeprovider",
"@tiptap/starter-kit": "2.0.0-beta.185",
"@tiptap/core": "2.0.0-beta.176",
"@tiptap/react": "2.0.0-beta.109",
"@notesnook/theme": "github:streetwriters/themeprovider",
"framer-motion": "^4.1.17",
"mdi-react": "^8.4.0",
"notesnook-editor": "file:../notesnook-editor",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"notesnook-editor": "github:streetwriters/notesnook-editor#develop",
"react": "^17.0.1",
"react-dom": "^17.0.1",
"zustand": "^3.6.8"
},
"resolutions": {
"react": "17.0.2",
"@types/react": "17.0.39",
"@types/react-dom": "17.0.11"
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.0",
@@ -28,7 +24,7 @@
"@types/react": "^17.0.39",
"@types/react-dom": "^17.0.11",
"react-error-overlay": "6.0.9",
"react-scripts": "^5.0.1",
"react-scripts": "^4.0.3",
"typescript": "^4.7.2",
"web-vitals": "^1.1.2"
},

View File

@@ -1,4 +1,4 @@
import { Editor } from "@tiptap/react";
import { Editor } from "notesnook-editor";
type ButtonType = {
editor: Editor | null;

View File

@@ -1,4 +1,4 @@
import { Editor } from "@tiptap/core";
import { Editor } from "notesnook-editor";
import { Attachment } from "notesnook-editor/dist/extensions/attachment";
import { useCallback, useEffect, useRef, useState } from "react";
import { useEditorThemeStore } from "../state/theme";

View File

@@ -1,7 +1,6 @@
import { useState } from "react";
const settingsJson = localStorage.getItem("editorSettings");
const initialState = {
readonly: false,
fullscreen: false,
@@ -37,6 +36,8 @@ const initialState = {
["alignCenter", ["alignLeft", "alignRight", "alignJustify", "ltr", "rtl"]],
["clearformatting"],
],
noHeader: false,
noToolbar: false,
};
global.settingsController = {