QUESTION: Adding selected component style to a block
Question
So I'm trying to fetch the selected component and make a block out of it, however, I'm struggling with adding the css of the same. my approach looks like this currently:
editor.BlockManager.add(widgetname, { label: widget name, content: editor.getSelectedAll(), category: panelname, attributes: { title: widgetname, class: iconclass }, });
Any leads would be helpful :)
Answers (0)
No answers yet.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #3266
[Question] How to know from which block is the selected component generated ?
Wondering how to do a reverse lookup, from component back to block. I use Block Manager add() to add a block like below after initializatio...
Issue #2596
[QUESTION] Add html, css and js to Block Manager
[QUESTION] Hi! I'm retrieving dynamic html,css and js codes from the database. How can I create Blocks with this? Currently, this is my cod...
Issue #2177
How to create a block with HTML and CSS and javascript content.
Can somebody please show me a code example of how to create a block with javascript and css styles. The main problem is that the js code is...
Issue #2973
make not removable elements inside a block
Hello, Given: editor.BlockManager.add('test-component', { id: 'MappaPiuDescrizione', label: 'Mappa + Descrizione', content: <div data-block...
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.