GrapesJS Issues

3,464 parsed GitHub issues β€” 370 solved Β· 90 open. Search, filter and explore battle-tested answers.

877 issues found

πŸ” question
#3639Jul 23, 2021by anatoli-dp4 answers
0 reactions

Improve UndoManager API

One thing i think would add great functionality is a more detailed history stack. U can get the undo stack and build a sort of history report from it of all the edits one has made but it is a little unclear as to what each edit was (at least to me so if I am missing something please let me know). Maybe like a formulai...

artf

Hi @anatoli-dp the ability to view the undo history would be actually super cool and I was already thinking about how to extend the UndoManager module in order to allow this kind of functionality via a plugin (eg. you can render the UI wit...

anatoli-dp

yeah im aware of how to access the stack i just dont know how to intepret it to give a more meaningful description to the end user

artf

i just dont know how to intepret it to give a more meaningful description to the end user Each UndoAction (each instance of the stack) tells you the action type (eg. add, remove, reset, change) and details about the updated model (eg. Comp...

#3637Jul 23, 2021by mingxin-yang2 answers
0 reactions

Custom block icon

I want to custom block icon, I found the code: how to find the content for I want?

artf

Hi @mingxin-yang you can read here how to create and update Blocks. In case you need to update an icon/label of the Block, you can do something like this:

GJSBlock

Thanks for reporting this, @mingxin-yang. Great question about Custom block icon. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documentation for your specific module Look for the on(...

#3634Jul 22, 2021by pankajsharma894 answers
1 reactions

How we can hide RTE for editable components ?

HI We have a requirement, where we don't want to show rte on editable components. how we can achieve that ?

mcottret

I allow myself to add what I think might be closer to what OP's trying to achieve, from @artf's answer: Toggling the disableRte property allows to hide the RTE toolbar, while keeping the text editable, on a per-component basis. Hope this h...

iabhiyaan

pankajsharma89

We don't want to make component non editable, component needs to be editable, we just don't want to show rte tool bar on that component.

#3631Jul 21, 2021by anuragk154 answers
1 reactions

How to load dynamic content in the final HTML file?

I looked everywhere, including the issues section and tried a few things. But really unsure how to load dynamic content in my components always(not just when i export or save it via editor). I want to include a script in my grapejs component that always fetches content from web and updates the components. For example,...

stf1981

I think you search for component related javascript -> https://grapesjs.com/docs/modules/Components-js.html#component-related. This js code is embedded in the html output.

anuragk15

I think you search for component related javascript -> https://grapesjs.com/docs/modules/Components-js.html#component-related. This js code is embedded in the html output. So every time the component loads, it will load the data dynamicall...

stf1981

So every time the component loads, it will load the data dynamically via the JS script? YesAlso for the end users i just have to return the html+cas generated by the grapesjs right? Yes, the JS script from the component is in the html, see...

#3630Jul 18, 2021by sanchit361 answer
0 reactions

Want to restrict image type to be dropped only in column.

Hey @artf hope you doing well and thanks for such a good project. So, I am trying that image type to only be dropped into the a specific block type.

GJSBlock

Thanks for reporting this, @sanchit36. Great question about [Question] Want to restrict image type to be dropped only in column.. The recommended approach with GrapesJS is to use the event-driven API. Start here: Check the GrapesJS documen...

#3629Jul 18, 2021by Spjoetvoll1 answer
0 reactions

BUG AND FIX: Layer manager overflow/scaling

Version: 0.17.19 Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? You should be able to see every child in the layer manager Describe the bug detailed What is the current behavior? Are you able to attach screenshots, screencasts or a live demo? Currently when you go in depth...

GJSBlock

Thanks for reporting this, @Spjoetvoll. The issue with BUG AND FIX: Layer manager overflow/scaling appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modificati...

#3627Jul 17, 2021by sanchit364 answers
4 reactions

I'm trying to duplicate the page, but the styles are not geting applied due to the Ids, changes to -2,-3 at the end.

This is what my function looks like. I am trying duplicate the page, the HTML part is fine but as css is applied through ids, when a new page render the ids changes with -2 in end of them. Is there any to prevent it, or any other way of doing this?

OrigoVl

@sanchit36 Hello, are you solving the problem? Can you tell how?

vlont

Use this

leonardolima99

@vlont Thanks!

#3626Jul 16, 2021by san-1234 answers
0 reactions

How to set src of video tag at dynamic?

Hi @artf , Hi I have drag and drop video tag and button from blockmanager, On Clicking the button , I need to change the url to src. But not working, Please guide me. editor.BlockManager.add("html/video", { label: <div> <img src="../../../Images/SiteBuilder/video.svg"/> <div class="my-label-block">Video</div> </div>,...

stf1981

I think I have something like that made with a custom component. Maybe it helps

artf

If you need to update only the block content (eg. the change will be applied on new dragged blocks) you can change it in this way: if you need to change Components in the canvas, I'd recommend reading more in detail Components

san-123

,Thanks @artf and stf1981 for your response, Actually I drag and drop multiple videos with generated Random number to Id attribute. In this case How to update src specific selected video? I gets failed to update src.

#3623Jul 15, 2021by simxn12 answers
7 reactions

"/" in classes changing to "-"

Version: ^0.17.19 Are you able to reproduce the bug from the demo?[x] Yes[ ] No What is the expected behavior? I would expect the class to stay exactly the same as I name it. Describe the bug detailed When you add a class that contains a slash "/" character in it , in the DOM, it changes the slash character to a dash...

notauserx

I also faced the same problem. After looing into the source, I found this is due to https://github.com/artf/grapesjs/blob/8b423fdf093865a6bf55dc8285030ce99c111d6d/src/selectormanager/model/Selector.js#L123 Based on https://github.com/artf/...

GJSBlock

Thanks for reporting this, @simxn1. The issue with "/" in classes changing to "-" appears to be a race condition or state management timing problem. This typically happens when component lifecycle events and DOM modifications overlap, crea...

#3622Jul 14, 2021by ronaldohoch4 answers
0 reactions

I18n functionality

Version: latest Are you able to reproduce the bug from the demo?[] Yes[ ] No What is the expected behavior? to editor.I18n.setLocale("es") work in runtime. Describe the bug detailed I don't know if it's a bug or it's not supposed to work this way, also, i don't know backbone enough to know if it's possible, but, when...

artf

Yeah, unfortunately, at the moment the UI (once rendered) is not updating on locale changes, so you would need to rerender the editor.

ronaldohoch

Well, i don't know if backbone have template binding, so i'll close for a while..

leonardolima99

Yeah, unfortunately, at the moment the UI (once rendered) is not updating on locale changes, so you would need to rerender the editor. Has this not been solved yet? I tried to use editor.render(), it works, but it duplicates the panels...

Browse all topics