GrapesJS Issues

Search parsed GitHub issues, see highlighted answers, and open the original discussion when needed.

3464 issues found

#2099June 25, 2019by Amir28283 answers
2 reactions

Changing asset via command

Hello All, I would like to emulate the assets manager image replace behavior. for example I created a view on the side with all the images that are present on the canvas. I would like that changes on the view will be reflected on the canvas, just like the way the assets manager is replacing images on the spot. Any hel...

hitaloramon

Hi @mmotov, I'll show you how I did it, it's easier to understand. When capturing the value of the image I define it in the same way, but below I do some checks to know if the element is a background or not. editor.Commands.add("open-asset...

hananint

Hi @Amir2828, I would like to connect with you on your work on GrapeJs if you are interested in a side project. Let me know

artf

@Amir2828 on select you have to change the src property of the Image component editor.getSelected().set({ src: 'https://.../image3.jpg' })

#2097June 25, 2019by Amir28281 answer
0 reactions

New views question

Hello all, Is there is any simple way to add a new view right next to the style manager? I would like to create a new view that will show some custom images. Any help will be appreciated

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.

#2096June 24, 2019by benvmatheson1 answer
0 reactions

Class not exported for body

Go to https://grapesjs.com/demo.htmlClear canvasClick on body, add class, apply background colorBackground color now appearsClick Export -> Export to ZipOpen the Zip file and look at the index.html file. While the class was created in style.css, the class name was never applied to <body></body> in the html.

florinr1

I'm experiencing the same problem. The wrapper class attribute is set but the editor.getHtml() returns "<body></body>". I'm initalizing GrapesJS using: { fromElement: true, autorender: 0, // Size of the editor height: '100%', width: '100%'...

#2095June 24, 2019by Andiswamy1 answer
0 reactions

Is there any possibility to add the title attribute into the iframe tag of video ?

@artf Can you help me? When i click a video and go to settings , where i can select the youtube and i found that when i view the code , there is no title attribute present in the iframe tag. Is there any possibility to add the title attribbute into the iframe tag of video ? <iframe id="iyat" src="https://www.youtube.c...

artf

You can extend the component and add your title trait

#2094June 24, 2019by fmr4112 answers
0 reactions

[QUESTIONS] add sector in first index

I want to add a sector, but in the top position (above the general), thank you

artf

Currently, it's not possible doing it via API (only via initial config), but I'll add an option in the next release, so you'd do:

fmr411

Thank you, now I delete and re-create the sector in the order

#2093June 23, 2019by alialrabi3 answers
0 reactions

Create Traits for navbar plugin

Hi Artf, i have two question: 1- i want to adding traits to Navbar component instead of default one and didnt know its type 2- i want to add fixed property to navbar ( position: fixed) in traits ( select dropdown ) , so i can select it or not to add it to navbar in editor, how can i implement it?

artf

Please read how to extend Components

alialrabi

i know that we can add traits by know the type of components to extend , but i dont how to extend navbar component , can u show me how to extend this component please ?

alialrabi

@artf

#2092June 22, 2019by paulwright752 answers
0 reactions

Is it me or is this a bug

Hi, so I am using version 0.14.62 and I have a problem with the TraitManager. I have defined two custom traits like so: The problem is that when I change the value for bindingSrc an event is fired for both bindingSrc and ctrlLabel. The end result is that the label is set to empty. I am completely new to gitHub. Please...

artf

Hi @paulwright75 can you create a reproducible demo, please?

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

#2091June 21, 2019by benvmatheson1 answer
0 reactions

Can't set top/bottom/left/right to 0

If I select an element and set top/left/right/bottom to 0, nothing is applied int he CSS. If I set to another number then back to 0, it then persists. This is reproducible in the default jsfiddle example.

artf

Wrong defaults on those properties, I'll update them 👍

#2089June 20, 2019by abhilashks19852 answers
0 reactions

How to reload block content based on trait value change

I have added new block with some trait value and i want to pass that trait value with ajax call. Also should be able to reload block when trait value changes. Is that possible? I am pasting my block code. editor.BlockManager.add('loginBlock', { label: 'Login Block', attributes: { class:'fa fa-sign-in', title: 'My titl...

artf

The script content part has NOTHING to do with the editor components... read carefully Components & JS

ghost

try use components methods, for example: editor.getSelected().components(your content)