зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-08-28 15:36:17 +03:00
build: Update Quill imageUploader
Этот коммит содержится в:
@@ -1,198 +1,362 @@
|
||||
import LoadingImage from "./blots/image.js";
|
||||
/******/ (function(modules) { // webpackBootstrap
|
||||
/******/ // The module cache
|
||||
/******/ var installedModules = {};
|
||||
/******/
|
||||
/******/ // The require function
|
||||
/******/ function __webpack_require__(moduleId) {
|
||||
/******/
|
||||
/******/ // Check if module is in cache
|
||||
/******/ if(installedModules[moduleId]) {
|
||||
/******/ return installedModules[moduleId].exports;
|
||||
/******/ }
|
||||
/******/ // Create a new module (and put it into the cache)
|
||||
/******/ var module = installedModules[moduleId] = {
|
||||
/******/ i: moduleId,
|
||||
/******/ l: false,
|
||||
/******/ exports: {}
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Execute the module function
|
||||
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
||||
/******/
|
||||
/******/ // Flag the module as loaded
|
||||
/******/ module.l = true;
|
||||
/******/
|
||||
/******/ // Return the exports of the module
|
||||
/******/ return module.exports;
|
||||
/******/ }
|
||||
/******/
|
||||
/******/
|
||||
/******/ // expose the modules object (__webpack_modules__)
|
||||
/******/ __webpack_require__.m = modules;
|
||||
/******/
|
||||
/******/ // expose the module cache
|
||||
/******/ __webpack_require__.c = installedModules;
|
||||
/******/
|
||||
/******/ // define getter function for harmony exports
|
||||
/******/ __webpack_require__.d = function(exports, name, getter) {
|
||||
/******/ if(!__webpack_require__.o(exports, name)) {
|
||||
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
||||
/******/ }
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // define __esModule on exports
|
||||
/******/ __webpack_require__.r = function(exports) {
|
||||
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
||||
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
||||
/******/ }
|
||||
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // create a fake namespace object
|
||||
/******/ // mode & 1: value is a module id, require it
|
||||
/******/ // mode & 2: merge all properties of value into the ns
|
||||
/******/ // mode & 4: return value when already ns object
|
||||
/******/ // mode & 8|1: behave like require
|
||||
/******/ __webpack_require__.t = function(value, mode) {
|
||||
/******/ if(mode & 1) value = __webpack_require__(value);
|
||||
/******/ if(mode & 8) return value;
|
||||
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
||||
/******/ var ns = Object.create(null);
|
||||
/******/ __webpack_require__.r(ns);
|
||||
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
||||
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
||||
/******/ return ns;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
||||
/******/ __webpack_require__.n = function(module) {
|
||||
/******/ var getter = module && module.__esModule ?
|
||||
/******/ function getDefault() { return module['default']; } :
|
||||
/******/ function getModuleExports() { return module; };
|
||||
/******/ __webpack_require__.d(getter, 'a', getter);
|
||||
/******/ return getter;
|
||||
/******/ };
|
||||
/******/
|
||||
/******/ // Object.prototype.hasOwnProperty.call
|
||||
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
||||
/******/
|
||||
/******/ // __webpack_public_path__
|
||||
/******/ __webpack_require__.p = "";
|
||||
/******/
|
||||
/******/
|
||||
/******/ // Load entry module and return exports
|
||||
/******/ return __webpack_require__(__webpack_require__.s = 0);
|
||||
/******/ })
|
||||
/************************************************************************/
|
||||
/******/ ([
|
||||
/* 0 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
class ImageUploader {
|
||||
constructor(quill, options) {
|
||||
this.quill = quill;
|
||||
this.options = options;
|
||||
this.range = null;
|
||||
this.placeholderDelta = null;
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var _blots_image_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1);
|
||||
/* harmony import */ var _quill_imageUploader_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3);
|
||||
/* harmony import */ var _quill_imageUploader_css__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_quill_imageUploader_css__WEBPACK_IMPORTED_MODULE_1__);
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
if (typeof this.options.upload !== "function")
|
||||
console.warn(
|
||||
"[Missing config] upload function that returns a promise is required"
|
||||
);
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
var toolbar = this.quill.getModule("toolbar");
|
||||
if (toolbar) {
|
||||
toolbar.addHandler("image", this.selectLocalImage.bind(this));
|
||||
}
|
||||
|
||||
this.handleDrop = this.handleDrop.bind(this);
|
||||
this.handlePaste = this.handlePaste.bind(this);
|
||||
|
||||
this.quill.root.addEventListener("drop", this.handleDrop, false);
|
||||
this.quill.root.addEventListener("paste", this.handlePaste, false);
|
||||
|
||||
var ImageUploader = function () {
|
||||
function ImageUploader(quill, options) {
|
||||
_classCallCheck(this, ImageUploader);
|
||||
|
||||
this.quill = quill;
|
||||
this.options = options;
|
||||
this.range = null;
|
||||
|
||||
if (typeof this.options.upload !== "function") {
|
||||
console.warn("[Missing config] upload function that returns a promise is required");
|
||||
}
|
||||
|
||||
selectLocalImage() {
|
||||
this.quill.focus();
|
||||
if (this.options.loadingClass) {
|
||||
_blots_image_js__WEBPACK_IMPORTED_MODULE_0__["default"].className = this.options.loadingClass;
|
||||
}
|
||||
|
||||
var toolbar = this.quill.getModule("toolbar");
|
||||
toolbar.addHandler("image", this.selectLocalImage.bind(this));
|
||||
|
||||
this.handleDrop = this.handleDrop.bind(this);
|
||||
this.handlePaste = this.handlePaste.bind(this);
|
||||
|
||||
this.quill.root.addEventListener("drop", this.handleDrop, false);
|
||||
this.quill.root.addEventListener("paste", this.handlePaste, false);
|
||||
}
|
||||
|
||||
_createClass(ImageUploader, [{
|
||||
key: "selectLocalImage",
|
||||
value: function selectLocalImage() {
|
||||
var _this = this;
|
||||
|
||||
this.range = this.quill.getSelection();
|
||||
this.fileHolder = document.createElement("input");
|
||||
this.fileHolder.setAttribute("type", "file");
|
||||
this.fileHolder.setAttribute("accept", "image/*");
|
||||
this.fileHolder.setAttribute("style", "visibility:hidden");
|
||||
|
||||
this.fileHolder.onchange = this.fileChanged.bind(this);
|
||||
|
||||
document.body.appendChild(this.fileHolder);
|
||||
|
||||
this.fileHolder.click();
|
||||
|
||||
window.requestAnimationFrame(function () {
|
||||
document.body.removeChild(_this.fileHolder);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "handleDrop",
|
||||
value: function handleDrop(evt) {
|
||||
var _this2 = this;
|
||||
|
||||
evt.stopPropagation();
|
||||
evt.preventDefault();
|
||||
if (evt.dataTransfer && evt.dataTransfer.files && evt.dataTransfer.files.length) {
|
||||
if (document.caretRangeFromPoint) {
|
||||
var selection = document.getSelection();
|
||||
var range = document.caretRangeFromPoint(evt.clientX, evt.clientY);
|
||||
if (selection && range) {
|
||||
selection.setBaseAndExtent(range.startContainer, range.startOffset, range.startContainer, range.startOffset);
|
||||
}
|
||||
} else {
|
||||
var _selection = document.getSelection();
|
||||
var _range = document.caretPositionFromPoint(evt.clientX, evt.clientY);
|
||||
if (_selection && _range) {
|
||||
_selection.setBaseAndExtent(_range.offsetNode, _range.offset, _range.offsetNode, _range.offset);
|
||||
}
|
||||
}
|
||||
|
||||
this.range = this.quill.getSelection();
|
||||
this.fileHolder = document.createElement("input");
|
||||
this.fileHolder.setAttribute("type", "file");
|
||||
this.fileHolder.setAttribute("accept", "image/*");
|
||||
this.fileHolder.setAttribute("style", "visibility:hidden");
|
||||
var file = evt.dataTransfer.files[0];
|
||||
|
||||
this.fileHolder.onchange = this.fileChanged.bind(this);
|
||||
|
||||
document.body.appendChild(this.fileHolder);
|
||||
|
||||
this.fileHolder.click();
|
||||
|
||||
window.requestAnimationFrame(() => {
|
||||
document.body.removeChild(this.fileHolder);
|
||||
});
|
||||
}
|
||||
|
||||
handleDrop(evt) {
|
||||
if (
|
||||
evt.dataTransfer &&
|
||||
evt.dataTransfer.files &&
|
||||
evt.dataTransfer.files.length
|
||||
) {
|
||||
evt.stopPropagation();
|
||||
evt.preventDefault();
|
||||
if (document.caretRangeFromPoint) {
|
||||
const selection = document.getSelection();
|
||||
const range = document.caretRangeFromPoint(evt.clientX, evt.clientY);
|
||||
if (selection && range) {
|
||||
selection.setBaseAndExtent(
|
||||
range.startContainer,
|
||||
range.startOffset,
|
||||
range.startContainer,
|
||||
range.startOffset
|
||||
);
|
||||
}
|
||||
} else {
|
||||
const selection = document.getSelection();
|
||||
const range = document.caretPositionFromPoint(evt.clientX, evt.clientY);
|
||||
if (selection && range) {
|
||||
selection.setBaseAndExtent(
|
||||
range.offsetNode,
|
||||
range.offset,
|
||||
range.offsetNode,
|
||||
range.offset
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
this.quill.focus();
|
||||
this.range = this.quill.getSelection();
|
||||
let file = evt.dataTransfer.files[0];
|
||||
|
||||
setTimeout(() => {
|
||||
this.quill.focus();
|
||||
this.range = this.quill.getSelection();
|
||||
this.readAndUploadFile(file);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
|
||||
handlePaste(evt) {
|
||||
let clipboard = evt.clipboardData || window.clipboardData;
|
||||
|
||||
// IE 11 is .files other browsers are .items
|
||||
if (clipboard && (clipboard.items || clipboard.files)) {
|
||||
let items = clipboard.items || clipboard.files;
|
||||
const IMAGE_MIME_REGEX = /^image\/(jpe?g|gif|png|svg|webp)$/i;
|
||||
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if (IMAGE_MIME_REGEX.test(items[i].type)) {
|
||||
let file = items[i].getAsFile ? items[i].getAsFile() : items[i];
|
||||
|
||||
if (file) {
|
||||
this.quill.focus();
|
||||
this.range = this.quill.getSelection();
|
||||
evt.preventDefault();
|
||||
setTimeout(() => {
|
||||
this.quill.focus();
|
||||
this.range = this.quill.getSelection();
|
||||
this.readAndUploadFile(file);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
readAndUploadFile(file) {
|
||||
let isUploadReject = false;
|
||||
|
||||
const fileReader = new FileReader();
|
||||
|
||||
fileReader.addEventListener(
|
||||
"load",
|
||||
() => {
|
||||
if (!isUploadReject) {
|
||||
let base64ImageSrc = fileReader.result;
|
||||
this.insertBase64Image(base64ImageSrc);
|
||||
}
|
||||
},
|
||||
false
|
||||
);
|
||||
|
||||
if (file) {
|
||||
fileReader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
this.options.upload(file).then(
|
||||
(imageUrl) => {
|
||||
this.insertToEditor(imageUrl);
|
||||
},
|
||||
(error) => {
|
||||
isUploadReject = true;
|
||||
this.removeBase64Image();
|
||||
console.warn(error);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
fileChanged() {
|
||||
const file = this.fileHolder.files[0];
|
||||
this.readAndUploadFile(file);
|
||||
}
|
||||
|
||||
insertBase64Image(url) {
|
||||
const range = this.range;
|
||||
|
||||
this.placeholderDelta = this.quill.insertEmbed(
|
||||
range.index,
|
||||
LoadingImage.blotName,
|
||||
`${url}`,
|
||||
"user"
|
||||
);
|
||||
}
|
||||
|
||||
insertToEditor(url) {
|
||||
const range = this.range;
|
||||
|
||||
const lengthToDelete = this.calculatePlaceholderInsertLength();
|
||||
|
||||
// Delete the placeholder image
|
||||
this.quill.deleteText(range.index, lengthToDelete, "user");
|
||||
// Insert the server saved image
|
||||
this.quill.insertEmbed(range.index, "image", `${url}`, "user");
|
||||
|
||||
range.index++;
|
||||
this.quill.setSelection(range, "user");
|
||||
}
|
||||
|
||||
// The length of the insert delta from insertBase64Image can vary depending on what part of the line the insert occurs
|
||||
calculatePlaceholderInsertLength() {
|
||||
return this.placeholderDelta.ops.reduce((accumulator, deltaOperation) => {
|
||||
if (deltaOperation.hasOwnProperty('insert'))
|
||||
accumulator++;
|
||||
|
||||
return accumulator;
|
||||
setTimeout(function () {
|
||||
_this2.range = _this2.quill.getSelection();
|
||||
_this2.readAndUploadFile(file);
|
||||
}, 0);
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "handlePaste",
|
||||
value: function handlePaste(evt) {
|
||||
var _this3 = this;
|
||||
|
||||
removeBase64Image() {
|
||||
const range = this.range;
|
||||
const lengthToDelete = this.calculatePlaceholderInsertLength();
|
||||
var clipboard = evt.clipboardData || window.clipboardData;
|
||||
|
||||
this.quill.deleteText(range.index, lengthToDelete, "user");
|
||||
// IE 11 is .files other browsers are .items
|
||||
if (clipboard && (clipboard.items || clipboard.files)) {
|
||||
var items = clipboard.items || clipboard.files;
|
||||
var IMAGE_MIME_REGEX = /^image\/(jpe?g|gif|png|svg|webp)$/i;
|
||||
|
||||
for (var i = 0; i < items.length; i++) {
|
||||
if (IMAGE_MIME_REGEX.test(items[i].type)) {
|
||||
(function () {
|
||||
var file = items[i].getAsFile ? items[i].getAsFile() : items[i];
|
||||
|
||||
if (file) {
|
||||
_this3.range = _this3.quill.getSelection();
|
||||
evt.preventDefault();
|
||||
setTimeout(function () {
|
||||
_this3.range = _this3.quill.getSelection();
|
||||
_this3.readAndUploadFile(file);
|
||||
}, 0);
|
||||
}
|
||||
})();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}, {
|
||||
key: "readAndUploadFile",
|
||||
value: function readAndUploadFile(file) {
|
||||
var _this4 = this;
|
||||
|
||||
var isUploadReject = false;
|
||||
|
||||
var fileReader = new FileReader();
|
||||
|
||||
fileReader.addEventListener("load", function () {
|
||||
if (!isUploadReject) {
|
||||
var base64ImageSrc = fileReader.result;
|
||||
_this4.insertBase64Image(base64ImageSrc);
|
||||
}
|
||||
}, false);
|
||||
|
||||
if (file) {
|
||||
fileReader.readAsDataURL(file);
|
||||
}
|
||||
|
||||
this.options.upload(file).then(function (imageUrl) {
|
||||
_this4.insertToEditor(imageUrl);
|
||||
}, function (error) {
|
||||
isUploadReject = true;
|
||||
_this4.removeBase64Image();
|
||||
console.warn(error);
|
||||
});
|
||||
}
|
||||
}, {
|
||||
key: "fileChanged",
|
||||
value: function fileChanged() {
|
||||
var file = this.fileHolder.files[0];
|
||||
this.readAndUploadFile(file);
|
||||
}
|
||||
}, {
|
||||
key: "insertBase64Image",
|
||||
value: function insertBase64Image(url) {
|
||||
var range = this.range;
|
||||
|
||||
this.quill.insertEmbed(range.index, _blots_image_js__WEBPACK_IMPORTED_MODULE_0__["default"].blotName, "" + url, "user");
|
||||
}
|
||||
}, {
|
||||
key: "insertToEditor",
|
||||
value: function insertToEditor(url) {
|
||||
var range = this.range;
|
||||
// Delete the placeholder image
|
||||
|
||||
this.quill.deleteText(range.index, 3, "user");
|
||||
// Insert the server saved image
|
||||
this.quill.insertEmbed(range.index, "image", "" + url, "user");
|
||||
|
||||
range.index++;
|
||||
this.quill.setSelection(range, "user");
|
||||
}
|
||||
}, {
|
||||
key: "removeBase64Image",
|
||||
value: function removeBase64Image() {
|
||||
var range = this.range;
|
||||
|
||||
this.quill.deleteText(range.index, 3, "user");
|
||||
}
|
||||
}]);
|
||||
|
||||
return ImageUploader;
|
||||
}();
|
||||
|
||||
window.ImageUploader = ImageUploader;
|
||||
export default ImageUploader;
|
||||
/* harmony default export */ __webpack_exports__["default"] = (ImageUploader);
|
||||
|
||||
/***/ }),
|
||||
/* 1 */
|
||||
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
||||
|
||||
"use strict";
|
||||
__webpack_require__.r(__webpack_exports__);
|
||||
/* harmony import */ var quill__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2);
|
||||
/* harmony import */ var quill__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(quill__WEBPACK_IMPORTED_MODULE_0__);
|
||||
var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
|
||||
|
||||
var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } };
|
||||
|
||||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
||||
|
||||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
|
||||
|
||||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
|
||||
|
||||
|
||||
|
||||
var InlineBlot = quill__WEBPACK_IMPORTED_MODULE_0___default.a.import('blots/block');
|
||||
|
||||
var LoadingImage = function (_InlineBlot) {
|
||||
_inherits(LoadingImage, _InlineBlot);
|
||||
|
||||
function LoadingImage() {
|
||||
_classCallCheck(this, LoadingImage);
|
||||
|
||||
return _possibleConstructorReturn(this, (LoadingImage.__proto__ || Object.getPrototypeOf(LoadingImage)).apply(this, arguments));
|
||||
}
|
||||
|
||||
_createClass(LoadingImage, [{
|
||||
key: 'deleteAt',
|
||||
value: function deleteAt(index, length) {
|
||||
_get(LoadingImage.prototype.__proto__ || Object.getPrototypeOf(LoadingImage.prototype), 'deleteAt', this).call(this, index, length);
|
||||
this.cache = {};
|
||||
}
|
||||
}], [{
|
||||
key: 'create',
|
||||
value: function create(src) {
|
||||
var node = _get(LoadingImage.__proto__ || Object.getPrototypeOf(LoadingImage), 'create', this).call(this, src);
|
||||
if (src === true) return node;
|
||||
|
||||
var image = document.createElement('img');
|
||||
image.setAttribute('src', src);
|
||||
node.appendChild(image);
|
||||
return node;
|
||||
}
|
||||
}, {
|
||||
key: 'value',
|
||||
value: function value(domNode) {
|
||||
var _domNode$dataset = domNode.dataset,
|
||||
src = _domNode$dataset.src,
|
||||
custom = _domNode$dataset.custom;
|
||||
|
||||
return { src: src, custom: custom };
|
||||
}
|
||||
}]);
|
||||
|
||||
return LoadingImage;
|
||||
}(InlineBlot);
|
||||
|
||||
LoadingImage.blotName = 'imageBlot';
|
||||
LoadingImage.className = 'quill-image-uploading';
|
||||
LoadingImage.tagName = 'span';
|
||||
quill__WEBPACK_IMPORTED_MODULE_0___default.a.register({ 'formats/imageBlot': LoadingImage });
|
||||
|
||||
/* harmony default export */ __webpack_exports__["default"] = (LoadingImage);
|
||||
|
||||
/***/ }),
|
||||
/* 2 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
module.exports = Quill;
|
||||
|
||||
/***/ }),
|
||||
/* 3 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
// removed by extract-text-webpack-plugin
|
||||
|
||||
/***/ })
|
||||
/******/ ]);
|
||||
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
@@ -1,33 +0,0 @@
|
||||
.image-uploading {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.image-uploading img {
|
||||
max-width: 98% !important;
|
||||
filter: blur(5px);
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.image-uploading::before {
|
||||
content: "";
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-top: -15px;
|
||||
margin-left: -15px;
|
||||
border-radius: 50%;
|
||||
border: 3px solid #ccc;
|
||||
border-top-color: #1e986c;
|
||||
z-index: 1;
|
||||
animation: spinner 0.6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spinner {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
@@ -1,15 +1,15 @@
|
||||
.image-uploading {
|
||||
.quill-image-uploading {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.image-uploading img {
|
||||
.quill-image-uploading img {
|
||||
max-width: 98% !important;
|
||||
filter: blur(5px);
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.image-uploading::before {
|
||||
.quill-image-uploading::before {
|
||||
content: "";
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
@@ -21,7 +21,7 @@
|
||||
margin-left: -15px;
|
||||
border-radius: 50%;
|
||||
border: 3px solid #ccc;
|
||||
border-top-color: #1e986c;
|
||||
border-top-color: #1e40af;
|
||||
z-index: 1;
|
||||
animation: spinner 0.6s linear infinite;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user