mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-01 04:14:28 +01:00
Patch summernote to fix issues in Chrome/Chromium
As we are using a customized version for the Bootstrap 5 compatibility anyways, with this we are also including the changes proposed in summernote/summernote#4034 to fix #2816.
This commit is contained in:
committed by
Andrew Camilleri
parent
69c5f5b9e5
commit
203db44b4e
@@ -1,4 +1,4 @@
|
||||
/*!
|
||||
/*!
|
||||
*
|
||||
* Super simple wysiwyg editor v0.8.18
|
||||
* https://summernote.org
|
||||
@@ -7053,7 +7053,7 @@ var AutoLink_AutoLink = /*#__PURE__*/function () {
|
||||
if (match && (match[1] || match[2])) {
|
||||
var link = match[1] ? keyword : defaultScheme + keyword;
|
||||
var urlText = this.options.showDomainOnlyForAutolink ? keyword.replace(/^(?:https?:\/\/)?(?:tel?:?)?(?:mailto?:?)?(?:www\.)?/i, '').split('/')[0] : keyword;
|
||||
var node = external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<a />').html(urlText).attr('href', link)[0];
|
||||
var node = external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<a></a>').html(urlText).attr('href', link)[0];
|
||||
|
||||
if (this.context.options.linkTargetBlank) {
|
||||
external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()(node).attr('target', '_blank');
|
||||
@@ -8356,11 +8356,11 @@ var LinkDialog_LinkDialog = /*#__PURE__*/function () {
|
||||
key: "initialize",
|
||||
value: function initialize() {
|
||||
var $container = this.options.dialogsInBody ? this.$body : this.options.container;
|
||||
var body = ['<div class="form-group note-form-group">', "<label for=\"note-dialog-link-txt-".concat(this.options.id, "\" class=\"note-form-label\">").concat(this.lang.link.textToDisplay, "</label>"), "<input id=\"note-dialog-link-txt-".concat(this.options.id, "\" class=\"note-link-text form-control note-form-control note-input\" type=\"text\"/>"), '</div>', '<div class="form-group note-form-group">', "<label for=\"note-dialog-link-url-".concat(this.options.id, "\" class=\"note-form-label\">").concat(this.lang.link.url, "</label>"), "<input id=\"note-dialog-link-url-".concat(this.options.id, "\" class=\"note-link-url form-control note-form-control note-input\" type=\"text\" value=\"http://\"/>"), '</div>', !this.options.disableLinkTarget ? external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<div/>').append(this.ui.checkbox({
|
||||
var body = ['<div class="form-group note-form-group">', "<label for=\"note-dialog-link-txt-".concat(this.options.id, "\" class=\"note-form-label\">").concat(this.lang.link.textToDisplay, "</label>"), "<input id=\"note-dialog-link-txt-".concat(this.options.id, "\" class=\"note-link-text form-control note-form-control note-input\" type=\"text\"/>"), '</div>', '<div class="form-group note-form-group">', "<label for=\"note-dialog-link-url-".concat(this.options.id, "\" class=\"note-form-label\">").concat(this.lang.link.url, "</label>"), "<input id=\"note-dialog-link-url-".concat(this.options.id, "\" class=\"note-link-url form-control note-form-control note-input\" type=\"text\" value=\"http://\"/>"), '</div>', !this.options.disableLinkTarget ? external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<div></div>').append(this.ui.checkbox({
|
||||
className: 'sn-checkbox-open-in-new-window',
|
||||
text: this.lang.link.openInNewWindow,
|
||||
checked: true
|
||||
}).render()).html() : '', external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<div/>').append(this.ui.checkbox({
|
||||
}).render()).html() : '', external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<div></div>').append(this.ui.checkbox({
|
||||
className: 'sn-checkbox-use-protocol',
|
||||
text: this.lang.link.useProtocol,
|
||||
checked: true
|
||||
@@ -9211,7 +9211,7 @@ var HelpDialog_HelpDialog = /*#__PURE__*/function () {
|
||||
$row.append(external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<label><kbd>' + key + '</kdb></label>').css({
|
||||
'width': 180,
|
||||
'margin-right': 10
|
||||
})).append(external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<span/>').html(_this.context.memo('help.' + command) || command));
|
||||
})).append(external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<span></span>').html(_this.context.memo('help.' + command) || command));
|
||||
return $row.html();
|
||||
}).join('');
|
||||
}
|
||||
@@ -9560,7 +9560,7 @@ var HintPopover_HintPopover = /*#__PURE__*/function () {
|
||||
return items.map(function (item
|
||||
/*, idx */
|
||||
) {
|
||||
var $item = external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<div class="note-hint-item"/>');
|
||||
var $item = external_root_jQuery_commonjs2_jquery_commonjs_jquery_amd_jquery_default()('<div class="note-hint-item"></div>');
|
||||
$item.append(hint.template ? hint.template(item) : item + '');
|
||||
$item.data({
|
||||
'index': hintIdx,
|
||||
@@ -10007,13 +10007,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
||||
|
||||
|
||||
|
||||
var editor = renderer["a" /* default */].create('<div class="note-editor note-frame card"/>');
|
||||
var toolbar = renderer["a" /* default */].create('<div class="note-toolbar card-header" role="toolbar"/>');
|
||||
var editingArea = renderer["a" /* default */].create('<div class="note-editing-area"/>');
|
||||
var codable = renderer["a" /* default */].create('<textarea class="note-codable" aria-multiline="true"/>');
|
||||
var editable = renderer["a" /* default */].create('<div class="note-editable card-block" contentEditable="true" role="textbox" aria-multiline="true"/>');
|
||||
var editor = renderer["a" /* default */].create('<div class="note-editor note-frame card"></div>');
|
||||
var toolbar = renderer["a" /* default */].create('<div class="note-toolbar card-header" role="toolbar"></div>');
|
||||
var editingArea = renderer["a" /* default */].create('<div class="note-editing-area"></div>');
|
||||
var codable = renderer["a" /* default */].create('<textarea class="note-codable" aria-multiline="true"></textarea>');
|
||||
var editable = renderer["a" /* default */].create('<div class="note-editable card-block" contentEditable="true" role="textbox" aria-multiline="true"></div>');
|
||||
var statusbar = renderer["a" /* default */].create(['<output class="note-status-output" role="status" aria-live="polite"></output>', '<div class="note-statusbar" role="status">', '<div class="note-resizebar" aria-label="Resize">', '<div class="note-icon-bar"></div>', '<div class="note-icon-bar"></div>', '<div class="note-icon-bar"></div>', '</div>', '</div>'].join(''));
|
||||
var airEditor = renderer["a" /* default */].create('<div class="note-editor note-airframe"/>');
|
||||
var airEditor = renderer["a" /* default */].create('<div class="note-editor note-airframe"></div>');
|
||||
var airEditable = renderer["a" /* default */].create(['<div class="note-editable" contentEditable="true" role="textbox" aria-multiline="true"></div>', '<output class="note-status-output" role="status" aria-live="polite"></output>'].join(''));
|
||||
var buttonGroup = renderer["a" /* default */].create('<div class="note-btn-group btn-group">');
|
||||
var dropdown = renderer["a" /* default */].create('<div class="note-dropdown-menu dropdown-menu" role="list">', function ($node, options) {
|
||||
@@ -10052,7 +10052,7 @@ var dropdownCheck = renderer["a" /* default */].create('<div class="note-dropdow
|
||||
$node.addClass('note-codeview-keep');
|
||||
}
|
||||
});
|
||||
var dialog = renderer["a" /* default */].create('<div class="modal note-modal" aria-hidden="false" tabindex="-1" role="dialog"/>', function ($node, options) {
|
||||
var dialog = renderer["a" /* default */].create('<div class="modal note-modal" aria-hidden="false" tabindex="-1" role="dialog"></div>', function ($node, options) {
|
||||
if (options.fade) {
|
||||
$node.addClass('fade');
|
||||
}
|
||||
@@ -10099,7 +10099,7 @@ var ui_ui = function ui(editorOptions) {
|
||||
checkbox: ui_checkbox,
|
||||
options: editorOptions,
|
||||
palette: function palette($node, options) {
|
||||
return renderer["a" /* default */].create('<div class="note-color-palette"/>', function ($node, options) {
|
||||
return renderer["a" /* default */].create('<div class="note-color-palette"></div>', function ($node, options) {
|
||||
var contents = [];
|
||||
|
||||
for (var row = 0, rowSize = options.colors.length; row < rowSize; row++) {
|
||||
|
||||
Reference in New Issue
Block a user