Hello, I already know this way: grapesjs.init({ // ... styleManager: { textLayer: 'MyLayer', } }) But i don't want to translate it in the init function if possible. For the blocks there is the set() function to translate the label for example. Is there something equal to this for the style manager to translate the pro...
Hi, I am trying to implement several more dynamic buttons for the panel, for example a save button that depending on some flag will show an animated loading spinner, save icon or "Saved" text. In order to achieve that I need to be able to dynamically set the content, potentially size and also use not only icons but al...
DamodarSojka
Thank you for a very quick response, didn't know about the label property as it doesn't seem to be mentioned in the docs.
artf
Well you can change the attribute and the content in this way for anything else more specific you can go with direct DOM manipulation
Hello guys. I'm trying to modify the native link component, so far I have a modal that opens on the dblclick event and the user may choose between some pre defined links. The problem is, when I have the chosen link I'm not able to set it to the component. It works fine when I type the link in the Trait Manager. Here's...
artf
@gabrielbitencourt Link Component doesn't have the href property, so add it directly to attributes
gabrielbitencourt
thank you for the response @artf I tried that but it didn't work either, I could see (in the trait manager) that the href had been set using model.addAttributes({ href: link.url }) but it did not persist when I deselected and selected the...
artf
but it did not persist when I deselected and selected the component again maybe because you're still reading from this.model.get('href')... btw I can't help you more than this without a reproducible demo
Hi iam doing a project with this library and i want to specify position for dragging components in it for example i have a div with id="drag-here" i want all components to be dragged in this div only i hope you can understand me , thank you all
pouyamiralayi
i don't have components iam using blocks according to this: i have a div with id="drag-here" i assume your block is something like this: the approach for your container block would be: and for target blocks: cheers!
pouyamiralayi
i have a div with id="drag-here" i want all components to be dragged in this div only if by this you mean you want all components to be draggable only in your target component, you can use `draggable` property. by specifying draggable on y...
AbdallaMohammed
by specifying draggable on your components like this: thank you for fast replay , but i don't have components iam using blocks
Hey, @artf thanks for creating this awesome library. its really helpful. I am using it in angular and I have used order list with numbers but it would be really helpful if there is a way to add an alphabetical ordered list or in roman numbers I was trying this but didn't work. please help
artf
Hi @shubh9415 the default RTE relies on execCommand API so the only available options are insertOrderedList and insertUnorderedList.
I saw the changes done by @JuanTincho of adding the "Order" attibute but I was able of adding it only on new categories created. I started from the "GrapesJs-Preset-Webpage". Is there a way of changing the Order after the initial render? This is how I add a new category by adding a new block. <pre>editor.BlockManager....
CatalinCernea
> but I was able of adding it only on new categories created.you can do this on all blocks by leveraging from getAll function. more on this here:for your case it might be something like this: cheers! Thank you! I'll try it ASAP. Have a goo...
pouyamiralayi
but I was able of adding it only on new categories created. you can do this on all blocks by leveraging from getAll function. more on this here: for your case it might be something like this: cheers!
DzevadS
Why am I getting an error "Uncaught TypeError: n is undefined" here? In the post #780 it should be possible to change the order of blocks in the following way const bm = editor.BlockManager; ["link", "map", "h-navbar", "countdown", "form",...
Hey. Thank you for this great project. I'm using it in one of my project and need some help. 1- I have a block element with script in it. This script add a form dynamically inside a iframe. When I drag and drop the script in anywhere on the page. Grapesjs ignore the position and render the form at the end of the page....
umerrinayat
Finally it is solved @pouyamiralayi Thank you for helping me out. After using your solution. It insert the script at correct position.
pouyamiralayi
Hi! did you try putting your script in the script tag? this way it will be executed at the end and probably will respect the order you desire: cheers.
artf
When I drag and drop the script in anywhere on the page. Grapesjs ignore the position and render the form at the end of the page. To be honest I don't know, it's all depended by the third-party library (in your case GetResponse) and how it...
The demo version on GrapesJS site has some custom style input components (i.e. opacity slider, "undo" button by the property name...) How is this achieved? Is there anyway I can use them with my own plugin? Also how do I get my custom sector properties to behave like the buildProps? In my case I have to translate all...
artf
The demo version on GrapesJS site has some custom style input components (i.e. opacity slider, "undo" button by the property name...) How is this achieved? Is there anyway I can use them with my own plugin? Those are part of the configurat...
First of all, excellent project! I love it! Very complete all-around. I've been reading and re-reading the doc and it is a steep learning curve. Anyway, I would like to serve a template to the user with restrictions in styling. I have been trying to use stylable and unstylable props like this: <h1 data-gjs-unstylable=...
pouyamiralayi
Hi there! for your first problem: i think this property must be specified on your component type definition. for your case it would be something like this: for your second problem, see if this can help you out. cheers.
hellocaio
I see! Thanks man! I will give it a go. :)
artf
@ColdTuna You wrote the attribute incorrectly, it should be <h1 data-gjs-unstylable="[\"float\"]">Title</h1>
I am trying to add a new trait but it is not working. I have done quite a bit of research and tried multiple ways but it still does not seem to be working. Can you please guide what I may be doing wrong. Option 1: Option2: Trying to add programatically. I am following doc from: https://grapesjs.com/docs/modules/Traits...
pouyamiralayi
Hi there! i do not see any reason why your first approach is not working! did you try this one? cheers.
megarg
This is working now. The original code is working.