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
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.
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.
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
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.
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.
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...
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.