Skip to content

Re-export the markdown-actions module #105

Description

@pscanf

Problem

I'm not using overtype's built-in toolbar, and instead building my own, so I can use the same icons I'm using elsewhere in the app, use the same UX conventions, etc.

To show toolbar buttons as active based on the current cursor position (for example, highlighting the Bold button when the cursor is inside bold text), I need to use the getActiveFormats utility from the markdown-actions module.

I can just install the module and use it from there, but the module is already bundled in the overtype distribution bundle, so it'd end up duplicated in my app's bundle.

Proposed solution

Re-export markdown-actions in src/overtype.js, so I can use it from there.

Alternatives

  • Add an onActiveFormatsChange callback to the overtype instance options. (Con: more narrow in scope just to cover my usecase. Pro: doesn't expose internal APIs.)
  • Ship a non-bundled version of overtype. (Cons: more work; might not be possible to ship both the unbundled and the bundled versions at the same time.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions