Issue #715Opened January 5, 2018by suchithmahadi0 reactions

Can we set a class to wrapper

Question

Hello ,

As per the document , // Change background of the wrapper and set some attribute var wrapper = domComponents.getWrapper(); wrapper.set('style', {'background-color': 'red'}); wrapper.set('attributes', {'title': 'Hello!'});

Can we set a class to wrapper.

Please let us know how to set a class to the root component i.e. wrapper.

Thanks.

Answers (3)

artfJanuary 5, 20180 reactions

Sure editor.DomComponents.getWrapper().addClass('wrapper')

suchithmahadiJanuary 5, 20180 reactions

@artf , Thanks for the reply.

Can we do editor.DomComponents.getWrapper().addClass('wrapper')

in the release 0.10.7

Thanks.

suchithmahadiJanuary 5, 20180 reactions

Sorry to bother you,

Because when i tried in version 0.10.7 it is giving a error [Error] TypeError: wrapper.addClass is not a function. (In 'wrapper.addClass('wrapper')', 'wrapper.addClass' is undefined) Global Code (index.html:4474) And one more request , i do not want to update to latest release, so can you tellme , any possible way to achieve this.

Thanks.

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.