Hi, I try to change my custom tag of ion-item has div in view properties but It doesn't work for me as I expected. my custom Blocks is my custom view is comps.addType('form-type', { model: defaultType.model.extend({ tagName: ion-item }, { isComponent(el) { if(el.tagName == 'ion-item') return {type: 'form-type'} }, }),...
artf
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.
I'm currently adding images to the canvas as base64 (embedAsBase64: true). I don't want to upload the image for the moment, to keep things simple. But, I want to be able to resize or crop the image before adding it through the asset manager as base64, to avoid oversized images added by the user. Basically I would need...
artf
Well, obviously you can't resize and crop without having all the image data at first. So, on asset:add event propose your "crop and resize" solution and then update the asset with the new data
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.
Hi, I try to add a button to my custom traits for my custom blocks but its not working fine as expected and also need to know how to call the function when we click that button, add icon inside that button also my code : my error screenshot: in the above screenshot, u can see an Add label inside the settings so what I...
ploutos27
hi again :) My bad, html button tags need textNode value is not visible remove value and add a textNode instead
ploutos27
Hi, First you need to define the new trait (button) and create it. After you define the new trait type you must call it inside you custom block
Ramkumar-Murugesan
@ploutos27 Thanks for your reply, I tried your code but it shows input box instead of button and my updated custom traits code is and my custom blocks is can u help me
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.
Hello there! Awesome project and thanks for your contribution. I would like to know if it is possible to change the styling of a child component through it's parent's style manager. For example, I have a block of components. The parent component contains all the other components. By clicking the parent component and g...
artf
It might be a bit tricky but yeah, you can do it. For sure you have to create a custom Component and inside its init method (model) you would place listeners to traits/styles. Then, inside the callback method, of the listener, you'd use fi...
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.
I am trying to integrate GrapesJs in reactJs. Can you please help me out with the below question w.r.t GrapesJs-React, โข Is there a way to find the images link used inside the editor ?? example: when I drag and drop and image inside grapesjs editor it will create one image tag with image src path. So I want all all th...
maryia-kabash
Hi @hemanthmc I can suggest subscribing to sorter:drag:end event and pass a React method as a callback. In the method check if image is dropped and store its src into React state or do whatever needed. A more detailed example: this.grapesj...
I have this rte toolbar where you can type and click 'save' and it's going to create a link for the selected text. but the problem is that the value of the input field should be dynamic based on selected text. If the selected text has href and the input field should show the href in there. How do i get href for the se...
SeongwoonHong
@artf WOW you save my life!Thank you! I have no idea how many hours to figure this out by myself... thank you thank you! it's working now.....!
artf
rte.selection() returns the Selection object which you can use to detect the pointed node (from which you can get all the attributes you need)
SeongwoonHong
@artf Could you give me an example of doing it please? I've tried lots of stuff but couldn't find a way to get any attributes using rte.selection().... I really appreciated it Artur.
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.
In my HTML code, I have some variable placeholders defined in element's class name or data attributes. For example, consider following code block, When I load this in the editor, it removes them and I can't get them back while exporting the code via editor.getHTML(). So, the result of above code is as below, If you se...
artf
The escape function is applied in the Selector model. I think it might be a good idea to provide some option as a custom escape strategy.
I'm basically trying to put an input fieldinside the RTE so that users can make link more easily. console.log(<a href="#">${rte.selection()}</a>) inside the result function is returning an empty anchor tag like this <a href="#></a>. I've tried everything.. even store the rte.selection() value to the global variable in...
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.