novel@0.2.9
版本发布时间: 2024-03-07 20:10:13
steven-tey/novel最新发布版本:novel@0.5.0(2024-07-26 06:16:06)
## Update to 0.2.10, this version is missing type definitions
Breaking Changes
defaultEditorProps
was removed from the library
It was broken into multiple functions that have to be passed in the editorProps
.
-
handleImageDrop
,handleImagePaste
require a custom uploadFn for uploading images (See guide here)
import { handleImageDrop, handleImagePaste } from "novel/plugins";
import { handleCommandNavigation } from "novel/extensions";
<EditorContent
editorProps={{
handleDOMEvents: {
keydown: (_view, event) => handleCommandNavigation(event),
},
handlePaste: (view, event) =>
handleImagePaste(view, event, uploadFn),
handleDrop: (view, event, _slice, moved) =>
handleImageDrop(view, event, moved, uploadFn),
}}
What's Changed
- Show grabbing cursor when grabbing drag handle by @haydenbleasel in https://github.com/steven-tey/novel/pull/334
- feat: add custom upload config by @andrewdoro in https://github.com/steven-tey/novel/pull/335
Full Changelog: https://github.com/steven-tey/novel/compare/novel@0.2.8...novel@0.2.9