[Question] How to Add Custom attribute in a Block through Block Manager?
Question
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': '@call-method' is not a valid attribute name.
So how can I pass this custom attribute through bm.add()?
Answers (3)
Thanks, actually I found alternative to @ i.e. v-on for using @ in VueJS
You can't use @ in an attribute's name, use something like data-call-method instead
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.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1888
[Question] Add custom html inside canvas
Hi there, I'm using grapes to export a custom json with all the information i need, instead of HTML and CSS. For doing that I'm parsing the...
Issue #1733
How to remove script tag which is added by add block manager script
Hello @artf I want to export final/production based html content excluding the script(Only which is added by block manager). Suppose i am a...
Issue #511
Cannot edit the content after update it via block manager API
Hello @artf sorry for my last issue, I must create a new issue, my problem is got error like this EDIT : sorry i just fixed my last issue w...
Issue #634
How can I pass content with script?
I made custom component like this way and used script as well then script is working fine but I am not able to select component. Is there a...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.