I am trying to write a plugin to manage all the element properties of Boostrap Blocks. If someone clicks on the button it will show button related properties like button colors, size, etc... (based on default bootstrap classes) The following code - modifies the button classes and settings got stored in the model howev...
artf
You don't need to update the view in this case, just change the classes inside the model. All you need is this
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.
Not sure if it's suppose to be like this but I git cloned the repo and npm start. I can only see the "Block" element; cannot see Links, Videos, Sections, Text, Quotes, etc. elements. How do these other elements in the Block Manager?
JulyanoF
@dinhjeffrey you need to install this extension: Basic Blocks
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.
Demo / reproduce problem https://jsfiddle.net/shareefhiasat/u8Lodyh7/1/ Question Not sure if its bug or i dont know how to get the desired behaviour Expected I need text element like, and be able to style it but NOT changing what content (text in it) Actual and What i have Tried I tried from wiki and docs some solutio...
shareefhiasat
@artf yes its working my friend , thanks a million here how it is now for future reference , fiddle you cant edit , but you can style https://jsfiddle.net/shareefhiasat/jdpkccz0/ You can close it, Regards
shareefhiasat
UPDATE for future reference , i updated jsfiddle with editable and none editable component example, note that the appearance and behavior of hovering over elements dose not work with its not editable
shareefhiasat
@julyanof @artf Please help may be it too simple to figure out my self
Is it possible to have two elements (div and lnik) and consider as a single? For example: there is the my following link block: <div class="row"><a class="btn" href="http://test.com">Link Here</a></div> And I would like that on click div or button, it shows the <a> as a selected element on editor views, but in wrapper...
artf
You should create a custom component
JulyanoF
@artf I tried extending original link component, but it seems not working It's not changing anything.. I already tried to disable autorender and render after all changes. I could change the content only setting a new, using BlockManager: b...
JulyanoF
@artf as you said, I tried to use Components, but I didn't get expected result. Could you help me? My link block prints this content: <div style="height:45px;margin:0 auto 10px auto;padding: 5px 5px 5px 5px;width: 100%;text-align:center"><...
I have set the background-color for body. But when it will be edit code or export data using command editor.runCommand ('gjs-get-inlined-html'); there is no attribute for body that has been set. How do I solve for the body tag to retrieve when using that command? Or is there another way? Image when set background-colo...
artf
There is an option for it
agungjanuar
Thanks @artf , it works :)
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, I have a custom block in which there is custom attribute @call-method="searchProduct". But when I directly use this in Grapes JS as <datafieldsearch @call-method="searchProduct" label="Search"></datafieldsearch> it throws an error saying Uncaught DOMException: Failed to execute 'setAttribute' on 'Element': '@ca...
faizansaiyed
Thanks, actually I found alternative to @ i.e. v-on for using @ in VueJS
d3vr
You can't use @ in an attribute's name, use something like data-call-method instead
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 have a problem with some templates. This template has some scripts running after the page is loaded. When this templates is loaded by GrapeJs, the scripts do not starting because browser not detect the ending of load. It's possibile to load templete in a classic iframe (not injected)? For example: <iframe src="h...
artf
Have you tried with this?
alfaalex81
Sure, other scripts with "allowScripts" parameter work fine, but scripts inside "on load event" don't. I inject the code in this way: var newComps = editor.DomComponents; $.get('http://myexamplepages.com', function (e) { newComps.setCompon...
artf
@alfaalex81 can you provide a live demo of the issue?
Im looking to create a block that when dropped will generate two components and these components would share some unique identifier between each other. If I dropped a second block to the canvas a second identifier would be used. I believe you could do this by creating your own component, but then you loose the ability...
artf
You can make use of this event
cgatian
@artf Thank you for the reply! OK I was second guessing this approach, good to get some feedback on this. Just to follow up I dont believe there's a way to detect which block was actually dropped during the event, correct?
artf
Just to follow up I dont believe there's a way to detect which block was actually dropped during the event, correct? The component it's just the first one of your list, if you wrap your 2 elements inside another div that one will be the dr...
Hello, thanks for the great framework. I'm trying to apply this to my project. I want to add a new trait for existing LINK '<a>' component. I follow these documents and almost got what I expected: https://github.com/artf/grapesjs/wiki/Traits#define-new-trait-type and: https://github.com/artf/grapesjs/wiki/Components#u...
artf
Just include your changes in a plugin https://jsfiddle.net/on1g5xqb/
trinhbalinh
Thank you, it worked!
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, is there a way to add a new event to the AssetImageView, something like 'onRemove'. I overwritten the addAsset function from asset manager ->AssetsView to display a new icon and add a new event, but the new event doesn't trigger. I read other issues and i seen that i could overwrite open-assets, but don't reall...
artf
Use Assets API
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.