GrapesJS Issues

3,464 parsed GitHub issues โ€” 370 solved ยท 90 open. Search, filter and explore battle-tested answers.

644 issues found

๐Ÿ” components
#1146May 30, 2018by sura2k3 answers
1 reactions

Adding traits to wrapper

I found a way to add traits to wrapper via init function, But I had to add other wrapper configs such as emovable, copyable, etc. Since wrapper is only a config element I hope this is the default behavior. However if there is a way to just add traits[] without other properties, how it could be done? Also I did followi...

artf

But I had to add other wrapper configs such as emovable, copyable, etc. Since wrapper is only a config element I hope this is the default behavior. However if there is a way to just add traits[] without other properties, how it could be do...

sura2k

I was using 0.14.5. It is working nicely with 0.14.15. Thanks for the tip and sorry to bother without testing it against latest version.

betacar

@sura2k How did you extracted the wrapper's trait values after they're set? /cc. @artf

#1143May 29, 2018by ssabrewolf2 answers
1 reactions

How to enable progamatic placeholder block insert

Hello grapesjs Team I succesfully created a component with traits and a block to insert it, when i drag n drop the block there is a green line placeholder which works as guide helper for the user to insert components as seen here , this line helper only appears on block drag n drop operation, is it possible to trigger...

artf

No, unfortunately, there is no way to trigger d&d in that way, something similar you can do with a selected component in canvas via editor.runCommand('tlb-move') but not with blocks

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.

#1142May 29, 2018by ionic6662 answers
0 reactions

how to update the model

hi ,now I'm implementing to change my table. i use this:this.selected.components('<table><tbody>'+tbodys+'</tbody></table>') but there has one more table and after saving ,the redundant table has changed its site.

artf

Obviously, if you add rows on init every time, you will get them any time you refresh the page

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.

#1139May 28, 2018by ionic6661 answer
0 reactions

use built-in table components

i want to ask your opinion for how to use built-in table components

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.

#1137May 27, 2018by shareefhiasat3 answers
2 reactions

Cant make Text Block not editable and style able at the same time !

Demo / reproduce problem https://jsfiddle.net/shareefhiasat/u8Lodyh7/1/ Question Not sure if its bug or i dont know how to get the desired behaviour Expected I need text element like, and be able to style it but NOT changing what content (text in it) Actual and What i have Tried I tried from wiki and docs some solutio...

shareefhiasat

@artf yes its working my friend , thanks a million here how it is now for future reference , fiddle you cant edit , but you can style https://jsfiddle.net/shareefhiasat/jdpkccz0/ You can close it, Regards

shareefhiasat

UPDATE for future reference , i updated jsfiddle with editable and none editable component example, note that the appearance and behavior of hovering over elements dose not work with its not editable

shareefhiasat

@julyanof @artf Please help may be it too simple to figure out my self

#1124May 21, 2018by perfect-coders2 answers
0 reactions

Style is not copying after cloning the element

Hi @artf. At the first time before saving the template, When I make one element and clone it, the style is coming in the clonned element. That is running fine. But when I save the template and render the template with this editor.setComponents(templateHTML); and then clone the elements, their styling does not applies...

artf

Tested with the demo, everything works as expected. Without any kind of live demo demonstrating the opposite, IMHO, there is no reason to keep this issue open. BTW, check this if you store and load templates back

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.

#1121May 18, 2018by alimajed933 answers
0 reactions

[BUG] - <Tbody> inside <Table>

Hi @artf , I created a new component with tagName = 'table'. When selected and one option of its toolbar I also created is clicked, a new modal opens, and when the user submits, some content should be added to the block. I am using editor.getSelected().get('components').add(HtmlCode), where HTML code always starts wit...

artf

I think this happens because when you add the HtmlCode is parsed by the browser, but outside of the table scope and therefore it strips your tags. Try to skip the parser by passing a component object:

no-response[bot]

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take ac...

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.

#1118May 17, 2018by cgatian3 answers
0 reactions

[Question] Generate dynamic identifier in Block

Im looking to create a block that when dropped will generate two components and these components would share some unique identifier between each other. If I dropped a second block to the canvas a second identifier would be used. I believe you could do this by creating your own component, but then you loose the ability...

artf

You can make use of this event

cgatian

@artf Thank you for the reply! OK I was second guessing this approach, good to get some feedback on this. Just to follow up I dont believe there's a way to detect which block was actually dropped during the event, correct?

artf

Just to follow up I dont believe there's a way to detect which block was actually dropped during the event, correct? The component it's just the first one of your list, if you wrap your 2 elements inside another div that one will be the dr...

#1113May 14, 2018by trinhbalinh3 answers
1 reactions

[QUESTIONS] New trait type is not working with rendered components?

Hello, thanks for the great framework. I'm trying to apply this to my project. I want to add a new trait for existing LINK '<a>' component. I follow these documents and almost got what I expected: https://github.com/artf/grapesjs/wiki/Traits#define-new-trait-type and: https://github.com/artf/grapesjs/wiki/Components#u...

artf

Just include your changes in a plugin https://jsfiddle.net/on1g5xqb/

trinhbalinh

Thank you, it worked!

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.