novel

Notion-style WYSIWYG editor with AI-powered autocompletion.

APACHE-2.0 License

Downloads
47.3K
Stars
12.8K
Committers
48

Bot releases are visible (Hide)

novel - [email protected]

Published by andrewdoro 3 months ago

Breaking Changes

  • simpleExtensions is no longer exported, instead you have to configure each extension manually

What's Changed

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.5.0

novel - [email protected]

Published by andrewdoro 4 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.4.3

novel - [email protected] Latest Release

Published by andrewdoro 5 months ago

What's Changed

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.4.2

novel - [email protected]

Published by andrewdoro 5 months ago

Breaking Changes

  • getPrevText is now exported from novel/utils
- import { getPrevText } from "novel/extensions";
+ import { getPrevText } from "novel/utils";
  • drag handle has to be explicitly added to the extension array
+ import { GlobalDragHandle } from "novel/extensions";

const extensions = [..., GlobalDragHandle]

What's Changed


//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";

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.4.1

novel - [email protected]

Published by andrewdoro 7 months ago

novel - [email protected]

Published by andrewdoro 7 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.3.0

novel - [email protected]

Published by andrewdoro 7 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.13

novel - [email protected]

Published by andrewdoro 7 months ago

Breaking Changes

  • 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.

What's Changed

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.12

novel - [email protected]

Published by andrewdoro 8 months ago

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.11

What's Changed

//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";



Implementation

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

novel - [email protected]

Published by andrewdoro 8 months ago

novel - [email protected]

Published by andrewdoro 8 months ago

## 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

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.9

novel - [email protected]

Published by andrewdoro 8 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]@0.2.8

novel - [email protected]

Published by andrewdoro 8 months ago

What's Changed

Full Changelog: https://github.com/steven-tey/novel/compare/[email protected]

novel - 0.2.6

Published by andrewdoro 8 months ago

What's Changed

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/0.2.4...0.2.6

novel - 0.2.4

Published by andrewdoro 8 months ago

What's Changed

Full Changelog: https://github.com/steven-tey/novel/compare/0.2.3...0.2.4

novel - 0.2.3

Published by andrewdoro 8 months ago

novel - 0.2.1

Published by andrewdoro 8 months ago

What's Changed

(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

novel - 0.2.0

Published by andrewdoro 8 months ago

WIP Novel docs here Docs

What's Changed

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/0.1.22...0.2.0

novel - 0.1.22

Published by steven-tey about 1 year ago

What's Changed

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/0.1.21...0.1.22

novel - 0.1.21

Published by steven-tey about 1 year ago

What's Changed

Introducing a new disableLocalStorage prop that allows you to disable reading / writing content from local storage!

Shoutout to @krehak for the fix!

New Contributors

Full Changelog: https://github.com/steven-tey/novel/compare/0.1.20...0.1.21

Package Rankings
Top 3.32% on Npmjs.org
Badges
Extracted from project README
Deploy with Vercel
Related Projects