#896February 23, 2018by maxtacco3 answers
Hi @artf , I've noticed an issue while testing one of my templates using different device configurations that supposed to trigger media queries. My template has styles generated as following: It looks like this JSON is used to generate styles inside canvas as in this screenshot: You can see here that the '.cell' style...
vrudikov
@artf Created the PR
artf
Thanks for the catch guys and the great video @vrudikov, was really helpful. I'll investigate this
vrudikov
So now we have the following structure: And you want something like this:
#895February 23, 2018by alvim2 answers
I'm using GrapesJS v0.14.5 in a local copy. OS: Ubuntu 16.04 LTS Browser: Chrome Version 64.0.3282.140 (Official Build) (64-bit) I think I can't reproduce it from the demo I have a component with the current script: (The "comp" variable part is from a plugin functionality I'm currently developing, but I think you can...
artf
gjs-html contains the final HTML, the HTML your users will gonna see so it's correct that you see the script "compiled". For a correct editing, you have to rely on gjs-components which is basically a JSON representation of the template and...
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.
#894February 23, 2018by alimajed933 answers
Hi everyone, I am creating new blocks, when I use the following method: editor.BlockManager.add(blockId, { label: blockLabel, content: {...blockContent, "customAttribute": "value"}, attributes: blockAttributes}) I can read the customAttribute using editor.getSelected().get("customAttribute") How to add this attribute...
samuelmattos
Hi @alimajed93 try it! editor.BlockManager.get("blockId").attributes.content.customAttribute
artf
@alimajed93 I think you're referring to this so then editor.getSelected().get('custom-attribute') Be aware that attributes keys in HTML are case insensitive, therefore data-gjs-customAttribute="value" is parsed to customattribute
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.
#893February 23, 2018by alimajed933 answers
Hello everyone, I want to add an id for each block I drag and drop in the canvas; To be more clear, I do not want to add an Id for each type, per example: Image, Table, Box, ... I want to add ad Id for each block, which means per example, the block "1 section" becomes <table ... blockId = 1>. I am trying to use those...
nojacko
I think you need to add the attribute to the model, rather than the view. https://github.com/artf/grapesjs/blob/50cc585f23f2560077fd0e9a42ced22e67e69723/src/dom_components/model/Component.js#L298 Then, you'll need to render the view. I thi...
ezp127
Hello, Just leaving an example in case someone else needs.
artf
Just like James suggested but without selected.view.render() as the view will receive changes simultaneously
#892February 22, 2018by iceverge3 answers
Hi Guys, How can I get all links value before or upon saving the email template. I want to substitute the links with proxy url. In order to trap the click links. Any help much appreciated. Thanks
iceverge
Thanks @artf. It really helps a lot. Thanks again.
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.
#891February 22, 2018by arius282 answers
Perhaps it should be taken into account when using getHtml() and some elements are hidden in the layer manager then they should also be hidden in the exported html. There might of course be plenty of reasons why this should not be done, in which case is there some way to get this functionality without changing the sou...
artf
Well, this is already as it is
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.
#890February 22, 2018by ekennedy803 answers
I am not new to Javascript but when I try the example: I get a blank page. That is with adding the CSS and Javascript library. Any suggestions on getting this up and running? Looks like an outstanding project!
maxtacco
I suggest you clone one of the examples using Git and run it using NPM commands included in the project. In your example above I would check the paths to grapes.min.css and grapes.min.js files - make sure you do not get 404 - Not found.
artf
Try with this instead
ekennedy80
Okay, I am building a CMS using JSF 2.2 and I cannot get a simple example working in the web application. But if I test an example using a simple file and browser I can get it to work. Has anyone had any experience using grapsejs with JSF?...
#889February 21, 2018by krunal0392 answers
is there way to destroy editor, I need to add button on page if user click, open page in editor and on save close editor and remove any reference of it.
artf
Check here https://github.com/artf/grapesjs/issues/849
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.
#888February 20, 2018by NorthstarTech2 answers
I want to write a svg for a block of the same size as the existing svgs columns. Where I will find the code of existing SVGS of grapesjs which are display on the block. I want the svg code of columns and edit them according to my requirement. Thanks
artf
Tabs SVG example https://github.com/artf/grapesjs-tabs/blob/master/src/blocks.js#L10-L17
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.
#887February 20, 2018by pwof422 answers
Hi, I can't get running grapesjs. Here my logs :# npm start> [email protected] start /var/www/web/server/grapesjs> npm run build:css -- -w & webpack-dev-server --open --progress --colors> [email protected] build:css /var/www/web/server/grapesjs> node-sass src/styles/scss/main.scss dist/css/grapes.min.css --output-style co...
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.