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

22
node_modules/jodit/esm/plugins/media/config.d.ts generated vendored Normal file
View File

@@ -0,0 +1,22 @@
/*!
* 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
*/
declare module 'jodit/config' {
interface Config {
/**
* Decorate media elements
*/
mediaInFakeBlock: boolean;
/**
* Decorate media element with tag
*/
mediaFakeTag: string;
/**
* Media tags
*/
mediaBlocks: string[];
}
}
export {};

12
node_modules/jodit/esm/plugins/media/config.js generated vendored Normal file
View File

@@ -0,0 +1,12 @@
/*!
* 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
*/
/**
* @module plugins/media
*/
import { Config } from "../../config.js";
Config.prototype.mediaFakeTag = 'jodit-media';
Config.prototype.mediaInFakeBlock = true;
Config.prototype.mediaBlocks = ['video', 'audio'];

16
node_modules/jodit/esm/plugins/media/media.d.ts generated vendored Normal file
View File

@@ -0,0 +1,16 @@
/*!
* 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/media/README.md]]
* @packageDocumentation
* @module plugins/media
*/
import type { IJodit } from "../../types/index";
import "./config";
/**
* Process `video` and `audio`
*/
export declare function media(editor: IJodit): void;

68
node_modules/jodit/esm/plugins/media/media.js generated vendored Normal file
View File

@@ -0,0 +1,68 @@
/*!
* 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 * as consts from "../../core/constants.js";
import { pluginSystem } from "../../core/global.js";
import { $$, attr, dataBind } from "../../core/helpers/utils/index.js";
import "./config.js";
/**
* Process `video` and `audio`
*/
export function media(editor) {
const keyFake = 'jodit_fake_wrapper';
const { mediaFakeTag, mediaBlocks, mediaInFakeBlock } = editor.options;
const wrap = (element) => {
if (element.parentNode &&
attr(element.parentNode, 'data-jodit_iframe_wrapper')) {
element = element.parentNode;
}
else {
const wrapper = editor.createInside.element(mediaFakeTag, {
'data-jodit-temp': 1,
contenteditable: false,
draggable: true,
[`data-${keyFake}`]: 1
});
attr(wrapper, 'style', attr(element, 'style'));
wrapper.style.display =
element.style.display === 'inline-block'
? 'inline-block'
: 'block';
wrapper.style.width = element.offsetWidth + 'px';
wrapper.style.height = element.offsetHeight + 'px';
if (element.parentNode) {
element.parentNode.insertBefore(wrapper, element);
}
wrapper.appendChild(element);
element = wrapper;
}
editor.e
.off(element, 'mousedown.select touchstart.select')
.on(element, 'mousedown.select touchstart.select', () => {
editor.s.setCursorAfter(element);
});
};
if (mediaInFakeBlock) {
editor.e
.on('afterGetValueFromEditor', (data) => {
const rxp = new RegExp(`<${mediaFakeTag}[^>]+data-${keyFake}[^>]+>([^]+?)</${mediaFakeTag}>`, 'ig');
if (rxp.test(data.value)) {
data.value = data.value.replace(rxp, '$1');
}
})
.on('change afterInit afterSetMode changePlace', editor.async.debounce(() => {
if (!editor.isDestructed &&
editor.getMode() !== consts.MODE_SOURCE) {
$$(mediaBlocks.join(','), editor.editor).forEach((elm) => {
if (!dataBind(elm, keyFake)) {
dataBind(elm, keyFake, true);
wrap(elm);
}
});
}
}, editor.defaultTimeout));
}
}
pluginSystem.add('media', media);