+ if(ret && ret instanceof canvas.wlxmlDocument.CaretFragment && ret.isValid()) {
+ logger.debug('The action returned a valid fragment');
+ canvas.setCurrentElement(ret.node, {caretTo: ret.offset});
+ return;
+ }
+ logger.debug('No valid fragment returned from the action');
+