Issue #1315Opened July 24, 2018by YashPrince0 reactions

Get all the style value by ID

Question

@artf I want to get all the style associated with model selected by ID after save the template and reload and re init the editor. But I can not get all the style value of the selected model. modelstyle But in css there are 2 css definition for that ID

idselector

I want to know How can I get all the style value applied for a ID either it is 2 time or multiple time. Please also tell me how to prevent css composer to add new style tag for same ID after page reload or editor re-init so that it will not create new style and it only update the previous style.

Answers (3)

jmrgzJuly 25, 20180 reactions

editor.getCss(); -> will give you all the CSS, is up to you to find what you need.

comp = editor.getSelected(); const html = comp.toHTML(); -> selected comp html const css = editor.CodeManager.getCode(comp, 'css', {cssc: editor.CssComposer}); -> selected comp CSS

lock[bot]September 17, 20190 reactions

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.