jodit-pro
Version:
PRO Version of Jodit Editor
132 lines (112 loc) • 6.83 kB
JavaScript
/*!
* jodit-pro - PRO Version of Jodit Editor
* Author: Chupurnov Valerii <chupurnov@gmail.com>
* Version: v4.9.27
* Url: https://xdsoft.net/jodit/pro/
* License(s): SEE LICENSE IN LICENSE.md
*/
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(self, function() {
return (self["webpackChunkjodit_pro"] = self["webpackChunkjodit_pro"] || []).push([[426],{
/***/ 25088:
/***/ (function(module) {
module.exports = "<svg width=\"11\" height=\"15\" viewBox=\"0 0 11 15\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M10.925 7.122V14H9.747L9.462 13.164C9.044 13.4933 8.55 13.7467 7.98 13.924C7.42267 14.1013 6.82733 14.19 6.194 14.19C5.054 14.19 4.066 13.9177 3.23 13.373C2.394 12.8157 1.75433 12.024 1.311 10.998C0.867667 9.972 0.646 8.756 0.646 7.35C0.646 5.96933 0.880333 4.766 1.349 3.74C1.83033 2.714 2.50167 1.92233 3.363 1.365C4.237 0.794999 5.25667 0.509999 6.422 0.509999C7.41 0.509999 8.284 0.693666 9.044 1.061C9.804 1.42833 10.3613 1.935 10.716 2.581L9.747 3.55C9.41767 3.03067 8.968 2.638 8.398 2.372C7.84067 2.09333 7.18833 1.954 6.441 1.954C5.17433 1.954 4.18633 2.429 3.477 3.379C2.76767 4.329 2.413 5.65267 2.413 7.35C2.413 9.07267 2.755 10.4153 3.439 11.378C4.13567 12.3407 5.10467 12.822 6.346 12.822C6.92867 12.822 7.46067 12.7397 7.942 12.575C8.436 12.4103 8.854 12.1697 9.196 11.853V8.414H6.023V7.122H10.925Z\" fill=\"black\"/> </svg>"
/***/ }),
/***/ 40650:
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
;
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ googleSearch: function() { return /* binding */ googleSearch; }
/* harmony export */ });
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80294);
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20616);
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67709);
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82749);
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18766);
/* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23078);
/* harmony import */ var _icon_svg__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(25088);
/* harmony import */ var _icon_svg__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_icon_svg__WEBPACK_IMPORTED_MODULE_6__);
/* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(6441);
/* harmony import */ var jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(21537);
/* harmony import */ var jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(50911);
/* harmony import */ var jodit_esm_plugins_placeholder_placeholder__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(59451);
/* harmony import */ var jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(2692);
/*!
* Jodit Editor PRO (https://xdsoft.net/jodit/)
* See LICENSE.md in the project root for license information.
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
*/
jodit_esm_config__WEBPACK_IMPORTED_MODULE_7__.Config.prototype.controls.google = {
tooltip: 'Google search',
icon: (_icon_svg__WEBPACK_IMPORTED_MODULE_6___default()),
isDisabled: function isDisabled(e) {
return (0,jodit_esm_plugins_placeholder_placeholder__WEBPACK_IMPORTED_MODULE_10__.isEditorEmpty)(e.editor);
},
command: 'startSearch'
};
var googleSearch = /*#__PURE__*/ function(Plugin) {
"use strict";
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(googleSearch, Plugin);
function googleSearch() {
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, googleSearch);
var _this;
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, googleSearch, arguments), /** @override */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "buttons", [
{
name: 'google',
group: 'search'
}
]);
return _this;
}
(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(googleSearch, [
{
key: "afterInit",
value: /** @override */ function afterInit(jodit) {
jodit.registerCommand('startSearch', {
exec: function exec() {
var query;
var s = jodit.s;
if (s.isCollapsed()) {
var _s_current_parentElement, _s_current;
query = (_s_current = s.current()) === null || _s_current === void 0 ? void 0 : (_s_current_parentElement = _s_current.parentElement) === null || _s_current_parentElement === void 0 ? void 0 : _s_current_parentElement.innerText;
} else {
var _s_sel;
query = (_s_sel = s.sel) === null || _s_sel === void 0 ? void 0 : _s_sel.toString();
}
if (query) {
var url = 'https://www.google.com/search?q=' + encodeURIComponent((0,jodit_esm_core_helpers__WEBPACK_IMPORTED_MODULE_8__.trim)(query));
window.open(url, '_blank');
}
}
});
}
},
{
key: "beforeDestruct",
value: /** @override */ function beforeDestruct(jodit) {}
}
]);
return googleSearch;
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_5__._)(jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_9__.Plugin));
/** @override */ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(googleSearch, "requires", [
'license'
]);
jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_11__.JoditPro.plugins.add('google-search', googleSearch);
/***/ })
},
/******/ function(__webpack_require__) { // webpackRuntimeModules
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
/******/ var __webpack_exports__ = (__webpack_exec__(40650));
/******/ return __webpack_exports__;
/******/ }
]);
});