How to pass EditorConfig to EditorJS in TypeScript #2815
-
|
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 As Cheers in advance. |
Beta Was this translation helpful? Give feedback.
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.
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.