I am using an editor and I implementing my own “set absolute position” command that’s very similar to what you have for an image but my commend button can do tables, divs etc. The problem that I have is that user needs to do 4 steps to make it work. Here is a sequence
1. Select text that you want to absolute position
2. Click on the toolbar button (at this time I will do editor.getSelectedElement() and tuggle elem.style.position)
3. User needs to click outside the selected area so the text selection is removed
4. Click on div (handles show up) and now my element can be dragged
My question is how can I do steps 3 and 4 in JavaScript command handler? I think it has to be possible because I already have and element that I want to drag it. I just need to change that element mode or something
1. Select text that you want to absolute position
2. Click on the toolbar button (at this time I will do editor.getSelectedElement() and tuggle elem.style.position)
3. User needs to click outside the selected area so the text selection is removed
4. Click on div (handles show up) and now my element can be dragged
My question is how can I do steps 3 and 4 in JavaScript command handler? I think it has to be possible because I already have and element that I want to drag it. I just need to change that element mode or something