I noticed that in https://github.com/artf/grapesjs/issues/74 when the move to the Pell based editor is listed it's use of Document.execCommand was mentioned as a liability. I see now that according to https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand it's consider Obsolete, so we were wondering if...
artf
I'd like to avoid putting external libraries in the core library (indeed we still have to extract some of them). If you need quilljs you can try to add it as a custom RTE. I close it as there is no real alternative to the native API (unfor...
artf
so we were wondering if you have plans to switch to a new editor? New editor? What would be the alternative?
mikeholczer
What additional information are you looking for? I did a quick google and found https://quilljs.com/ doing a quick search of it's source on github, the only use of execCommand I see is https://github.com/quilljs/quill/blob/fd400525d551315b...
Hi, I'm trying to enable more than one custom panel button at the same time. I think when I create some custom panel button (using code below) they will have the same behavior as normal html radio inputs, meaning that you can only select one and not more then that. See the example below when I try to enable both butto...
RJCAM
Thank you @Ju99ernaut , that's exactly what I needed.
Ju99ernaut
You have to add a different context for each button
Hi @artf , I hope that you are well, I was wondering whether you could help me with some simple issue that I am having (I have recently started using GrapeJS. Issue: using a plugin create a block and within the traits section have a drop down that changes the type of block displayed. Here is my current plugin code whi...
cartifon
I'm not sure if you can change the block once you added it.... Maybe you should just have classes to add to the blocks, that you can change the color, size or something like that. You can take a look on the CSS composer for it. https://gra...
artf
@Aiyush-G I think you should create a custom component with that trait which then changes the content, the block itself would just contain that component
Aiyush-G
Hi yes, this is what I was thinking, would you mind doing an example for me that changes the html content e.g. choosing red shows your chose red as a <p> tag and if you choose orange that is shows you chose orange and a <p>
Hello, I have two questions: Is it possible to create a custom assets-manager with a folder-structure? Is it possible to create a search for assets in the asset-manager? Thanks.
artf
You can replace the default asset manager with your own, try to search "custom asset manager" in issues
This is code of template component: I debugged it, so i got that : setComponents method in the dom_components clearing it ...but not getting why it is removing? setComponents calls clear method which is responsible for removing elements inside it I commented this so it was working fine and persisted the components ins...
Hello, I would like to extend the table component with a toolbar for adding and removing columns and rows. As far as I understood the documentation and the code the function onActive should be triggered when a component is selected. Or did I misunderstood this function? Because when I try to extend the view of the tab...
artf
Check here https://github.com/artf/grapesjs/issues/266
I have written the following code - const component = editor.getSelected(); component.addTrait({ name: 'traitName', type: 'text', label: 'traitLabel', value: 'traitValue' }); const traits = component.get('traits'); traits.forEach(trait => console.log(trait.props()))
artf
Traits change the component (and its final HTML) when you use them. By simply updating traits collection in the component doesn't make any change to it on the HTML side
Hello, I have written a custom GrapesJS component. So what I'm trying to achieve with this custom component is, if I place 2 components of the same type in the GrapesJS canvas and on editing the style of one component through style manager should automatically update the style of the other component. Is there a way to...
Hello and thanks for sharing such a good project. I'm trying to customize some things in the editor but I have some questions that I would appreciate if they could be clarified. Recently I create a panel button to switch editor from absolute and default modes and it's working without any problem. But when I try the sa...
artf
You can change it in this way editor.getConfig().allowScripts = ...
artf
AllowScripts is for enabling parsing of JS, once the script is inserted it's executed, so you can't remove it (one way would be accessing the iframe's context and making changes manually)
RJCAM
Thank you for the response @artf . Here's the problem, the code you give me changes the value but still doesn't work as I described above. In the demo I share (https://codepen.io/RJCAM/pen/xxZbNLw) I have a button that shows an alert when...