Is there a way to use a custom button for the close preview button? I can style it using css but wondered if there was something more direct in the api Also I cant find a way to set the width of the views container when using an asset manager. Cant be dragged wider by user and cant find anything in the api to do with...
artf
You can update or completely replace the preview command
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hello all, I have encountered a problem when trying to add 2 plugins together for example: grapesjs-preset-webpage and grapesjs-plugin-ckeditor. I downloaded both via npm, imported them and added to the plugin field at grapesjs.init. this.editor = grapesjs.init({ plugins: [ckEditorPlugin,grapesjsPreset], ... }) For so...
artf
add CKEditor library...
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I want to add a unique class to each and every element in web builder while loading or importing a template into web builder. Is there anyway to add it?
artf
Take a look at Available Events
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hi @artf , How can I insert image inside the link? Please share your ideas what I need to do. If I need to create any custom component, please share some code. Thanks
artf
On the demo, you should see the 'Link block' which is made for this purpose
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I have an input trait, I want to change the 2 attributes (name and type) on the selected input element, on canvas is appropriate, but in the final html(editor.getHtml()) it doesn't work, I've read https://grapesjs.com/docs/modules/Components.html#define-new-component but I didn't find a solution, Thank's
artf
You should change the model and not the view element this.model.setAttributes({ 'data-attr': 'value' })
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
I'm using the pencil icon to trigger the asset manager. The triggering works fine but when I click on any of the images, no change is reflected in my image component. It shows me the existing photo even if I select a different image.
prashant2018
Click on the image you want to be replaced, in developer console write the following code snippet: You will see the selected image gets changed. The key here is target: editor.getSelected() , the selected image is treated as the target for...
artf
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Can I change the onclick event to hover when select objects and display a toolbar?
artf
You might need to extend the SelectComponent command (take a look at toggleSelectComponent method)
afdallah
@artf Is there any example on how to extend the SelectComponent?
artf
mmm not really, I hope to publish soon a general doc about Commands. BTW it's just about getting the command (https://grapesjs.com/docs/api/commands.html#get) and overwriting its method
I have a button with the show-left command, I want to make when the button is clicked a second time (or more) remains active, but when running Sender.set ('active') in the stop function, there is a loop on stop so that an error appears Maximum call stack size exceeded First click Second click My Commands
artf
Create a reproducible demo, please
edward1893
I have 3 buttons, I want when the button is clicked for the second time (or more), the button remains active, for example, when first clicking on the layer, the layer button becomes active, if clicked again the layer button will remain act...
How so that Placeholders can change when typing a word in the trait directly, current placeholders can change only when mouseover I have a trait like this, is there anything that isn't right? Thank you :
artf
I think you might need to create a new trait type for a custom behavior
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
We have this error: "Cannot read property 'getAlpha' of null" when i set the property allowEmpty in true. Can you check this? I'm trying this: colorPicker: { allowEmpty: true }
artf
Follow the template of the issue
lock[bot]
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.