Skip to content

Expose CodeMirror as static property#517

Open
sn3p wants to merge 1 commit into
Ionaru:masterfrom
sn3p:matthijs/expose-codemirror-as-static
Open

Expose CodeMirror as static property#517
sn3p wants to merge 1 commit into
Ionaru:masterfrom
sn3p:matthijs/expose-codemirror-as-static

Conversation

@sn3p

@sn3p sn3p commented Jan 11, 2023

Copy link
Copy Markdown

As requested in #495 (comment) :)

Unfortunately the CodeMirror object from EasyMDE is not available at that moment, although exposing it on the EasyMDE object should not be difficult (EasyMDE.CodeMirror = CodeMirror; in easymde.js, PR anyone? 😉).

@Ionaru

Ionaru commented Jan 12, 2023

Copy link
Copy Markdown
Owner

As discussed in #495, #514 and similar requests, I cannot guarantee a stable API when exposing CodeMirror or marked. Breaking changed to either package would mean a breaking change in this package. Tree-shaking might break anything from CodeMirror or marked that is used outside the editor.

I think a better option is to implement/expose specific configuration options that users of the editor need to achieve their goals.

@sn3p

sn3p commented Jan 13, 2023

Copy link
Copy Markdown
Author

As discussed in #495 ...

You requested to expose it here 😆
But I do understand your concerns, feel free to close this PR.

It's just very frustrating you can't easily load CodeMirror modes before initializing eazyMDE.
Came up with a workaround in #495 (comment).

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