GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#1828February 25, 2019by SeongwoonHong2 answers
0 reactions

[Question] Add an additional text box for image upload modal?

Hi Artur, I'm wondering if that's possible to add some input boxes for image upload modal? I'd like to add some boxes in the red area in the screenshot above. Those boxes is intended for adding href for the image

artf

You can intercept the asset open command and then manipulate the DOM for your needs

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.

#1827February 25, 2019by sanjib002 answers
0 reactions

[QUESTION] How to add a button in the section (block) on hover?

Hello @artf, You are doing great work. I tried to add a button in the section (block) on mouseover. Can you please help me to add or show "Add Column" button on hover? I was following the issue #1789

artf

@sanjib00 I think this demo https://jsfiddle.net/xcv07abt/ is enough to understand what to do next

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.

#1826February 23, 2019by SeongwoonHong3 answers
5 reactions

[Question] How to add link to an image?

Hi Artur, How to add a link to this image? If i need to create a custom component, please give me some example code Artur.. Thank you so much

Shah-ali

Drag a link block, Then drag an image block inside the link block.

artf

@luvcharan you have to use "Link Block", not "Link"

luvcharan

Hi, Add link (href) to image in grapesjs . First we add image in grapesjs and then add link to that image, its shows " Link " text next to that image, but i was unable to add link to that image. here i am adding screenshot below, can you p...

#1824February 22, 2019by sakshigarg91 answer
0 reactions

Make div defined in index.html of grapesjs-webpage-preset read only

I have downloaded the grapesjs-webpage-preset and I want to customize it according to my requirements so I've added my own html and style in the index.html file to make that UI customizable. Now, how can I make a div in my html code read only. I tried adding data-gjs-editable="false" data-gjs-removable="false" to the...

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.

#1823February 21, 2019by abozhinov3 answers
0 reactions

[QUESTIONS] How to set different styles on one element for each device. (responsive)

@arthuralmeidap can you tell guide me how to set style different style for each device. I use the mobile-first strategy. For example to set a different background on mobile and desktop devices. mediaCondition: 'min-width', var deviceManagerConfig = { devices: [ { name: 'Desktop', width: '', widthMedia:'768px' }, { nam...

umerrinayat

@abozhinov I'm facing the same issue. If you solved the issue? Can you share it here. Thanks

theSC0RP

@abozhinov @umerrinayat I am facing the same issue. If you have solved it, can you please share it here?

abozhinov

No I didn’t. Still search for solution.

#1822February 21, 2019by arthuralmeidap3 answers
1 reactions

[QUESTION] - Add style sector for specific Css rule

Hey @artf , COuld you give your help on this one? I want to disable the user to able to select the wrapper block (body) but I still want to let them style it. So I was thinking to add a custom sector that would be displayed for all blocks but, the styles applied in that sector would be applied specifically into a css...

arthuralmeidap

There are several drawbacks to my approach but, since on this app we are not using the Selectors for the Style Manager, look what I did; I added a custom target property to my new sector. I started to listen the change:open for each sector...

arthuralmeidap

Just an example: The user has selected a Text Block. On the Style Manager panel, would display as it is today. The css selectors applied to it and the sections like General or Decorations to style it and besides that would have some Global...

artf

Yeah I think it's possible, you should append a new sector with your inputs manually on editor load and on input change update the wrapper style editor.getWrapper().addStyle({ color: yourInputEl.value }) or if you need some specific CSS ru...

#1821February 21, 2019by abozhinov3 answers
3 reactions

[QUESTIONS] How to apply the style changes to the ID instead of the class?

Hi, I have two elements with the same classes. I want to apply style changes with style manager to one of these two elements. I add ID but the style applies to the class not to the ID. What can I do?

arthuralmeidap

At the Style Manager painel, you have a way to select/unselect to which css selectors (classes or id) you want to apply the styling. Click on a block and open the Style Manager panel. You will see all selectors applied to that block.

abozhinov

Thanks ... The UI is not user-friendly.

abozhinov

@artf I think the problem is in the ICON. I edit the sources code and replace it with SVG also rewrite the style. Do I have an option to replace the TEMPLATE for each section without editing the source code? <img width="1132" alt="screensh...

#1820February 21, 2019by MisterFK2 answers
0 reactions

modal.setContent modify the image modal too

Hi, I try to use a new modal but when i change the content, the image modal change too : var modal = editor.Modal; modal.setContent("<div>test</div>"); How can i do to keep the image modal and have an other modal to use in my traits? Thanks

artf

Currently, it's not possible to have multiple editor.Modal instances

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.

#1819February 20, 2019by sushiljic2 answers
0 reactions

[Question]: Block content attributes (ngModel in my case) forced to lowercase

I am trying to use angular directive. On any of the block content, for example bm.add('radio-block',{ label:'Basic Form Element', category: c.category, content: '<input type="text" name="username" id="username" ngModel> ' }) on export ngModel will be ngmodel So what will be possible solution so that it display ngModel...

artf

ngModel is converted in ngmodel by the browser (HTML5 doesn't accept uppercase for attributes) You can skip the parser by passing a component object

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.

#1818February 20, 2019by mcrodrig2 answers
2 reactions

[Question]: Making grapesjs working with angular7 and material

I'm trying to integrate the library with Angular7, but got problem when moving container <div id="gjs"></div>into the material component (stepper) in this case. I put my code in https://stackblitz.com/edit/angular-qa6gqz (error with grapesjs doesn't happen in my local environment). Can you helkp?

mcrodrig

For future reference: Problem was related to executing the grapesjs.init call before the html was rendered and the <div> inside the mat-step was not available.

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.