Skip to content

Add plugins option #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft

Conversation

fartinmartin
Copy link
Collaborator

A request to add a plugins array option for users to manipulate the parsed text and transforms after style-parser has parsed markdown, but before it has returned the TextStyle object.

Each plugin would have access to a couple of utility functions: updateTransforms and getStylesAtIndex to make some generic actions easier to manage.

For some simple/contrived examples of a plugin, check out the index.test.ts file:

For a more complex plugin, see the use case that inspired the plugin API request: style-parser-plugin-wrap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants