Skip to content
This repository was archived by the owner on Feb 21, 2019. It is now read-only.
This repository was archived by the owner on Feb 21, 2019. It is now read-only.

Accepting data in toggle & wrap functions #39

@oyeanuj

Description

@oyeanuj

Hi folks, thank you as always for the plugin! I was wondering if the toggle and wrap functions should take an optional data to be able to pass in things like syntax (and thus allowing easier interoperability with slate-prism).

My personal usecase is Github style markdown of three ~~~/``` followed by the language name. Using regex, I can capture the syntax proposed but can't use the wrap or `toggle` functions to set the code block.

The other alternative would be to do an insertBlock but since the wrap & toggle seem to be exposed utilities, it felt 'safer' to use those.

Thoughts?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions