Notion-style WYSIWYG editor with AI-powered autocompletion.
APACHE-2.0 License
Bot releases are visible (Hide)
Published by andrewdoro 3 months ago
editor.chain().focus()
removes focus from tippy popover Fixes #412 by @tautastic in https://github.com/steven-tey/novel/pull/413
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.5.0
Published by andrewdoro 4 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.4.3
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.4.2
Published by andrewdoro 5 months ago
- import { getPrevText } from "novel/extensions";
+ import { getPrevText } from "novel/utils";
+ import { GlobalDragHandle } from "novel/extensions";
const extensions = [..., GlobalDragHandle]
//returns document content until a give position in doc
import { getPrevText} from "novel/utils";
const pos = editor.state.selection.from;
const text = getPrevText(editor, pos);
//returns document content as markdown string
import { getAllContent} from "novel/utils";
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.4.1
Published by andrewdoro 7 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.3.1
Published by andrewdoro 7 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.3.0
Published by andrewdoro 7 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.13
Published by andrewdoro 7 months ago
EditorCommandList
has to directly wrap the EditorCommandItems
(this is because of cmdk). <EditorCommandList>
{suggestionItems.map((item) => (
<EditorCommandItem>
....
</EditorCommandItem>
))}
</EditorCommandList>
This change was made to support wrapping of EditorCommandList with custom components.
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.12
Published by andrewdoro 8 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.11
//this extension is used for highlighting text for the AI
import { AIHighlight } from "novel/extensions";
//call this function when entering in AI mode to highlight current selection
import { addAIHighlight } from "novel/extensions";
//call this function when AI mode is no longer used
import { removeAIHighlight } from "novel/extensions";
//this function returns the current selection in Markdown
import { getPrevText } from "novel/extensions";
You can see an example implementation
https://github.com/steven-tey/novel/tree/main/apps/web/components/tailwind/generative
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.11
Published by andrewdoro 8 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.10
Published by andrewdoro 8 months ago
## Update to 0.2.10, this version is missing type definitions
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),
}}
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.9
Published by andrewdoro 8 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.8
Published by andrewdoro 8 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]
Published by andrewdoro 8 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/0.2.4...0.2.6
Published by andrewdoro 8 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/0.2.3...0.2.4
Published by andrewdoro 8 months ago
Full Changelog: https://github.com/steven-tey/novel/compare/0.2.1...0.2.3
Published by andrewdoro 8 months ago
(Minor): Updated Placeholder without or '++' for AI autocomplete...
until AI features are available
Full Changelog: https://github.com/steven-tey/novel/compare/v0.1.0...0.2.1
Published by andrewdoro 8 months ago
WIP Novel docs here Docs
Full Changelog: https://github.com/steven-tey/novel/compare/0.1.22...0.2.0
Published by steven-tey about 1 year ago
/api/generate
endpoint by @steven-tey in https://github.com/steven-tey/novel/pull/190
Full Changelog: https://github.com/steven-tey/novel/compare/0.1.21...0.1.22
Published by steven-tey about 1 year ago
Introducing a new disableLocalStorage
prop that allows you to disable reading / writing content from local storage!
Shoutout to @krehak for the fix!
Full Changelog: https://github.com/steven-tey/novel/compare/0.1.20...0.1.21