Update js

parent 3e665a2a
......@@ -22,7 +22,7 @@
@licend The above is the entire license notice
for the JavaScript code in this page.
*/
"use strict";
window.addEventListener('touchstart', {}); // in top window
window.addEventListener('touchmove', {}); // in top window
......
......@@ -22,7 +22,7 @@
@licend The above is the entire license notice
for the JavaScript code in this page.
*/
"use strict";
var children_nodes;
var quill;
var url_name;
......
......@@ -8517,6 +8517,113 @@ exports.matchText = matchText;
module.exports = __webpack_require__(29);
/***/ })
/******/ ])["default"];
});th > 0) {
delta = applyFormat(delta, formats);
}
if (parseFloat(style.textIndent || 0) > 0) {
// Could be 0.5in
delta = new _quillDelta2.default().insert('\t').concat(delta);
}
return delta;
}
function matchText(node, delta) {
var text = node.data;
// Word represents empty line with <o:p>&nbsp;</o:p>
if (node.parentNode.tagName === 'O:P') {
return delta.insert(text.trim());
}
if (text.trim().length === 0 && node.parentNode.classList.contains('ql-clipboard')) {
return delta;
}
if (!computeStyle(node.parentNode).whiteSpace.startsWith('pre')) {
// eslint-disable-next-line func-style
var replacer = function replacer(collapse, match) {
match = match.replace(/[^\u00a0]/g, ''); // \u00a0 is nbsp;
return match.length < 1 && collapse ? ' ' : match;
};
text = text.replace(/\r\n/g, ' ').replace(/\n/g, ' ');
text = text.replace(/\s\s+/g, replacer.bind(replacer, true)); // collapse whitespace
if (node.previousSibling == null && isLine(node.parentNode) || node.previousSibling != null && isLine(node.previousSibling)) {
text = text.replace(/^\s+/, replacer.bind(replacer, false));
}
if (node.nextSibling == null && isLine(node.parentNode) || node.nextSibling != null && isLine(node.nextSibling)) {
text = text.replace(/\s+$/, replacer.bind(replacer, false));
}
}
return delta.insert(text);
}
exports.default = Clipboard;
exports.matchAttributor = matchAttributor;
exports.matchBlot = matchBlot;
exports.matchNewline = matchNewline;
exports.matchSpacing = matchSpacing;
exports.matchText = matchText;
/***/ }),
/* 56 */,
/* 57 */,
/* 58 */,
/* 59 */,
/* 60 */,
/* 61 */,
/* 62 */,
/* 63 */,
/* 64 */,
/* 65 */,
/* 66 */,
/* 67 */,
/* 68 */,
/* 69 */,
/* 70 */,
/* 71 */,
/* 72 */,
/* 73 */,
/* 74 */,
/* 75 */,
/* 76 */,
/* 77 */,
/* 78 */,
/* 79 */,
/* 80 */,
/* 81 */,
/* 82 */,
/* 83 */,
/* 84 */,
/* 85 */,
/* 86 */,
/* 87 */,
/* 88 */,
/* 89 */,
/* 90 */,
/* 91 */,
/* 92 */,
/* 93 */,
/* 94 */,
/* 95 */,
/* 96 */,
/* 97 */,
/* 98 */,
/* 99 */,
/* 100 */,
/* 101 */,
/* 102 */,
/* 103 */,
/* 104 */,
/* 105 */,
/* 106 */,
/* 107 */,
/* 108 */,
/* 109 */,
/* 110 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(29);
/***/ })
/******/ ])["default"];
});
\ No newline at end of file
......@@ -11484,6 +11484,74 @@ exports.default = BubbleTheme;
module.exports = __webpack_require__(63);
/***/ })
/******/ ])["default"];
});this2.quill.getBounds(range));
} else {
var lastLine = lines[lines.length - 1];
var index = _this2.quill.getIndex(lastLine);
var length = Math.min(lastLine.length() - 1, range.index + range.length - index);
var _bounds = _this2.quill.getBounds(new _selection.Range(index, length));
_this2.position(_bounds);
}
} else if (document.activeElement !== _this2.textbox && _this2.quill.hasFocus()) {
_this2.hide();
}
});
return _this2;
}
_createClass(BubbleTooltip, [{
key: 'listen',
value: function listen() {
var _this3 = this;
_get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'listen', this).call(this);
this.root.querySelector('.ql-close').addEventListener('click', function () {
_this3.root.classList.remove('ql-editing');
});
this.quill.on(_emitter2.default.events.SCROLL_OPTIMIZE, function () {
// Let selection be restored by toolbar handlers before repositioning
setTimeout(function () {
if (_this3.root.classList.contains('ql-hidden')) return;
var range = _this3.quill.getSelection();
if (range != null) {
_this3.position(_this3.quill.getBounds(range));
}
}, 1);
});
}
}, {
key: 'cancel',
value: function cancel() {
this.show();
}
}, {
key: 'position',
value: function position(reference) {
var shift = _get(BubbleTooltip.prototype.__proto__ || Object.getPrototypeOf(BubbleTooltip.prototype), 'position', this).call(this, reference);
var arrow = this.root.querySelector('.ql-tooltip-arrow');
arrow.style.marginLeft = '';
if (shift === 0) return shift;
arrow.style.marginLeft = -1 * shift - arrow.offsetWidth / 2 + 'px';
}
}]);
return BubbleTooltip;
}(_base.BaseTooltip);
BubbleTooltip.TEMPLATE = ['<span class="ql-tooltip-arrow"></span>', '<div class="ql-tooltip-editor">', '<input type="text" data-formula="e=mc^2" data-link="https://quilljs.com" data-video="Embed URL">', '<a class="ql-close"></a>', '</div>'].join('');
exports.BubbleTooltip = BubbleTooltip;
exports.default = BubbleTheme;
/***/ }),
/* 109 */
/***/ (function(module, exports, __webpack_require__) {
module.exports = __webpack_require__(63);
/***/ })
/******/ ])["default"];
});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment