Issue #1859Opened March 5, 2019by MisterFK0 reactions

Change an element type in editor

Question

Hi,

In my javascript i already create 2 components (type "A" and type "B) with their own traits. I create a context menu on both elements to switch (in the editor) the selected element from type "A" to type "B" and change the traits in consequence.

I didn't found the way to change the type of an element already insert in the editor. Do you have a function or a solution plz?

Thanks artf !

Answers (3)

MisterFKMarch 8, 20190 reactions

Thanks, but i don't want to change the type but i want to change the type of only one selected element... If i change the traits of component, all the others elements with this type will be changed and it's not the purpose.

artfMarch 10, 20190 reactions

I didn't found the way to change the type of an element already insert in the editor.

The solution will be the same in case you would like to change a <div> with an <img>... so you remove it and replace it with another component at the same index

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.