#1087May 7, 2018by ionic6662 answers
in my panel, i want drag some buttons into a block ,how can i do it
artf
Well, just drag your buttons inside your 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.
#1086May 6, 2018by dwengticorp2 answers
It seems I should not ask such question, but I did spend a lot time to search, could not get a good guide on this. I want to create a FB block, it contains a few DIV tags, and a script that load FB sdk, and render the content into the DIV tags. <div id="fb-root"></div> <div class="fb-page" data-href="" data-tabs="time...
artf
Creating a Component (check also how to create them with js) will give you more control (eg. adding your traits), but in your case, if you just need a draggable element you can wrap it inside such a div
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.
#1084May 4, 2018by dsgh2 answers
I've marked as a bug just because I think this reflects a minor inconsistency; but it could also be understood as a feature request. The scenario is:I'm providing my own methods for uploadFile and handleAdd, which is something that's possible today.I can see that uploadFile has been bound to its parent object, allowin...
artf
Totally agree about the consistency 👍
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.
#1083May 4, 2018by pintor-mato2 answers
Hi . I have a json string like this '{ "assets": "[{\"type\":\"image\",\"src\":\"./img/team1.jpg\",\"unitDim\":\"px\",\"height\":0,\"width\":0}]", "css": "* { box-sizing: border-box; } body {margin: 0;}", "styles": "[]", "html": "", "components": "[]"}'. Now I want to import it.
artf
Honestly, I'd recommend following the flow with the storage manager, but in any way, you could achieve it in this way:
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.
#1082May 3, 2018by ionic6662 answers
how can i use it in vue.js
cjpollard
This thread should answer your question. https://github.com/artf/grapesjs/issues/275
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.
#1081May 3, 2018by mmeeeooowww3 answers
I'm trying to remove a panel. The function returns the panel the first time I run removePanel and then returns undefined if I run it again. It's worth noting that the panel is no longer returned when getting all panels, however it is still visible and functional. In my case I'm trying to remove the device selection bu...
FrciSmrci
Hey @mmeeeooowww , the panels should be removed as discussed in this issue. Have a great day.
mmeeeooowww
Hi, @FrciSmrci I am using css to hide stuff at the moment. Am I misunderstanding the purpose of removePanel or am I using it incorrectly? Thanks!
artf
I'll add a listener on this too
#1080May 2, 2018by francesca-cicileo2 answers
I am extending the 'text' component by adding a new attribute and a script. When a user types a certain character in the text component, I want the script to change the attribute in the component's model, but I'm not sure how to do that. This is my setup for modifying the text component: I have two problems: the custo...
artf
You can access nested properties like this var customAttribute = '{[ attributes.customAttribute ]}'; inside the script. You should use model's properties: and then in your script var customAttribute = '{[ customProp ]}'; One more thing, yo...
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.
#1079May 1, 2018by Coyote63 answers
When importing components and initializing grapesjs, the css background-repeat property is being changed to background-repeat-x and background-repeat-y, which breaks on iOS. Import components: This is how it looks before: Mobile Desktop Initialize GrapesJs, select an element, and then get the output code, and it comes...
Coyote6
Thanks. I added this to my storage manager function... I think it patches the problem for the time being... I am not quite awake yet, so please let me know if I messed something up.
artf
Thanks @Coyote6 we're already aware of this issue. This happens due to the browser's CSS parser and I can't do much about until there will be a possibility to attach custom CSS parsers, hope to implement it soon.
artf
From https://github.com/artf/grapesjs/releases/tag/v0.14.33 you can use custom CSS parsers, the first to be released is grapesjs-parser-postcss
#1078April 30, 2018by kuldeepcis3 answers
For countdown we would like to add our custom datetime picker not just the html one.We tried adding click event in its trait this way traits: [{ label: "Start", name: "startfrom", changeProp: 1, type: n.dateInputType, events:{ click:"handleClick", }, handleClick:function(e){alert('here')}, } but this doesn't work.Can...
nojacko
Source codes:https://github.com/artf/grapesjs-preset-webpagehttps://github.com/artf/grapesjs-component-countdown
artf
@kuldeepcis please take a look at how to create custom Traits
kuldeepcis
can you please provide the unminified version of grapesjs-preset-webpage.min.js?
#1077April 30, 2018by Deepak8133 answers
Hi artf, Please let us know how we can remove the selected component html like I have one button html and when i selected that "gjs-comp-selected" class is appended <button class="addcolbtn gjs-comp-selected" id="ir9j">Add New Column</button> I want to remove this button html and replace with new content on particular...
artf
You can do something like this
mararn1618
This has helped me a lot with programatically removing components and I just want to add some example code in Typescript for further reference.Typescript Example: Dynamically remove components All components are removed that .... have a ta...
Deepak813
Hi artf, Thanks for the message and provided code is working fine but i am getting below error: Uncaught TypeError: Cannot read property 'indexOf' of undefined at HTMLDivElement.<anonymous> (template.js?1.15:3784) at HTMLDivElement.dispatc...