Skip to content

Chainable enable/disable commands #25

@slmnsh

Description

@slmnsh

I am using this plugin for adding AI integration in Tiptap editor.

Current enableSuggestChanges and disableSuggestChanges are not chainable. we need to dispatch these separately before making changes.

Or If we can enable track changes just for specific transaction.

I want to do something like this:

// in Prosemirror
chainCommands([
  enableSuggestChanges(),
  // document modifications
  disableSuggestChanges(),
])

// in Tiptap
editor.chain().enableSuggestChanges()./* document modifications */.disableSuggestChanges().run()

// OR suggestion only for specific transaction

// in Prosemirror
tr.setMeta(suggestionPluginKey, { enable: true })
// document modifications
dispatch?.(tr)

// in Tiptap
editor.chain().setMeta(suggestionPluginKey, { enable: true })./* document modifications */.run()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions