Open vizardkill opened 2 years ago
I think this plugin already covers such a use case: https://github.com/artf/grapesjs-custom-code
yes, it is similar to the code editor, suppose we wanted the entire canvas to be able to load a style sheet without having to add a block, a component would be interesting where you can manage what was html, style sheet and javascript independently of blocks and that could be injected throughout the site
I doubt something like that would be a good fit for this plugin, it's quite difficult to manage styles outside of the style manager, as you'd end up with a lot of duplicate styles. But you could just modify the custom code plugin to do that.
If it is a topic of conversation for another project outside of this one.
Another question bro, does the plugin inject tailwind or does it have to add the library through the cdn script?
We could file the issue as a discussion.
Yeah, my thoughts are this would need to be a new plugin for managing global css and js or part of the code-editor plugin.
It's added through the cdn script.
bro another question regarding this plugin, is it possible to activate codeMirror autocomplete?
I'm not sure, haven't experimented with adding plugins, you could try something with codeViewOptions
Do you have any example of viewOptions?
These options are basically merged with the defaults https://github.com/Ju99ernaut/grapesjs-component-code-editor/blob/14844edeaf1fd76972e552547d8ceff6549198b1/src/code-editor/index.js#L33-L43
Also noticed that grapesjs exposes Codemirror so you could also try that
my brother, thank you very much for answering all my questions, I admire how humble you are to share your knowledge, I think it is something that makes you unique and that makes all your projects so great, thank you very much for your help.
Thanks to you I have been able to learn a lot about Grapes js I will be telling you how the project I am working on is going
Awesome, look forward to following your progress!
First of all bro, I love each of your projects as always I continue to learn a lot from you.
I wanted to ask you if it is possible in the future to implement a block to inject our own CSS styles as a CSS editor?