How to pass EditorConfig to EditorJS in TypeScript #2815
Replies: 1 comment
-
Got it. Not super clear of how to do it, but for anyone chasing this answer, it's like this: Just create a custom object which "implements" the interface and set the props.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there,
So looking at the Typescript files in the repo, I see I can instantiate an EditorJS, as so:
Now, when it comes to instantiating the editorjs in Javascript, you simply pass a js(on) object as the editorConfig and away you go
Now, what about in Typescript? How do I pass the configuration to the EditorJS constructor, as config must only be either a string or the interface
EditorConfig
. The EditorJS typescript constructorAs
EditorConfig
is just an interface, and for the life of me I can't find an implementation. Maybe I'm missing something obvious, but how do I pass an EditorConfig to the typescript constructor of EditorJS?Cheers in advance.
Beta Was this translation helpful? Give feedback.
All reactions