How to get the next and previous models/elements of selected element
Question
I am cloning an element. I want to get the next element or previous element. By this I mean to say that How can I get the model or How should I give some custom attribute to the cloned element.
Thanks in Advance.
Answers (3)
When you say "element", you are talking about blocks? Like button, text, section...?
yes
You can get all blocks like this:
var blocks = editor.BlockManager.getAll().models;
Related Questions and Answers
Continue research with similar issue discussions.
Issue #363
[QUESTION] How to get child object ?
Hi @artf i want to ask about get some child from current model, let's say in that source code, can i get child object like get parent objec...
Issue #1534
Update property Input value from model style.
@artf I want to update height of the element and want to give a custom height using following code It's working fine and it's update the se...
Issue #1424
Checkbox trait value is rendered differently in view (render()) vs model (getHtml())
I have a custom component with a checkbox trait 'show-name'. When the trait value is 'true', the component renders in the view to the attri...
Issue #565
Custom html elements
Is it possible, and if so how to do it, to use a custom html element e.g. <body> <my-custom-tag/> </body> Which will render specific html f...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.