Closed megarg closed 4 years ago
Hello can you make a JsFiddle so I can see the error.
thanks
I have created the JsFiddle ... As you can see, it behaves very strange when I click the open-code button https://jsfiddle.net/megarg/vx61nfzs/19/
Please let me know what I am doing wrong..
I moved the button over to the views button section which is where it was original created to go. I didn't create this plugin but our team took it over because we are using it in our project. When it was created the direction to the creator was to put the button in views button section so I assume he didn't try putting it in the options buttons section.
https://jsfiddle.net/12ato8L7/3/
As you can see from the jsfiddle by moving it over to the views button section it doesn't mess up all the other components. Will take some css updates to make it work in the other buttons section. Feel free to fork and make any updates.
Thanks for response. I am actually using it inside react - the whole Grapesjs library is a react component inside my application. And for some reason, I am still getting this error - see screen shot. I think because I am using react, I am not getting reference to window[...] command. Any ideas on how to solve it.
I am getting an error on following statement: window['@truenorthtechnology/grapesjs-code-editor'].codeCommandFactory({inlineCss: true}),
Is there another way? Can I call this function after init() method? Please advice.