GrapesJS Issues

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

829 issues found

๐Ÿ” question
#996April 3, 2018by HarshOB3 answers
1 reactions

[QUESTIONS] change attribute value that is generated through trait

Now, let's consider that I wrote new into the trait value but in attribute :items, I want to append prefix like item.text. to that value So, my final attribute :items become item.text.new. Is that possible?

artf

I'd say it's enough just this

artf

You should be able to achieve it via a custom trait, eg. by overriding getValueForTarget method

HarshOB

I tried creating custom trait and override a method but didn't see any attribute generated. can you please look at this code and correct me if there's any error. When I write data in traits it should generate attribute as ':text=item.text....

#995April 3, 2018by sublimekaushik2 answers
0 reactions

[Question ] how to add fields on trait dynamically

I am building the trait when the application starts. so getting the below fields at side bar as settings Now I want more field to be loaded (in the below picture 'product' and 'Product Image' ) along with previously loaded field ('Logo Url', 'Redirect Url'). And these two fields('product' and 'Product Image' ) will be...

artf

In your case, you have to update all those models model.get('traits').add([{name: 'product'}, {...}])

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.

#987March 29, 2018by baxxos3 answers
0 reactions

[BUG/Question] Dropdown indicator not displayed for a custom trait

Hello, the dropdown (select) element arrow indicator icon is not rendered when adding a custom trait to a component: I'm using following code to add the custom trait to the link component: Is there anything I'm missing? An extra attribute perhaps? Everything else works fine, except for this detail (which is apparently...

nojacko

I think you have to override the CSS.

baxxos

Successfully resolved via a "dirty hack" (overloading the initialize method) referenced here: #972

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.

#981March 26, 2018by theleoni2 answers
0 reactions

[Question] Set "production" mode

Hi. Like the "Preview" mode, i'm like to show only the canvas (without bars on the side/top), without the eye icon at corner. Has any "production" mode or something like this? It's the editor.getHtml() close to this?

artf

No, there is no "production" command, but you can create easily one by checking the Preview.

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.

#975March 22, 2018by rajanbharti3 answers
4 reactions

[Question] Default values for traits field

I have created component with certain traits. I am not able to assign default value to traits by passing values. It is coming as undefined for color type, blank for text field. Any changes in field is getting reflected in component

artf

Traits should read the default directly from their props/attributes, so in your case, it should be something like this:

rajanbharti

in your case, defaults should be like typeid: 0 pointing to the first element as default

rajanbharti

Thanks!

#974March 21, 2018by ghost3 answers
5 reactions

[Question] Removing the deviceManager and ViewCode buttons

I'm playing with the default init to try and remove the deviceManager and ViewCode buttons... var editor = grapesjs.init({ showOffsets: 1, noticeOnUnload: 0, container: '#gjs', height: '100%', fromElement: true, assetManager: { upload: false }, storageManager: { autoload: 0 }, styleManager: { sectors: [{ name: 'Genera...

ryandeba

Hi @PCPLTodd, Here's an example of how you can remove the device switcher and view code button: https://jsfiddle.net/fjkk8w6k/2/

hlo2109

Hi, I know it's late, but this is how I did it right now: editor.Panels.removeButton('devices-c', 'set-device-desktop'); editor.Panels.removeButton('devices-c', 'set-device-tablet'); editor.Panels.removeButton('devices-c', 'set-device-mobi...

ghost

Thanks Ryan, that worked great! :D

#973March 21, 2018by ryandeba3 answers
0 reactions

[Question]: Doctype in the canvas iframe

Hey @artf, I noticed the canvas iframe doesn't appear to have any doctype set on it, which causes it to be in quirks mode. Is this intentional? I'd like to set it to <!DOCTYPE html>, but doing so causes some positioning issues that you can see in this screenshot and demo. Would you be open to a pull request that would...

ryandeba

This has suddenly become less relevant to the project that I'm working on, so I'm closing it for now.

peakrams

I am interested in a possible solution for this issue. For now I've worked around it by putting custom CSS for those quirks that have a solution via CSS, but the ability to use a DOCTYPE would better, I think.

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.

#968March 21, 2018by Deepak8132 answers
0 reactions

Traits not showing with reference code: How to show traits along with style manager as in demo

Hi @artf, We found that when we download the latest grapesJs package in that traits tab are showing in different and online demo shows the traits in same style manager. We have used below reference code but nothing change: https://github.com/artf/grapesjs/blob/gh-pages/demo.html#L1366-L1397 Main question is why the de...

artf

Main question is why the demo and new release code are different? The demo uses different plugins and some other customizations so this is why are differentAlso, traits are working file with 0.13.8 release but changed in 0.14.5 or 6 versio...

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.

#967March 21, 2018by yashmahes1 answer
0 reactions

In GrapesJs, I want to store uploaded image in a local folder. I dont want to use API, instead I want to store the image in a local folder. How can I do this. Please send me the procedure. Thanks :)

WARNING READ and FOLLOW next 5 steps, then REMOVE them before posting the issueFollow CONTRIBUTING Guidelines https://github.com/artf/grapesjs/blob/master/CONTRIBUTING.mdUse the GitHub Issues EXCLUSIVELY for BUGS, FEATURE REQUESTS or QUESTIONS. Prefix the title of the issue with its context, eg. [Bug]: ....Do a quick...

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.

#966March 21, 2018by faizansaiyed3 answers
8 reactions

[QUESTION] How to load external CSS file into Grapes Editor?

Hey, During my editor = grapesjs.init(), I want to load an external CSS file into the canvas using @import url(...). So when I use my custom components which are using those external CSS stylings, should render properly. Also, those URL should include in editor.getCss(). How can I do that? Thanks in advance.

chapterjason

https://github.com/artf/grapesjs/issues/195 https://github.com/artf/grapesjs/issues/473 https://github.com/artf/grapesjs/issues/444 https://github.com/artf/grapesjs/issues/66 Here are some solutions, please search next time before open an...

faizansaiyed

Thanks for the help. This works perfectly. I tried searching issues with @import query, my bad.

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.