define(['Dom/Util'], function(DomUtil) {
"use strict";
+ if (!COMPILER_TARGET_DEFAULT) {
+ var Fake = function() {};
+ Fake.prototype = {
+ format: function() {},
+ removeFormat: function() {},
+ _handleParentNodes: function() {},
+ _getLastMatchingParent: function() {},
+ _isBoundaryElement: function() {},
+ _getSelectionMarker: function() {}
+ };
+ return Fake;
+ }
+
+ var _isValidSelection = function(editorElement) {
+ var element = window.getSelection().anchorNode;
+ while (element) {
+ if (element === editorElement) {
+ return true;
+ }
+
+ element = element.parentNode;
+ }
+
+ return false;
+ };
+
/**
* @exports WoltLabSuite/Core/Ui/Redactor/Format
*/