inital commit

This commit is contained in:
2026-01-01 15:25:19 +05:30
commit f0ae49465a
36361 changed files with 4894111 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
/**
* [[include:plugins/clipboard/README.md]]
* @packageDocumentation
* @module plugins/clipboard
*/
import type { IJodit, IPlugin } from "../../types/index";
import type { Plugin } from "../../core/plugin/index";
import "./config";
/**
* Clipboard plugin - cut and copy functionality
*/
export declare class clipboard implements IPlugin {
jodit: IJodit;
/** @override */
buttons: Plugin['buttons'];
init(editor: IJodit): void;
/** @override */
destruct(editor: IJodit): void;
}

72
node_modules/jodit/esm/plugins/clipboard/clipboard.js generated vendored Normal file
View File

@@ -0,0 +1,72 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import { CLIPBOARD_ID, INSERT_AS_HTML, TEXT_HTML, TEXT_PLAIN } from "../../core/constants.js";
import { cached } from "../../core/decorators/cache/cache.js";
import { pluginSystem } from "../../core/global.js";
import { getDataTransfer, stripTags } from "../../core/helpers/index.js";
import "./config.js";
/**
* Clipboard plugin - cut and copy functionality
*/
export class clipboard {
constructor() {
/** @override */
this.buttons = [
{
name: 'cut',
group: 'clipboard'
},
{
name: 'copy',
group: 'clipboard'
},
{
name: 'paste',
group: 'clipboard'
},
{
name: 'selectall',
group: 'clipboard'
}
];
}
init(editor) {
var _a;
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach(btn => editor.registerButton(btn));
editor.e
.off(`copy.${CLIPBOARD_ID} cut.${CLIPBOARD_ID}`)
.on(`copy.${CLIPBOARD_ID} cut.${CLIPBOARD_ID}`, (event) => {
var _a;
const selectedText = editor.s.html;
const clipboardData = getDataTransfer(event) ||
getDataTransfer(editor.ew) ||
getDataTransfer(event.originalEvent);
if (clipboardData) {
clipboardData.setData(TEXT_PLAIN, stripTags(selectedText));
clipboardData.setData(TEXT_HTML, selectedText);
}
editor.buffer.set(CLIPBOARD_ID, selectedText);
editor.e.fire('pasteStack', {
html: selectedText,
action: editor.o.defaultActionOnPaste ||
INSERT_AS_HTML
});
if (event.type === 'cut') {
editor.s.remove();
editor.s.focus();
}
event.preventDefault();
(_a = editor === null || editor === void 0 ? void 0 : editor.events) === null || _a === void 0 ? void 0 : _a.fire('afterCopy', selectedText);
});
}
/** @override */
destruct(editor) {
var _a, _b;
(_a = cached(editor, 'buffer')) === null || _a === void 0 ? void 0 : _a.set(CLIPBOARD_ID, '');
(_b = editor === null || editor === void 0 ? void 0 : editor.events) === null || _b === void 0 ? void 0 : _b.off('.' + CLIPBOARD_ID);
}
}
pluginSystem.add('clipboard', clipboard);

6
node_modules/jodit/esm/plugins/clipboard/config.d.ts generated vendored Normal file
View File

@@ -0,0 +1,6 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
export {};

30
node_modules/jodit/esm/plugins/clipboard/config.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
/*!
* Jodit Editor (https://xdsoft.net/jodit/)
* Released under MIT see LICENSE.txt in the project root for license information.
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
*/
import { Icon } from "../../core/ui/icon.js";
import { Config } from "../../config.js";
import copyIcon from "./icons/copy.svg.js";
import cutIcon from "./icons/cut.svg.js";
import pasteIcon from "./icons/paste.svg.js";
import selectAllIcon from "./icons/select-all.svg.js";
Config.prototype.controls.cut = {
command: 'cut',
isDisabled: (editor) => editor.s.isCollapsed(),
tooltip: 'Cut selection'
};
Config.prototype.controls.copy = {
command: 'copy',
isDisabled: (editor) => editor.s.isCollapsed(),
tooltip: 'Copy selection'
};
Config.prototype.controls.selectall = {
icon: 'select-all',
command: 'selectall',
tooltip: 'Select all'
};
Icon.set('copy', copyIcon)
.set('cut', cutIcon)
.set('paste', pasteIcon)
.set('select-all', selectAllIcon);

View File

@@ -0,0 +1 @@
export default "<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M24.89,6.61H22.31V4.47A2.47,2.47,0,0,0,19.84,2H6.78A2.47,2.47,0,0,0,4.31,4.47V22.92a2.47,2.47,0,0,0,2.47,2.47H9.69V27.2a2.8,2.8,0,0,0,2.8,2.8h12.4a2.8,2.8,0,0,0,2.8-2.8V9.41A2.8,2.8,0,0,0,24.89,6.61ZM6.78,23.52a.61.61,0,0,1-.61-.6V4.47a.61.61,0,0,1,.61-.6H19.84a.61.61,0,0,1,.61.6V6.61h-8a2.8,2.8,0,0,0-2.8,2.8V23.52Zm19,3.68a.94.94,0,0,1-.94.93H12.49a.94.94,0,0,1-.94-.93V9.41a.94.94,0,0,1,.94-.93h12.4a.94.94,0,0,1,.94.93Z\"/> <path d=\"M23.49,13.53h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z\"/> <path d=\"M23.49,17.37h-9.6a.94.94,0,1,0,0,1.87h9.6a.94.94,0,1,0,0-1.87Z\"/> <path d=\"M23.49,21.22h-9.6a.93.93,0,1,0,0,1.86h9.6a.93.93,0,1,0,0-1.86Z\"/> </svg> ";

View File

@@ -0,0 +1 @@
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 1792\"> <path d=\"M960 896q26 0 45 19t19 45-19 45-45 19-45-19-19-45 19-45 45-19zm300 64l507 398q28 20 25 56-5 35-35 51l-128 64q-13 7-29 7-17 0-31-8l-690-387-110 66q-8 4-12 5 14 49 10 97-7 77-56 147.5t-132 123.5q-132 84-277 84-136 0-222-78-90-84-79-207 7-76 56-147t131-124q132-84 278-84 83 0 151 31 9-13 22-22l122-73-122-73q-13-9-22-22-68 31-151 31-146 0-278-84-82-53-131-124t-56-147q-5-59 15.5-113t63.5-93q85-79 222-79 145 0 277 84 83 52 132 123t56 148q4 48-10 97 4 1 12 5l110 66 690-387q14-8 31-8 16 0 29 7l128 64q30 16 35 51 3 36-25 56zm-681-260q46-42 21-108t-106-117q-92-59-192-59-74 0-113 36-46 42-21 108t106 117q92 59 192 59 74 0 113-36zm-85 745q81-51 106-117t-21-108q-39-36-113-36-100 0-192 59-81 51-106 117t21 108q39 36 113 36 100 0 192-59zm178-613l96 58v-11q0-36 33-56l14-8-79-47-26 26q-3 3-10 11t-12 12q-2 2-4 3.5t-3 2.5zm224 224l96 32 736-576-128-64-768 431v113l-160 96 9 8q2 2 7 6 4 4 11 12t11 12l26 26zm704 416l128-64-520-408-177 138q-2 3-13 7z\"/> </svg> ";

View File

@@ -0,0 +1 @@
export default "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"> <path stroke-width=\"0\" d=\"M10.5 20H2a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h1V3l2.03-.4a3 3 0 0 1 5.94 0L13 3v1h1a2 2 0 0 1 2 2v1h-2V6h-1v1H3V6H2v12h5v2h3.5zM8 4a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm2 4h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2h-8a2 2 0 0 1-2-2v-8c0-1.1.9-2 2-2zm0 2v8h8v-8h-8z\"/> </svg> ";

View File

@@ -0,0 +1 @@
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 18 18\"> <g fill-rule=\"evenodd\" stroke=\"none\" stroke-width=\"1\"> <g transform=\"translate(-381.000000, -381.000000)\"> <g transform=\"translate(381.000000, 381.000000)\"> <path d=\"M0,2 L2,2 L2,0 C0.9,0 0,0.9 0,2 L0,2 Z M0,10 L2,10 L2,8 L0,8 L0,10 L0,10 Z M4,18 L6,18 L6,16 L4,16 L4,18 L4,18 Z M0,6 L2,6 L2,4 L0,4 L0,6 L0,6 Z M10,0 L8,0 L8,2 L10,2 L10,0 L10,0 Z M16,0 L16,2 L18,2 C18,0.9 17.1,0 16,0 L16,0 Z M2,18 L2,16 L0,16 C0,17.1 0.9,18 2,18 L2,18 Z M0,14 L2,14 L2,12 L0,12 L0,14 L0,14 Z M6,0 L4,0 L4,2 L6,2 L6,0 L6,0 Z M8,18 L10,18 L10,16 L8,16 L8,18 L8,18 Z M16,10 L18,10 L18,8 L16,8 L16,10 L16,10 Z M16,18 C17.1,18 18,17.1 18,16 L16,16 L16,18 L16,18 Z M16,6 L18,6 L18,4 L16,4 L16,6 L16,6 Z M16,14 L18,14 L18,12 L16,12 L16,14 L16,14 Z M12,18 L14,18 L14,16 L12,16 L12,18 L12,18 Z M12,2 L14,2 L14,0 L12,0 L12,2 L12,2 Z M4,14 L14,14 L14,4 L4,4 L4,14 L4,14 Z M6,6 L12,6 L12,12 L6,12 L6,6 L6,6 Z\"/> </g> </g> </g> </svg> ";