[QUESTION] Can i add my own attribute inside the BlockManager.add ?
Question
editor.BlockManager.add('testBlock' + i, { label: 'Box' + i, attributes: { MyAttribute: 'hi'}, content: html })
Can i do something like that ? or i need to use standard html attributes?
I tried, but didn't work
Thank you.
Answers (1)
It works as expected https://jsfiddle.net/90y7wuo8/ Next time create a reproducible demo
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3207
Form is not submitting
I am trying to create as custom block. But the form is not submitting when i use components inside content. I am able to get all the form d...
Issue #792
Script property using function don't work with blocks
In Components & JS docs there's this example: This works perfectly. But I couldn't use a function instead of a string in script, as is said...
Issue #1831
[Question] How to run command for a block component?
I'd like to do something like this. so once a user drops the test component into the canvas, I'd like to open up asset manager modal where...
Issue #1624
replace html issue
I defined new forum block like this. I want to replace resource class with ajax response html. Currently I did it like this. The problem is...
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.