how is it possible to move components within a Canvas on button click without using drag drop ? #4019
Unanswered
NoumanAhmad-Braqsol
asked this question in
Q&A
Replies: 1 comment
-
You should update the Component models, not the DOM. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For example if there is a button icon in tool tab if i click on that current block move up and down

I am using this function
editor.Commands.add("move-up", {
run: function (editor) {
const selected = editor.getSelected().getEl();
const selectedPrevious = selected.previousElementSibling;
const parent = selected.parentNode;
parent.insertBefore(selected, selectedPrevious);
}})
It moves the componet in canvas .but when i do editor.getHtml();
It gives the original Html but in canvas now position is changed so editor.getHtml() should return the html after change
Beta Was this translation helpful? Give feedback.
All reactions