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

Accepting data in toggle & wrap functions #39

Open
oyeanuj opened this issue Apr 25, 2018 · 0 comments
Open

Accepting data in toggle & wrap functions #39

oyeanuj opened this issue Apr 25, 2018 · 0 comments

Comments

@oyeanuj
Copy link
Contributor

oyeanuj commented Apr 25, 2018

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?

@oyeanuj oyeanuj changed the title Accepting data to toggle & wrap functions Accepting data in toggle & wrap functions Apr 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants