Skip to content
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

Expose marked renderer to allow marked.use() #514

Open
aardgoose opened this issue Jan 3, 2023 · 1 comment
Open

Expose marked renderer to allow marked.use() #514

aardgoose opened this issue Jan 3, 2023 · 1 comment

Comments

@aardgoose
Copy link

Is your feature request related to a problem? Please describe.

The renderingConfig: { markedOptions: } option doesn't allow extensions to be passed to marked.

It appears that using the marked.use() function directly is the only way to add extensions without the complexity of creating another marked instance and providing that as a preview rendering function.

Describe the solution you'd like

An accessor function such as easyMDE.getMarked() would be ideal.

Describe alternatives you've considered

Passing a separate instance of marked in, but this increases the code size and seems needlessly complicated.

@Ionaru
Copy link
Owner

Ionaru commented Jan 10, 2023

I understand the desire to access easyMDE's internals and not to duplicate the marked package. However just like accessing the CodeMirror object (#76), I cannot guarantee that the entire marked package is included if at some future point the bundle is optimised with tree-shaking.

Extending renderingConfig with a markedExtensions option may be a better solution.

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

No branches or pull requests

2 participants