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,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 {};

56
node_modules/jodit/esm/plugins/format-block/config.js generated vendored Normal file
View File

@@ -0,0 +1,56 @@
/*!
* 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 { Dom } from "../../core/dom/dom.js";
import { isPlainObject } from "../../core/helpers/checker/is-plain-object.js";
import { Icon } from "../../core/ui/icon.js";
import { Config } from "../../config.js";
import paragraphIcon from "./paragraph.svg.js";
Icon.set('paragraph', paragraphIcon);
Config.prototype.controls.paragraph = {
command: 'formatBlock',
value(editor, button) {
var _a, _b;
const control = button.control, current = editor.s.current();
const currentBox = Dom.closest(current, Dom.isBlock, editor.editor);
return (_a = currentBox === null || currentBox === void 0 ? void 0 : currentBox.nodeName.toLowerCase()) !== null && _a !== void 0 ? _a : (_b = control.data) === null || _b === void 0 ? void 0 : _b.currentValue;
},
update(editor, button) {
const control = button.control, current = editor.s.current();
if (!current) {
return false;
}
const currentValue = button.state.value, list = control.list;
if (isPlainObject(list) && list[currentValue.toString()]) {
if (editor.o.textIcons) {
button.state.text = list[currentValue.toString()].toString();
}
}
return false;
},
data: {
currentValue: 'p'
},
list: {
p: 'Paragraph',
h1: 'Heading 1',
h2: 'Heading 2',
h3: 'Heading 3',
h4: 'Heading 4',
blockquote: 'Quote',
pre: 'Code'
},
isChildActive: (editor, button) => {
var _a, _b;
return Boolean(button.state.value === ((_b = (_a = button.control) === null || _a === void 0 ? void 0 : _a.args) === null || _b === void 0 ? void 0 : _b[0]));
},
isActive: (editor, button) => {
return (button.state.value !== editor.o.enter &&
isPlainObject(button.control.list) &&
Boolean(button.control.list[button.state.value]));
},
childTemplate: (e, key, value) => `<${key} style="margin:0;padding:0"><span>${e.i18n(value)}</span></${key}>`,
tooltip: 'Insert format block'
};

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/format-block/README.md]]
* @packageDocumentation
* @module plugins/format-block
*/
import type { IJodit } from "../../types/index";
import "./config";
/**
* Process command - `formatblock`
*/
export declare function formatBlock(editor: IJodit): void;

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
*/
import { pluginSystem } from "../../core/global.js";
import "./config.js";
/**
* Process command - `formatblock`
*/
export function formatBlock(editor) {
editor.registerButton({
name: 'paragraph',
group: 'font'
});
editor.registerCommand('formatblock', (command, second, third) => {
editor.s.commitStyle({
element: third
});
editor.synchronizeValues();
return false;
});
}
pluginSystem.add('formatBlock', formatBlock);

View File

@@ -0,0 +1 @@
export default "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 1792\"><path d=\"M1534 189v73q0 29-18.5 61t-42.5 32q-50 0-54 1-26 6-32 31-3 11-3 64v1152q0 25-18 43t-43 18h-108q-25 0-43-18t-18-43v-1218h-143v1218q0 25-17.5 43t-43.5 18h-108q-26 0-43.5-18t-17.5-43v-496q-147-12-245-59-126-58-192-179-64-117-64-259 0-166 88-286 88-118 209-159 111-37 417-37h479q25 0 43 18t18 43z\"/></svg> ";