Is there any ready solution to exclude some components from final html? Or any other mechanism that makes component exist only in view?
ryandeba
Hi @AH1N1, By "final html", do you mean the value returned from editor.getHtml()? And are you referring to a custom component? If the answer to both of those questions is yes, then you should just be able to override the toHTML method of y...
ryandeba
@AH1N1 Here's a working code example: https://jsfiddle.net/tt32z2uz/2/. Open up you browser console and you should see this logged out: <div>here's some normal content</div><div>...more normal content</div>. Does that give you what you nee...
artf
Hi @afotey What about if I wanted to return just the ID of a div as entered using the Component Settings panel? Id assigned from component settings goes directly inside attributes therefore you can use this Is there a way to have the expor...
My CMS works like this: sites can have one theme and many templates under that theme. Themes are rendered on every page, and templates are rendered only on specific pages. I have successfully integrated GrapesJS with my existing template editor, but I have a question: is there any way to render a theme around a templa...
z1lk
I've fiddled with the code and made a small patch that fits my needs. A config option surround lets you specify an ID, which represents an element in the container. This DOM subtree is plucked out during the main initialization, stored in...
artf
Greate @z1lk I think even something like this will work I close this as you've solved your case
z1lk
I used a solution similar to yours so I don't have to maintain changes to the Grapes source. Sometimes the position of the component "tools" are out of place, as if their vertical offset is computed relative to the body and not the wrapper...
Hi @all, I use my custom code to stop data to server. All works fine, but editor.store(); fires once on first click, twice on second click, three times on third click ... and so on. In storageManager -> type I use 'remote' - if use 'local' , fist click takes no effect. Can anyone help?
artf
Every time you call save-db you attach a new listener pull it out from your command
shareefhiasat
do it like this so we dont attach listeners every time
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 cannot drop items to editor and have below issue. Invalid target position: Target collection not found, Target is not droppable, accepts [undefined], Component not draggable, acceptable by [undefined] move @ grapes.min.js:2 endMove @ grapes.min.js:2
krunal039
was css issue and manage to resolve by width 100%
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.
When I choose image component and don't choose an image for the first time then if I open image editor then It won't close after clicking on a close button.
artf
@HarshOB I can't reproduce it (with the current demo). Are you able to provide a live demo?
HarshOB
I'll provide a link to a live demo.
artf
Ok I close this for now but will reopen once you provide a demo
Hello , I want to add new toolbar similar to the toolbar which is shown when any object in canvas is selected( with copy,delete, move functionality) but it needs to be displayed at different position with different set of buttons. Can you please help me? Thanks
artf
@vishal5033 Let's keep "Free Consultancy Requests" out of the issue tracker, thanks
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 trying to use the remote storage but no success, with the resolved issues I manage to adjust eveything as it best, but editor do not render loaded HTML. GrapesJS: JSON: {"gjs-css":"", "gjs-html":"<div>HELLO</div>", "gjs-assets":"[]", "gjs-styles":"[]", "gjs-components":"[]"} Load event: GrapesJS seems to be loadin...
DeathStapler
I had similar problems. Look at the issue I created. Issue #597. My issue related to the use of contentTypeJson: true, but you already have that in yours.
artf
GrapesJS seems to be loading okay, I put the editor.render() after the init and also inside the load event to try out. You should use editor.render() only with autorender: 0, so remove it
xeux
@DeathStapler thanks, I was able to load the urlLoad with that setting. @artf still not able to render the editor, the console shows the loaded urlLoad but nothing on editor, also in the view source button. I'm using the latest version.