├── bunfig.toml ├── .prettierrc ├── .gitignore ├── src ├── index.html ├── index.css ├── index.tsx ├── server.ts └── components │ ├── App.tsx │ ├── Basic.tsx │ ├── Focus.tsx │ ├── Keyboard.tsx │ ├── BlockSelection.tsx │ ├── Autocomplete.tsx │ ├── BlockSelectionPlugin.tsx │ ├── Architecture.tsx │ └── Property.tsx ├── README.md ├── tsconfig.json ├── package.json └── bun.lock /bunfig.toml: -------------------------------------------------------------------------------- 1 | [serve.static] 2 | env = "BUN_PUBLIC_*" -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "useTabs": true, 4 | "trailingComma": "es5" 5 | } 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .awcache 2 | .DS_Store 3 | node_modules 4 | *.log 5 | dist 6 | package-lock.json 7 | build -------------------------------------------------------------------------------- /src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 |Hello World
` }) 29 | ) 30 | 31 | const [focused, setFocused] = useState(false) 32 | 33 | // Change editor state from outside Prosemirror. 34 | const removeMarks = () => { 35 | const tr = state.tr 36 | tr.removeMark(0, state.doc.content.size) 37 | const nextState = state.apply(tr) 38 | setState(nextState) 39 | } 40 | 41 | const docFocused = focusKey.getState(state) === null 42 | 43 | return ( 44 |