+ function scrollToText(scrollId) {
+ const element = editor.dom.get(encodeURIComponent(scrollId).replace(/!/g, '%21'));
+ if (!element) {
+ return;
+ }
+
+ // scroll the element into the view and put the cursor at the end.
+ element.scrollIntoView();
+ editor.selection.select(element, true);
+ editor.selection.collapse(false);
+ editor.focus();
+ }
+