@ckeditor/ckeditor5-source-editing 41.2.0 → 41.3.0-alpha.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/content-index.css +4 -0
- package/dist/editor-index.css +43 -0
- package/dist/index.css +87 -0
- package/dist/index.css.map +1 -0
- package/dist/index.js +490 -0
- package/dist/index.js.map +1 -0
- package/dist/types/augmentation.d.ts +18 -0
- package/dist/types/index.d.ts +10 -0
- package/dist/types/sourceediting.d.ts +103 -0
- package/dist/types/sourceeditingconfig.d.ts +34 -0
- package/dist/types/utils/formathtml.d.ts +19 -0
- package/package.json +4 -3
@@ -0,0 +1,43 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
.ck-source-editing-area {
|
6
|
+
position: relative;
|
7
|
+
overflow: hidden;
|
8
|
+
}
|
9
|
+
.ck-source-editing-area::after {
|
10
|
+
padding: var(--ck-spacing-large);
|
11
|
+
margin: 0;
|
12
|
+
border: 1px solid transparent;
|
13
|
+
line-height: var(--ck-line-height-base);
|
14
|
+
font-size: var(--ck-font-size-normal);
|
15
|
+
font-family: monospace;
|
16
|
+
white-space: pre-wrap;
|
17
|
+
}
|
18
|
+
.ck-source-editing-area::after {
|
19
|
+
content: attr(data-value) " ";
|
20
|
+
visibility: hidden;
|
21
|
+
display: block;
|
22
|
+
}
|
23
|
+
.ck-source-editing-area textarea {
|
24
|
+
position: absolute;
|
25
|
+
width: 100%;
|
26
|
+
height: 100%;
|
27
|
+
resize: none;
|
28
|
+
outline: none;
|
29
|
+
overflow: hidden;
|
30
|
+
box-sizing: border-box;
|
31
|
+
border-color: var(--ck-color-base-border);
|
32
|
+
border-radius: 0;
|
33
|
+
}
|
34
|
+
.ck-rounded-corners .ck-source-editing-area textarea {
|
35
|
+
border-radius: var(--ck-border-radius);
|
36
|
+
border-top-left-radius: 0;
|
37
|
+
border-top-right-radius: 0;
|
38
|
+
}
|
39
|
+
.ck-source-editing-area textarea:not([readonly]):focus {
|
40
|
+
outline: none;
|
41
|
+
border: var(--ck-focus-ring);
|
42
|
+
box-shadow: var(--ck-inner-shadow), 0 0;
|
43
|
+
}
|
package/dist/index.css
ADDED
@@ -0,0 +1,87 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/*
|
6
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
7
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
8
|
+
*/
|
9
|
+
|
10
|
+
/*
|
11
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
12
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
13
|
+
*/
|
14
|
+
|
15
|
+
/**
|
16
|
+
* Implements rounded corner interface for .ck-rounded-corners class.
|
17
|
+
*
|
18
|
+
* @see $ck-border-radius
|
19
|
+
*/
|
20
|
+
/*
|
21
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
22
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
23
|
+
*/
|
24
|
+
/**
|
25
|
+
* A visual style of focused element's border.
|
26
|
+
*/
|
27
|
+
/*
|
28
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
29
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
30
|
+
*/
|
31
|
+
/**
|
32
|
+
* A helper to combine multiple shadows.
|
33
|
+
*/
|
34
|
+
/**
|
35
|
+
* Gives an element a drop shadow so it looks like a floating panel.
|
36
|
+
*/
|
37
|
+
|
38
|
+
.ck-source-editing-area {
|
39
|
+
position: relative;
|
40
|
+
overflow: hidden;
|
41
|
+
}
|
42
|
+
|
43
|
+
.ck-source-editing-area::after,
|
44
|
+
.ck-source-editing-area textarea {
|
45
|
+
padding: var(--ck-spacing-large);
|
46
|
+
margin: 0;
|
47
|
+
border: 1px solid transparent;
|
48
|
+
line-height: var(--ck-line-height-base);
|
49
|
+
font-size: var(--ck-font-size-normal);
|
50
|
+
font-family: monospace;
|
51
|
+
white-space: pre-wrap;
|
52
|
+
}
|
53
|
+
|
54
|
+
.ck-source-editing-area::after {
|
55
|
+
content: attr(data-value) " ";
|
56
|
+
visibility: hidden;
|
57
|
+
display: block;
|
58
|
+
}
|
59
|
+
|
60
|
+
.ck-source-editing-area textarea {
|
61
|
+
position: absolute;
|
62
|
+
width: 100%;
|
63
|
+
height: 100%;
|
64
|
+
resize: none;
|
65
|
+
outline: none;
|
66
|
+
overflow: hidden;
|
67
|
+
box-sizing: border-box;
|
68
|
+
|
69
|
+
border-color: var(--ck-color-base-border);
|
70
|
+
|
71
|
+
border-radius: 0;
|
72
|
+
}
|
73
|
+
|
74
|
+
.ck-rounded-corners .ck-source-editing-area textarea, .ck-source-editing-area textarea.ck-rounded-corners {
|
75
|
+
border-radius: var(--ck-border-radius);
|
76
|
+
border-top-left-radius: 0;
|
77
|
+
border-top-right-radius: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
.ck-source-editing-area textarea:not([readonly]):focus {
|
81
|
+
/* Disable native outline. */
|
82
|
+
outline: none;
|
83
|
+
border: var(--ck-focus-ring);
|
84
|
+
box-shadow: var(--ck-inner-shadow), 0 0;
|
85
|
+
}
|
86
|
+
|
87
|
+
/*# sourceMappingURL=index.css.map */
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../theme/sourceediting.css","index.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css","../../../node_modules/@ckeditor/ckeditor5-theme-lark/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AAsC,CAAA;ADwDxC,CAAC,CD5BC,MAAA,CAAA,GAAA,CAAA,IAAA,CAAA,MAAA,CAAA,CAAA,CAAyB,CAAA;AC6B3B,CAAC,CD5BC,MAAA,CAAA,GAAA,CAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAA0B,CAAA;AAO5B,CAAA;ACuBA;AD3BC,CAAA,EAAA,CAAA,MAAA,CAAA,OAAA,CAAA,IAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA;AC6BD,CAAC,CEnEA,CAAA,CAAA,CAAA,OAAA,CAAA,MAAA,CAAA,OAAA,CAAA,CAAA,CAA4B,CAAA;AFoE7B,CAAC,CEnEA,OAAA,CAAA,CAAA,IAAa,CAAA;AFoEd,CAAC,CEnEA,MAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA,KAAA,CAAA,IAAA,CAA2B,CAAA;AFoE5B,CAAC,CGtEA,GAAA,CAAA,MAAA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,EAAA,CAAA,KAAA,CAAA,MAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA8B,CAAA;AHuE/B,CD9BC,CAAA;AC+BD;AACA,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC","file":"index.css.map","sourcesContent":["/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n@import \"@ckeditor/ckeditor5-theme-lark/theme/mixins/_rounded.css\";\n@import \"@ckeditor/ckeditor5-theme-lark/theme/mixins/_focus.css\";\n@import \"@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css\";\n\n.ck-source-editing-area {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.ck-source-editing-area::after,\n.ck-source-editing-area textarea {\n\tpadding: var(--ck-spacing-large);\n\tmargin: 0;\n\tborder: 1px solid transparent;\n\tline-height: var(--ck-line-height-base);\n\tfont-size: var(--ck-font-size-normal);\n\tfont-family: monospace;\n\twhite-space: pre-wrap;\n}\n\n.ck-source-editing-area::after {\n\tcontent: attr(data-value) \" \";\n\tvisibility: hidden;\n\tdisplay: block;\n}\n\n.ck-source-editing-area textarea {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tresize: none;\n\toutline: none;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n\n\tborder-color: var(--ck-color-base-border);\n\n\t@mixin ck-rounded-corners {\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n\t}\n\n\t&:not([readonly]):focus {\n\t\t@mixin ck-focus-ring;\n\t\t@mixin ck-box-shadow var(--ck-inner-shadow);\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * A visual style of focused element's border.\n */\n/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * A helper to combine multiple shadows.\n */\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n\n.ck-source-editing-area {\n\tposition: relative;\n\toverflow: hidden;\n}\n\n.ck-source-editing-area::after,\n.ck-source-editing-area textarea {\n\tpadding: var(--ck-spacing-large);\n\tmargin: 0;\n\tborder: 1px solid transparent;\n\tline-height: var(--ck-line-height-base);\n\tfont-size: var(--ck-font-size-normal);\n\tfont-family: monospace;\n\twhite-space: pre-wrap;\n}\n\n.ck-source-editing-area::after {\n\tcontent: attr(data-value) \" \";\n\tvisibility: hidden;\n\tdisplay: block;\n}\n\n.ck-source-editing-area textarea {\n\tposition: absolute;\n\twidth: 100%;\n\theight: 100%;\n\tresize: none;\n\toutline: none;\n\toverflow: hidden;\n\tbox-sizing: border-box;\n\n\tborder-color: var(--ck-color-base-border);\n\n\tborder-radius: 0;\n}\n\n.ck-rounded-corners .ck-source-editing-area textarea, .ck-source-editing-area textarea.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\tborder-top-left-radius: 0;\n\t\tborder-top-right-radius: 0;\n}\n\n.ck-source-editing-area textarea:not([readonly]):focus {\n\t\t/* Disable native outline. */\n\t\toutline: none;\n\t\tborder: var(--ck-focus-ring);\n\t\tbox-shadow: var(--ck-inner-shadow), 0 0;\n\t}\n\n/*# sourceMappingURL=index.css.map */","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * Implements rounded corner interface for .ck-rounded-corners class.\n *\n * @see $ck-border-radius\n */\n@define-mixin ck-rounded-corners {\n\tborder-radius: 0;\n\n\t@nest .ck-rounded-corners &,\n\t&.ck-rounded-corners {\n\t\tborder-radius: var(--ck-border-radius);\n\t\t@mixin-content;\n\t}\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A visual style of focused element's border.\n */\n@define-mixin ck-focus-ring {\n\t/* Disable native outline. */\n\toutline: none;\n\tborder: var(--ck-focus-ring)\n}\n","/*\n * Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * A helper to combine multiple shadows.\n */\n@define-mixin ck-box-shadow $shadowA, $shadowB: 0 0 {\n\tbox-shadow: $shadowA, $shadowB;\n}\n\n/**\n * Gives an element a drop shadow so it looks like a floating panel.\n */\n@define-mixin ck-drop-shadow {\n\t@mixin ck-box-shadow var(--ck-drop-shadow);\n}\n"]}
|
package/dist/index.js
ADDED
@@ -0,0 +1,490 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
import { Plugin, PendingActions } from '@ckeditor/ckeditor5-core/dist/index.js';
|
6
|
+
import { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';
|
7
|
+
import { ElementReplacer, CKEditorError, createElement } from '@ckeditor/ckeditor5-utils/dist/index.js';
|
8
|
+
|
9
|
+
/**
|
10
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
11
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
12
|
+
*/
|
13
|
+
/**
|
14
|
+
* @module source-editing/utils/formathtml
|
15
|
+
*/
|
16
|
+
/**
|
17
|
+
* A simple (and naive) HTML code formatter that returns a formatted HTML markup that can be easily
|
18
|
+
* parsed by human eyes. It beautifies the HTML code by adding new lines between elements that behave like block elements
|
19
|
+
* (https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
|
20
|
+
* and a few more like `tr`, `td`, and similar ones) and inserting indents for nested content.
|
21
|
+
*
|
22
|
+
* WARNING: This function works only on a text that does not contain any indentations or new lines.
|
23
|
+
* Calling this function on the already formatted text will damage the formatting.
|
24
|
+
*
|
25
|
+
* @param input An HTML string to format.
|
26
|
+
*/
|
27
|
+
function formatHtml(input) {
|
28
|
+
// A list of block-like elements around which the new lines should be inserted, and within which
|
29
|
+
// the indentation of their children should be increased.
|
30
|
+
// The list is partially based on https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements that contains
|
31
|
+
// a full list of HTML block-level elements.
|
32
|
+
// A void element is an element that cannot have any child - https://html.spec.whatwg.org/multipage/syntax.html#void-elements.
|
33
|
+
// Note that <pre> element is not listed on this list to avoid breaking whitespace formatting.
|
34
|
+
// Note that <br> element is not listed and handled separately so no additional white spaces are injected.
|
35
|
+
const elementsToFormat = [
|
36
|
+
{ name: 'address', isVoid: false },
|
37
|
+
{ name: 'article', isVoid: false },
|
38
|
+
{ name: 'aside', isVoid: false },
|
39
|
+
{ name: 'blockquote', isVoid: false },
|
40
|
+
{ name: 'details', isVoid: false },
|
41
|
+
{ name: 'dialog', isVoid: false },
|
42
|
+
{ name: 'dd', isVoid: false },
|
43
|
+
{ name: 'div', isVoid: false },
|
44
|
+
{ name: 'dl', isVoid: false },
|
45
|
+
{ name: 'dt', isVoid: false },
|
46
|
+
{ name: 'fieldset', isVoid: false },
|
47
|
+
{ name: 'figcaption', isVoid: false },
|
48
|
+
{ name: 'figure', isVoid: false },
|
49
|
+
{ name: 'footer', isVoid: false },
|
50
|
+
{ name: 'form', isVoid: false },
|
51
|
+
{ name: 'h1', isVoid: false },
|
52
|
+
{ name: 'h2', isVoid: false },
|
53
|
+
{ name: 'h3', isVoid: false },
|
54
|
+
{ name: 'h4', isVoid: false },
|
55
|
+
{ name: 'h5', isVoid: false },
|
56
|
+
{ name: 'h6', isVoid: false },
|
57
|
+
{ name: 'header', isVoid: false },
|
58
|
+
{ name: 'hgroup', isVoid: false },
|
59
|
+
{ name: 'hr', isVoid: true },
|
60
|
+
{ name: 'li', isVoid: false },
|
61
|
+
{ name: 'main', isVoid: false },
|
62
|
+
{ name: 'nav', isVoid: false },
|
63
|
+
{ name: 'ol', isVoid: false },
|
64
|
+
{ name: 'p', isVoid: false },
|
65
|
+
{ name: 'section', isVoid: false },
|
66
|
+
{ name: 'table', isVoid: false },
|
67
|
+
{ name: 'tbody', isVoid: false },
|
68
|
+
{ name: 'td', isVoid: false },
|
69
|
+
{ name: 'th', isVoid: false },
|
70
|
+
{ name: 'thead', isVoid: false },
|
71
|
+
{ name: 'tr', isVoid: false },
|
72
|
+
{ name: 'ul', isVoid: false }
|
73
|
+
];
|
74
|
+
const elementNamesToFormat = elementsToFormat.map(element => element.name).join('|');
|
75
|
+
// It is not the fastest way to format the HTML markup but the performance should be good enough.
|
76
|
+
const lines = input
|
77
|
+
// Add new line before and after `<tag>` and `</tag>`.
|
78
|
+
// It may separate individual elements with two new lines, but this will be fixed below.
|
79
|
+
.replace(new RegExp(`</?(${elementNamesToFormat})( .*?)?>`, 'g'), '\n$&\n')
|
80
|
+
// Keep `<br>`s at the end of line to avoid adding additional whitespaces before `<br>`.
|
81
|
+
.replace(/<br[^>]*>/g, '$&\n')
|
82
|
+
// Divide input string into lines, which start with either an opening tag, a closing tag, or just a text.
|
83
|
+
.split('\n');
|
84
|
+
let indentCount = 0;
|
85
|
+
let isPreformattedLine = false;
|
86
|
+
return lines
|
87
|
+
.filter(line => line.length)
|
88
|
+
.map(line => {
|
89
|
+
isPreformattedLine = isPreformattedBlockLine(line, isPreformattedLine);
|
90
|
+
if (isNonVoidOpeningTag(line, elementsToFormat)) {
|
91
|
+
return indentLine(line, indentCount++);
|
92
|
+
}
|
93
|
+
if (isClosingTag(line, elementsToFormat)) {
|
94
|
+
return indentLine(line, --indentCount);
|
95
|
+
}
|
96
|
+
if (isPreformattedLine === 'middle' || isPreformattedLine === 'last') {
|
97
|
+
return line;
|
98
|
+
}
|
99
|
+
return indentLine(line, indentCount);
|
100
|
+
})
|
101
|
+
.join('\n');
|
102
|
+
}
|
103
|
+
/**
|
104
|
+
* Checks, if an argument is an opening tag of a non-void element to be formatted.
|
105
|
+
*
|
106
|
+
* @param line String to check.
|
107
|
+
* @param elementsToFormat Elements to be formatted.
|
108
|
+
*/
|
109
|
+
function isNonVoidOpeningTag(line, elementsToFormat) {
|
110
|
+
return elementsToFormat.some(element => {
|
111
|
+
if (element.isVoid) {
|
112
|
+
return false;
|
113
|
+
}
|
114
|
+
if (!new RegExp(`<${element.name}( .*?)?>`).test(line)) {
|
115
|
+
return false;
|
116
|
+
}
|
117
|
+
return true;
|
118
|
+
});
|
119
|
+
}
|
120
|
+
/**
|
121
|
+
* Checks, if an argument is a closing tag.
|
122
|
+
*
|
123
|
+
* @param line String to check.
|
124
|
+
* @param elementsToFormat Elements to be formatted.
|
125
|
+
*/
|
126
|
+
function isClosingTag(line, elementsToFormat) {
|
127
|
+
return elementsToFormat.some(element => {
|
128
|
+
return new RegExp(`</${element.name}>`).test(line);
|
129
|
+
});
|
130
|
+
}
|
131
|
+
/**
|
132
|
+
* Indents a line by a specified number of characters.
|
133
|
+
*
|
134
|
+
* @param line Line to indent.
|
135
|
+
* @param indentCount Number of characters to use for indentation.
|
136
|
+
* @param indentChar Indentation character(s). 4 spaces by default.
|
137
|
+
*/
|
138
|
+
function indentLine(line, indentCount, indentChar = ' ') {
|
139
|
+
// More about Math.max() here in https://github.com/ckeditor/ckeditor5/issues/10698.
|
140
|
+
return `${indentChar.repeat(Math.max(0, indentCount))}${line}`;
|
141
|
+
}
|
142
|
+
/**
|
143
|
+
* Checks whether a line belongs to a preformatted (`<pre>`) block.
|
144
|
+
*
|
145
|
+
* @param line Line to check.
|
146
|
+
* @param isPreviousLinePreFormatted Information on whether the previous line was preformatted (and how).
|
147
|
+
*/
|
148
|
+
function isPreformattedBlockLine(line, isPreviousLinePreFormatted) {
|
149
|
+
if (new RegExp('<pre( .*?)?>').test(line)) {
|
150
|
+
return 'first';
|
151
|
+
}
|
152
|
+
else if (new RegExp('</pre>').test(line)) {
|
153
|
+
return 'last';
|
154
|
+
}
|
155
|
+
else if (isPreviousLinePreFormatted === 'first' || isPreviousLinePreFormatted === 'middle') {
|
156
|
+
return 'middle';
|
157
|
+
}
|
158
|
+
else {
|
159
|
+
return false;
|
160
|
+
}
|
161
|
+
}
|
162
|
+
|
163
|
+
var sourceEditingIcon = "<svg viewBox=\"0 0 20 20\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m12.5 0 5 4.5v15.003h-16V0h11zM3 1.5v3.25l-1.497 1-.003 8 1.5 1v3.254L7.685 18l-.001 1.504H17.5V8.002L16 9.428l-.004-4.22-4.222-3.692L3 1.5z\"/><path d=\"M4.06 6.64a.75.75 0 0 1 .958 1.15l-.085.07L2.29 9.75l2.646 1.89c.302.216.4.62.232.951l-.058.095a.75.75 0 0 1-.951.232l-.095-.058-3.5-2.5V9.14l3.496-2.5zm4.194 6.22a.75.75 0 0 1-.958-1.149l.085-.07 2.643-1.89-2.646-1.89a.75.75 0 0 1-.232-.952l.058-.095a.75.75 0 0 1 .95-.232l.096.058 3.5 2.5v1.22l-3.496 2.5zm7.644-.836 2.122 2.122-5.825 5.809-2.125-.005.003-2.116zm2.539-1.847 1.414 1.414a.5.5 0 0 1 0 .707l-1.06 1.06-2.122-2.12 1.061-1.061a.5.5 0 0 1 .707 0z\"/></svg>";
|
164
|
+
|
165
|
+
/**
|
166
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
167
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
168
|
+
*/
|
169
|
+
/**
|
170
|
+
* @module source-editing/sourceediting
|
171
|
+
*/
|
172
|
+
/* global console */
|
173
|
+
const COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';
|
174
|
+
/**
|
175
|
+
* The source editing feature.
|
176
|
+
*
|
177
|
+
* It provides the possibility to view and edit the source of the document.
|
178
|
+
*
|
179
|
+
* For a detailed overview, check the {@glink features/source-editing source editing feature documentation} and the
|
180
|
+
* {@glink api/source-editing package page}.
|
181
|
+
*/
|
182
|
+
class SourceEditing extends Plugin {
|
183
|
+
/**
|
184
|
+
* @inheritDoc
|
185
|
+
*/
|
186
|
+
static get pluginName() {
|
187
|
+
return 'SourceEditing';
|
188
|
+
}
|
189
|
+
/**
|
190
|
+
* @inheritDoc
|
191
|
+
*/
|
192
|
+
static get requires() {
|
193
|
+
return [PendingActions];
|
194
|
+
}
|
195
|
+
/**
|
196
|
+
* @inheritDoc
|
197
|
+
*/
|
198
|
+
constructor(editor) {
|
199
|
+
super(editor);
|
200
|
+
this.set('isSourceEditingMode', false);
|
201
|
+
this._elementReplacer = new ElementReplacer();
|
202
|
+
this._replacedRoots = new Map();
|
203
|
+
this._dataFromRoots = new Map();
|
204
|
+
editor.config.define('sourceEditing.allowCollaborationFeatures', false);
|
205
|
+
}
|
206
|
+
/**
|
207
|
+
* @inheritDoc
|
208
|
+
*/
|
209
|
+
init() {
|
210
|
+
this._checkCompatibility();
|
211
|
+
const editor = this.editor;
|
212
|
+
const t = editor.t;
|
213
|
+
editor.ui.componentFactory.add('sourceEditing', locale => {
|
214
|
+
const buttonView = new ButtonView(locale);
|
215
|
+
buttonView.set({
|
216
|
+
label: t('Source'),
|
217
|
+
icon: sourceEditingIcon,
|
218
|
+
tooltip: true,
|
219
|
+
withText: true,
|
220
|
+
class: 'ck-source-editing-button'
|
221
|
+
});
|
222
|
+
buttonView.bind('isOn').to(this, 'isSourceEditingMode');
|
223
|
+
// The button should be disabled if one of the following conditions is met:
|
224
|
+
buttonView.bind('isEnabled').to(this, 'isEnabled', editor, 'isReadOnly', editor.plugins.get(PendingActions), 'hasAny', (isEnabled, isEditorReadOnly, hasAnyPendingActions) => {
|
225
|
+
// (1) The plugin itself is disabled.
|
226
|
+
if (!isEnabled) {
|
227
|
+
return false;
|
228
|
+
}
|
229
|
+
// (2) The editor is in read-only mode.
|
230
|
+
if (isEditorReadOnly) {
|
231
|
+
return false;
|
232
|
+
}
|
233
|
+
// (3) Any pending action is scheduled. It may change the model, so modifying the document source should be prevented
|
234
|
+
// until the model is finally set.
|
235
|
+
if (hasAnyPendingActions) {
|
236
|
+
return false;
|
237
|
+
}
|
238
|
+
return true;
|
239
|
+
});
|
240
|
+
this.listenTo(buttonView, 'execute', () => {
|
241
|
+
this.isSourceEditingMode = !this.isSourceEditingMode;
|
242
|
+
});
|
243
|
+
return buttonView;
|
244
|
+
});
|
245
|
+
// Currently, the plugin handles the source editing mode by itself only for the classic editor. To use this plugin with other
|
246
|
+
// integrations, listen to the `change:isSourceEditingMode` event and act accordingly.
|
247
|
+
if (this._isAllowedToHandleSourceEditingMode()) {
|
248
|
+
this.on('change:isSourceEditingMode', (evt, name, isSourceEditingMode) => {
|
249
|
+
if (isSourceEditingMode) {
|
250
|
+
this._hideVisibleDialog();
|
251
|
+
this._showSourceEditing();
|
252
|
+
this._disableCommands();
|
253
|
+
}
|
254
|
+
else {
|
255
|
+
this._hideSourceEditing();
|
256
|
+
this._enableCommands();
|
257
|
+
}
|
258
|
+
});
|
259
|
+
this.on('change:isEnabled', (evt, name, isEnabled) => this._handleReadOnlyMode(!isEnabled));
|
260
|
+
this.listenTo(editor, 'change:isReadOnly', (evt, name, isReadOnly) => this._handleReadOnlyMode(isReadOnly));
|
261
|
+
}
|
262
|
+
// Update the editor data while calling editor.getData() in the source editing mode.
|
263
|
+
editor.data.on('get', () => {
|
264
|
+
if (this.isSourceEditingMode) {
|
265
|
+
this.updateEditorData();
|
266
|
+
}
|
267
|
+
}, { priority: 'high' });
|
268
|
+
}
|
269
|
+
/**
|
270
|
+
* Updates the source data in all hidden editing roots.
|
271
|
+
*/
|
272
|
+
updateEditorData() {
|
273
|
+
const editor = this.editor;
|
274
|
+
const data = {};
|
275
|
+
for (const [rootName, domSourceEditingElementWrapper] of this._replacedRoots) {
|
276
|
+
const oldData = this._dataFromRoots.get(rootName);
|
277
|
+
const newData = domSourceEditingElementWrapper.dataset.value;
|
278
|
+
// Do not set the data unless some changes have been made in the meantime.
|
279
|
+
// This prevents empty undo steps after switching to the normal editor.
|
280
|
+
if (oldData !== newData) {
|
281
|
+
data[rootName] = newData;
|
282
|
+
this._dataFromRoots.set(rootName, newData);
|
283
|
+
}
|
284
|
+
}
|
285
|
+
if (Object.keys(data).length) {
|
286
|
+
editor.data.set(data, { batchType: { isUndoable: true }, suppressErrorInCollaboration: true });
|
287
|
+
}
|
288
|
+
}
|
289
|
+
_checkCompatibility() {
|
290
|
+
const editor = this.editor;
|
291
|
+
const allowCollaboration = editor.config.get('sourceEditing.allowCollaborationFeatures');
|
292
|
+
if (!allowCollaboration && editor.plugins.has('RealTimeCollaborativeEditing')) {
|
293
|
+
/**
|
294
|
+
* Source editing feature is not fully compatible with real-time collaboration,
|
295
|
+
* and using it may lead to data loss. Please read
|
296
|
+
* {@glink features/source-editing#limitations-and-incompatibilities source editing feature guide} to learn more.
|
297
|
+
*
|
298
|
+
* If you understand the possible risk of data loss, you can enable the source editing
|
299
|
+
* by setting the
|
300
|
+
* {@link module:source-editing/sourceeditingconfig~SourceEditingConfig#allowCollaborationFeatures}
|
301
|
+
* configuration flag to `true`.
|
302
|
+
*
|
303
|
+
* @error source-editing-incompatible-with-real-time-collaboration
|
304
|
+
*/
|
305
|
+
throw new CKEditorError('source-editing-incompatible-with-real-time-collaboration', null);
|
306
|
+
}
|
307
|
+
const collaborationPluginNamesToWarn = [
|
308
|
+
'CommentsEditing',
|
309
|
+
'TrackChangesEditing',
|
310
|
+
'RevisionHistory'
|
311
|
+
];
|
312
|
+
// Currently, the basic integration with Collaboration Features is to display a warning in the console.
|
313
|
+
//
|
314
|
+
// If `allowCollaboration` flag is set, do not show these warnings. If the flag is set, we assume that the integrator read
|
315
|
+
// appropriate section of the guide so there's no use to spam the console with warnings.
|
316
|
+
//
|
317
|
+
if (!allowCollaboration && collaborationPluginNamesToWarn.some(pluginName => editor.plugins.has(pluginName))) {
|
318
|
+
console.warn('You initialized the editor with the source editing feature and at least one of the collaboration features. ' +
|
319
|
+
'Please be advised that the source editing feature may not work, and be careful when editing document source ' +
|
320
|
+
'that contains markers created by the collaboration features.');
|
321
|
+
}
|
322
|
+
// Restricted Editing integration can also lead to problems. Warn the user accordingly.
|
323
|
+
if (editor.plugins.has('RestrictedEditingModeEditing')) {
|
324
|
+
console.warn('You initialized the editor with the source editing feature and restricted editing feature. ' +
|
325
|
+
'Please be advised that the source editing feature may not work, and be careful when editing document source ' +
|
326
|
+
'that contains markers created by the restricted editing feature.');
|
327
|
+
}
|
328
|
+
}
|
329
|
+
/**
|
330
|
+
* Creates source editing wrappers that replace each editing root. Each wrapper contains the document source from the corresponding
|
331
|
+
* root.
|
332
|
+
*
|
333
|
+
* The wrapper element contains a textarea and it solves the problem, that the textarea element cannot auto expand its height based on
|
334
|
+
* the content it contains. The solution is to make the textarea more like a plain div element, which expands in height as much as it
|
335
|
+
* needs to, in order to display the whole document source without scrolling. The wrapper element is a parent for the textarea and for
|
336
|
+
* the pseudo-element `::after`, that replicates the look, content, and position of the textarea. The pseudo-element replica is hidden,
|
337
|
+
* but it is styled to be an identical visual copy of the textarea with the same content. Then, the wrapper is a grid container and both
|
338
|
+
* of its children (the textarea and the `::after` pseudo-element) are positioned within a CSS grid to occupy the same grid cell. The
|
339
|
+
* content in the pseudo-element `::after` is set in CSS and it stretches the grid to the appropriate size based on the textarea value.
|
340
|
+
* Since both children occupy the same grid cell, both have always the same height.
|
341
|
+
*/
|
342
|
+
_showSourceEditing() {
|
343
|
+
const editor = this.editor;
|
344
|
+
const editingView = editor.editing.view;
|
345
|
+
const model = editor.model;
|
346
|
+
model.change(writer => {
|
347
|
+
writer.setSelection(null);
|
348
|
+
writer.removeSelectionAttribute(model.document.selection.getAttributeKeys());
|
349
|
+
});
|
350
|
+
// It is not needed to iterate through all editing roots, as currently the plugin supports only the Classic Editor with a single
|
351
|
+
// main root, but this code may help understand and use this feature in external integrations.
|
352
|
+
for (const [rootName, domRootElement] of editingView.domRoots) {
|
353
|
+
const data = formatSource(editor.data.get({ rootName }));
|
354
|
+
const domSourceEditingElementTextarea = createElement(domRootElement.ownerDocument, 'textarea', {
|
355
|
+
rows: '1',
|
356
|
+
'aria-label': 'Source code editing area'
|
357
|
+
});
|
358
|
+
const domSourceEditingElementWrapper = createElement(domRootElement.ownerDocument, 'div', {
|
359
|
+
class: 'ck-source-editing-area',
|
360
|
+
'data-value': data
|
361
|
+
}, [domSourceEditingElementTextarea]);
|
362
|
+
domSourceEditingElementTextarea.value = data;
|
363
|
+
// Setting a value to textarea moves the input cursor to the end. We want the selection at the beginning.
|
364
|
+
domSourceEditingElementTextarea.setSelectionRange(0, 0);
|
365
|
+
// Bind the textarea's value to the wrapper's `data-value` property. Each change of the textarea's value updates the
|
366
|
+
// wrapper's `data-value` property.
|
367
|
+
domSourceEditingElementTextarea.addEventListener('input', () => {
|
368
|
+
domSourceEditingElementWrapper.dataset.value = domSourceEditingElementTextarea.value;
|
369
|
+
editor.ui.update();
|
370
|
+
});
|
371
|
+
editingView.change(writer => {
|
372
|
+
const viewRoot = editingView.document.getRoot(rootName);
|
373
|
+
writer.addClass('ck-hidden', viewRoot);
|
374
|
+
});
|
375
|
+
// Register the element so it becomes available for Alt+F10 and Esc navigation.
|
376
|
+
editor.ui.setEditableElement('sourceEditing:' + rootName, domSourceEditingElementTextarea);
|
377
|
+
this._replacedRoots.set(rootName, domSourceEditingElementWrapper);
|
378
|
+
this._elementReplacer.replace(domRootElement, domSourceEditingElementWrapper);
|
379
|
+
this._dataFromRoots.set(rootName, data);
|
380
|
+
}
|
381
|
+
this._focusSourceEditing();
|
382
|
+
}
|
383
|
+
/**
|
384
|
+
* Restores all hidden editing roots and sets the source data in them.
|
385
|
+
*/
|
386
|
+
_hideSourceEditing() {
|
387
|
+
const editor = this.editor;
|
388
|
+
const editingView = editor.editing.view;
|
389
|
+
this.updateEditorData();
|
390
|
+
editingView.change(writer => {
|
391
|
+
for (const [rootName] of this._replacedRoots) {
|
392
|
+
writer.removeClass('ck-hidden', editingView.document.getRoot(rootName));
|
393
|
+
}
|
394
|
+
});
|
395
|
+
this._elementReplacer.restore();
|
396
|
+
this._replacedRoots.clear();
|
397
|
+
this._dataFromRoots.clear();
|
398
|
+
editingView.focus();
|
399
|
+
}
|
400
|
+
/**
|
401
|
+
* Focuses the textarea containing document source from the first editing root.
|
402
|
+
*/
|
403
|
+
_focusSourceEditing() {
|
404
|
+
const editor = this.editor;
|
405
|
+
const [domSourceEditingElementWrapper] = this._replacedRoots.values();
|
406
|
+
const textarea = domSourceEditingElementWrapper.querySelector('textarea');
|
407
|
+
// The FocusObserver was disabled by View.render() while the DOM root was getting hidden and the replacer
|
408
|
+
// revealed the textarea. So it couldn't notice that the DOM root got blurred in the process.
|
409
|
+
// Let's sync this state manually here because otherwise Renderer will attempt to render selection
|
410
|
+
// in an invisible DOM root.
|
411
|
+
editor.editing.view.document.isFocused = false;
|
412
|
+
textarea.focus();
|
413
|
+
}
|
414
|
+
/**
|
415
|
+
* Disables all commands.
|
416
|
+
*/
|
417
|
+
_disableCommands() {
|
418
|
+
const editor = this.editor;
|
419
|
+
for (const command of editor.commands.commands()) {
|
420
|
+
command.forceDisabled(COMMAND_FORCE_DISABLE_ID);
|
421
|
+
}
|
422
|
+
}
|
423
|
+
/**
|
424
|
+
* Clears forced disable for all commands, that was previously set through {@link #_disableCommands}.
|
425
|
+
*/
|
426
|
+
_enableCommands() {
|
427
|
+
const editor = this.editor;
|
428
|
+
for (const command of editor.commands.commands()) {
|
429
|
+
command.clearForceDisabled(COMMAND_FORCE_DISABLE_ID);
|
430
|
+
}
|
431
|
+
}
|
432
|
+
/**
|
433
|
+
* Adds or removes the `readonly` attribute from the textarea from all roots, if document source mode is active.
|
434
|
+
*
|
435
|
+
* @param isReadOnly Indicates whether all textarea elements should be read-only.
|
436
|
+
*/
|
437
|
+
_handleReadOnlyMode(isReadOnly) {
|
438
|
+
if (!this.isSourceEditingMode) {
|
439
|
+
return;
|
440
|
+
}
|
441
|
+
for (const [, domSourceEditingElementWrapper] of this._replacedRoots) {
|
442
|
+
domSourceEditingElementWrapper.querySelector('textarea').readOnly = isReadOnly;
|
443
|
+
}
|
444
|
+
}
|
445
|
+
/**
|
446
|
+
* Checks, if the plugin is allowed to handle the source editing mode by itself. Currently, the source editing mode is supported only
|
447
|
+
* for the {@link module:editor-classic/classiceditor~ClassicEditor classic editor}.
|
448
|
+
*/
|
449
|
+
_isAllowedToHandleSourceEditingMode() {
|
450
|
+
const editor = this.editor;
|
451
|
+
const editable = editor.ui.view.editable;
|
452
|
+
// Checks, if the editor's editable belongs to the editor's DOM tree.
|
453
|
+
return editable && !editable.hasExternalElement;
|
454
|
+
}
|
455
|
+
/**
|
456
|
+
* If any {@link module:ui/dialog/dialogview~DialogView editor dialog} is currently visible, hide it.
|
457
|
+
*/
|
458
|
+
_hideVisibleDialog() {
|
459
|
+
if (this.editor.plugins.has('Dialog')) {
|
460
|
+
const dialogPlugin = this.editor.plugins.get('Dialog');
|
461
|
+
if (dialogPlugin.isOpen) {
|
462
|
+
dialogPlugin.hide();
|
463
|
+
}
|
464
|
+
}
|
465
|
+
}
|
466
|
+
}
|
467
|
+
/**
|
468
|
+
* Formats the content for a better readability.
|
469
|
+
*
|
470
|
+
* For a non-HTML source the unchanged input string is returned.
|
471
|
+
*
|
472
|
+
* @param input Input string to check.
|
473
|
+
*/
|
474
|
+
function formatSource(input) {
|
475
|
+
if (!isHtml(input)) {
|
476
|
+
return input;
|
477
|
+
}
|
478
|
+
return formatHtml(input);
|
479
|
+
}
|
480
|
+
/**
|
481
|
+
* Checks, if the document source is HTML. It is sufficient to just check the first character from the document data.
|
482
|
+
*
|
483
|
+
* @param input Input string to check.
|
484
|
+
*/
|
485
|
+
function isHtml(input) {
|
486
|
+
return input.startsWith('<');
|
487
|
+
}
|
488
|
+
|
489
|
+
export { SourceEditing };
|
490
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["index.js","../src/utils/formathtml.ts","../src/sourceediting.ts"],"names":[],"mappings":";;;;AAAA,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAChF,MAAM,CA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AC,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;AACrH,CAAC,CAAC;AACF,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,CAAC;AEnDnC,CAAA,CAAA,CAAA;AACH,QAAS,CAAA,MAAM,CAAE,KAAa,CAAA,CAAA,CAAA;AAC7B,CAAA,CAAA,CAAA,CAAA,MAAA,CAAO,KAAK,CAAC,UAAU,CAAE,CAAA,CAAA,CAAG,CAAE,CAAC;AAChC,CAAA;AFqDA;AACA,MAAM,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;AACzB,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,GAAG","file":"index.js.map","sourcesContent":["import { Plugin, PendingActions } from '@ckeditor/ckeditor5-core/dist/index.js';\nimport { ButtonView } from '@ckeditor/ckeditor5-ui/dist/index.js';\nimport { ElementReplacer, CKEditorError, createElement } from '@ckeditor/ckeditor5-utils/dist/index.js';\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module source-editing/utils/formathtml\n */\n/**\n * A simple (and naive) HTML code formatter that returns a formatted HTML markup that can be easily\n * parsed by human eyes. It beautifies the HTML code by adding new lines between elements that behave like block elements\n * (https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements\n * and a few more like `tr`, `td`, and similar ones) and inserting indents for nested content.\n *\n * WARNING: This function works only on a text that does not contain any indentations or new lines.\n * Calling this function on the already formatted text will damage the formatting.\n *\n * @param input An HTML string to format.\n */\nfunction formatHtml(input) {\n // A list of block-like elements around which the new lines should be inserted, and within which\n // the indentation of their children should be increased.\n // The list is partially based on https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements that contains\n // a full list of HTML block-level elements.\n // A void element is an element that cannot have any child - https://html.spec.whatwg.org/multipage/syntax.html#void-elements.\n // Note that <pre> element is not listed on this list to avoid breaking whitespace formatting.\n // Note that <br> element is not listed and handled separately so no additional white spaces are injected.\n const elementsToFormat = [\n { name: 'address', isVoid: false },\n { name: 'article', isVoid: false },\n { name: 'aside', isVoid: false },\n { name: 'blockquote', isVoid: false },\n { name: 'details', isVoid: false },\n { name: 'dialog', isVoid: false },\n { name: 'dd', isVoid: false },\n { name: 'div', isVoid: false },\n { name: 'dl', isVoid: false },\n { name: 'dt', isVoid: false },\n { name: 'fieldset', isVoid: false },\n { name: 'figcaption', isVoid: false },\n { name: 'figure', isVoid: false },\n { name: 'footer', isVoid: false },\n { name: 'form', isVoid: false },\n { name: 'h1', isVoid: false },\n { name: 'h2', isVoid: false },\n { name: 'h3', isVoid: false },\n { name: 'h4', isVoid: false },\n { name: 'h5', isVoid: false },\n { name: 'h6', isVoid: false },\n { name: 'header', isVoid: false },\n { name: 'hgroup', isVoid: false },\n { name: 'hr', isVoid: true },\n { name: 'li', isVoid: false },\n { name: 'main', isVoid: false },\n { name: 'nav', isVoid: false },\n { name: 'ol', isVoid: false },\n { name: 'p', isVoid: false },\n { name: 'section', isVoid: false },\n { name: 'table', isVoid: false },\n { name: 'tbody', isVoid: false },\n { name: 'td', isVoid: false },\n { name: 'th', isVoid: false },\n { name: 'thead', isVoid: false },\n { name: 'tr', isVoid: false },\n { name: 'ul', isVoid: false }\n ];\n const elementNamesToFormat = elementsToFormat.map(element => element.name).join('|');\n // It is not the fastest way to format the HTML markup but the performance should be good enough.\n const lines = input\n // Add new line before and after `<tag>` and `</tag>`.\n // It may separate individual elements with two new lines, but this will be fixed below.\n .replace(new RegExp(`</?(${elementNamesToFormat})( .*?)?>`, 'g'), '\\n$&\\n')\n // Keep `<br>`s at the end of line to avoid adding additional whitespaces before `<br>`.\n .replace(/<br[^>]*>/g, '$&\\n')\n // Divide input string into lines, which start with either an opening tag, a closing tag, or just a text.\n .split('\\n');\n let indentCount = 0;\n let isPreformattedLine = false;\n return lines\n .filter(line => line.length)\n .map(line => {\n isPreformattedLine = isPreformattedBlockLine(line, isPreformattedLine);\n if (isNonVoidOpeningTag(line, elementsToFormat)) {\n return indentLine(line, indentCount++);\n }\n if (isClosingTag(line, elementsToFormat)) {\n return indentLine(line, --indentCount);\n }\n if (isPreformattedLine === 'middle' || isPreformattedLine === 'last') {\n return line;\n }\n return indentLine(line, indentCount);\n })\n .join('\\n');\n}\n/**\n * Checks, if an argument is an opening tag of a non-void element to be formatted.\n *\n * @param line String to check.\n * @param elementsToFormat Elements to be formatted.\n */\nfunction isNonVoidOpeningTag(line, elementsToFormat) {\n return elementsToFormat.some(element => {\n if (element.isVoid) {\n return false;\n }\n if (!new RegExp(`<${element.name}( .*?)?>`).test(line)) {\n return false;\n }\n return true;\n });\n}\n/**\n * Checks, if an argument is a closing tag.\n *\n * @param line String to check.\n * @param elementsToFormat Elements to be formatted.\n */\nfunction isClosingTag(line, elementsToFormat) {\n return elementsToFormat.some(element => {\n return new RegExp(`</${element.name}>`).test(line);\n });\n}\n/**\n * Indents a line by a specified number of characters.\n *\n * @param line Line to indent.\n * @param indentCount Number of characters to use for indentation.\n * @param indentChar Indentation character(s). 4 spaces by default.\n */\nfunction indentLine(line, indentCount, indentChar = ' ') {\n // More about Math.max() here in https://github.com/ckeditor/ckeditor5/issues/10698.\n return `${indentChar.repeat(Math.max(0, indentCount))}${line}`;\n}\n/**\n * Checks whether a line belongs to a preformatted (`<pre>`) block.\n *\n * @param line Line to check.\n * @param isPreviousLinePreFormatted Information on whether the previous line was preformatted (and how).\n */\nfunction isPreformattedBlockLine(line, isPreviousLinePreFormatted) {\n if (new RegExp('<pre( .*?)?>').test(line)) {\n return 'first';\n }\n else if (new RegExp('</pre>').test(line)) {\n return 'last';\n }\n else if (isPreviousLinePreFormatted === 'first' || isPreviousLinePreFormatted === 'middle') {\n return 'middle';\n }\n else {\n return false;\n }\n}\n\nvar sourceEditingIcon = \"<svg viewBox=\\\"0 0 20 20\\\" xmlns=\\\"http://www.w3.org/2000/svg\\\"><path d=\\\"m12.5 0 5 4.5v15.003h-16V0h11zM3 1.5v3.25l-1.497 1-.003 8 1.5 1v3.254L7.685 18l-.001 1.504H17.5V8.002L16 9.428l-.004-4.22-4.222-3.692L3 1.5z\\\"/><path d=\\\"M4.06 6.64a.75.75 0 0 1 .958 1.15l-.085.07L2.29 9.75l2.646 1.89c.302.216.4.62.232.951l-.058.095a.75.75 0 0 1-.951.232l-.095-.058-3.5-2.5V9.14l3.496-2.5zm4.194 6.22a.75.75 0 0 1-.958-1.149l.085-.07 2.643-1.89-2.646-1.89a.75.75 0 0 1-.232-.952l.058-.095a.75.75 0 0 1 .95-.232l.096.058 3.5 2.5v1.22l-3.496 2.5zm7.644-.836 2.122 2.122-5.825 5.809-2.125-.005.003-2.116zm2.539-1.847 1.414 1.414a.5.5 0 0 1 0 .707l-1.06 1.06-2.122-2.12 1.061-1.061a.5.5 0 0 1 .707 0z\\\"/></svg>\";\n\n/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n/**\n * @module source-editing/sourceediting\n */\n/* global console */\nconst COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';\n/**\n * The source editing feature.\n *\n * It provides the possibility to view and edit the source of the document.\n *\n * For a detailed overview, check the {@glink features/source-editing source editing feature documentation} and the\n * {@glink api/source-editing package page}.\n */\nclass SourceEditing extends Plugin {\n /**\n * @inheritDoc\n */\n static get pluginName() {\n return 'SourceEditing';\n }\n /**\n * @inheritDoc\n */\n static get requires() {\n return [PendingActions];\n }\n /**\n * @inheritDoc\n */\n constructor(editor) {\n super(editor);\n this.set('isSourceEditingMode', false);\n this._elementReplacer = new ElementReplacer();\n this._replacedRoots = new Map();\n this._dataFromRoots = new Map();\n editor.config.define('sourceEditing.allowCollaborationFeatures', false);\n }\n /**\n * @inheritDoc\n */\n init() {\n this._checkCompatibility();\n const editor = this.editor;\n const t = editor.t;\n editor.ui.componentFactory.add('sourceEditing', locale => {\n const buttonView = new ButtonView(locale);\n buttonView.set({\n label: t('Source'),\n icon: sourceEditingIcon,\n tooltip: true,\n withText: true,\n class: 'ck-source-editing-button'\n });\n buttonView.bind('isOn').to(this, 'isSourceEditingMode');\n // The button should be disabled if one of the following conditions is met:\n buttonView.bind('isEnabled').to(this, 'isEnabled', editor, 'isReadOnly', editor.plugins.get(PendingActions), 'hasAny', (isEnabled, isEditorReadOnly, hasAnyPendingActions) => {\n // (1) The plugin itself is disabled.\n if (!isEnabled) {\n return false;\n }\n // (2) The editor is in read-only mode.\n if (isEditorReadOnly) {\n return false;\n }\n // (3) Any pending action is scheduled. It may change the model, so modifying the document source should be prevented\n // until the model is finally set.\n if (hasAnyPendingActions) {\n return false;\n }\n return true;\n });\n this.listenTo(buttonView, 'execute', () => {\n this.isSourceEditingMode = !this.isSourceEditingMode;\n });\n return buttonView;\n });\n // Currently, the plugin handles the source editing mode by itself only for the classic editor. To use this plugin with other\n // integrations, listen to the `change:isSourceEditingMode` event and act accordingly.\n if (this._isAllowedToHandleSourceEditingMode()) {\n this.on('change:isSourceEditingMode', (evt, name, isSourceEditingMode) => {\n if (isSourceEditingMode) {\n this._hideVisibleDialog();\n this._showSourceEditing();\n this._disableCommands();\n }\n else {\n this._hideSourceEditing();\n this._enableCommands();\n }\n });\n this.on('change:isEnabled', (evt, name, isEnabled) => this._handleReadOnlyMode(!isEnabled));\n this.listenTo(editor, 'change:isReadOnly', (evt, name, isReadOnly) => this._handleReadOnlyMode(isReadOnly));\n }\n // Update the editor data while calling editor.getData() in the source editing mode.\n editor.data.on('get', () => {\n if (this.isSourceEditingMode) {\n this.updateEditorData();\n }\n }, { priority: 'high' });\n }\n /**\n * Updates the source data in all hidden editing roots.\n */\n updateEditorData() {\n const editor = this.editor;\n const data = {};\n for (const [rootName, domSourceEditingElementWrapper] of this._replacedRoots) {\n const oldData = this._dataFromRoots.get(rootName);\n const newData = domSourceEditingElementWrapper.dataset.value;\n // Do not set the data unless some changes have been made in the meantime.\n // This prevents empty undo steps after switching to the normal editor.\n if (oldData !== newData) {\n data[rootName] = newData;\n this._dataFromRoots.set(rootName, newData);\n }\n }\n if (Object.keys(data).length) {\n editor.data.set(data, { batchType: { isUndoable: true }, suppressErrorInCollaboration: true });\n }\n }\n _checkCompatibility() {\n const editor = this.editor;\n const allowCollaboration = editor.config.get('sourceEditing.allowCollaborationFeatures');\n if (!allowCollaboration && editor.plugins.has('RealTimeCollaborativeEditing')) {\n /**\n * Source editing feature is not fully compatible with real-time collaboration,\n * and using it may lead to data loss. Please read\n * {@glink features/source-editing#limitations-and-incompatibilities source editing feature guide} to learn more.\n *\n * If you understand the possible risk of data loss, you can enable the source editing\n * by setting the\n * {@link module:source-editing/sourceeditingconfig~SourceEditingConfig#allowCollaborationFeatures}\n * configuration flag to `true`.\n *\n * @error source-editing-incompatible-with-real-time-collaboration\n */\n throw new CKEditorError('source-editing-incompatible-with-real-time-collaboration', null);\n }\n const collaborationPluginNamesToWarn = [\n 'CommentsEditing',\n 'TrackChangesEditing',\n 'RevisionHistory'\n ];\n // Currently, the basic integration with Collaboration Features is to display a warning in the console.\n //\n // If `allowCollaboration` flag is set, do not show these warnings. If the flag is set, we assume that the integrator read\n // appropriate section of the guide so there's no use to spam the console with warnings.\n //\n if (!allowCollaboration && collaborationPluginNamesToWarn.some(pluginName => editor.plugins.has(pluginName))) {\n console.warn('You initialized the editor with the source editing feature and at least one of the collaboration features. ' +\n 'Please be advised that the source editing feature may not work, and be careful when editing document source ' +\n 'that contains markers created by the collaboration features.');\n }\n // Restricted Editing integration can also lead to problems. Warn the user accordingly.\n if (editor.plugins.has('RestrictedEditingModeEditing')) {\n console.warn('You initialized the editor with the source editing feature and restricted editing feature. ' +\n 'Please be advised that the source editing feature may not work, and be careful when editing document source ' +\n 'that contains markers created by the restricted editing feature.');\n }\n }\n /**\n * Creates source editing wrappers that replace each editing root. Each wrapper contains the document source from the corresponding\n * root.\n *\n * The wrapper element contains a textarea and it solves the problem, that the textarea element cannot auto expand its height based on\n * the content it contains. The solution is to make the textarea more like a plain div element, which expands in height as much as it\n * needs to, in order to display the whole document source without scrolling. The wrapper element is a parent for the textarea and for\n * the pseudo-element `::after`, that replicates the look, content, and position of the textarea. The pseudo-element replica is hidden,\n * but it is styled to be an identical visual copy of the textarea with the same content. Then, the wrapper is a grid container and both\n * of its children (the textarea and the `::after` pseudo-element) are positioned within a CSS grid to occupy the same grid cell. The\n * content in the pseudo-element `::after` is set in CSS and it stretches the grid to the appropriate size based on the textarea value.\n * Since both children occupy the same grid cell, both have always the same height.\n */\n _showSourceEditing() {\n const editor = this.editor;\n const editingView = editor.editing.view;\n const model = editor.model;\n model.change(writer => {\n writer.setSelection(null);\n writer.removeSelectionAttribute(model.document.selection.getAttributeKeys());\n });\n // It is not needed to iterate through all editing roots, as currently the plugin supports only the Classic Editor with a single\n // main root, but this code may help understand and use this feature in external integrations.\n for (const [rootName, domRootElement] of editingView.domRoots) {\n const data = formatSource(editor.data.get({ rootName }));\n const domSourceEditingElementTextarea = createElement(domRootElement.ownerDocument, 'textarea', {\n rows: '1',\n 'aria-label': 'Source code editing area'\n });\n const domSourceEditingElementWrapper = createElement(domRootElement.ownerDocument, 'div', {\n class: 'ck-source-editing-area',\n 'data-value': data\n }, [domSourceEditingElementTextarea]);\n domSourceEditingElementTextarea.value = data;\n // Setting a value to textarea moves the input cursor to the end. We want the selection at the beginning.\n domSourceEditingElementTextarea.setSelectionRange(0, 0);\n // Bind the textarea's value to the wrapper's `data-value` property. Each change of the textarea's value updates the\n // wrapper's `data-value` property.\n domSourceEditingElementTextarea.addEventListener('input', () => {\n domSourceEditingElementWrapper.dataset.value = domSourceEditingElementTextarea.value;\n editor.ui.update();\n });\n editingView.change(writer => {\n const viewRoot = editingView.document.getRoot(rootName);\n writer.addClass('ck-hidden', viewRoot);\n });\n // Register the element so it becomes available for Alt+F10 and Esc navigation.\n editor.ui.setEditableElement('sourceEditing:' + rootName, domSourceEditingElementTextarea);\n this._replacedRoots.set(rootName, domSourceEditingElementWrapper);\n this._elementReplacer.replace(domRootElement, domSourceEditingElementWrapper);\n this._dataFromRoots.set(rootName, data);\n }\n this._focusSourceEditing();\n }\n /**\n * Restores all hidden editing roots and sets the source data in them.\n */\n _hideSourceEditing() {\n const editor = this.editor;\n const editingView = editor.editing.view;\n this.updateEditorData();\n editingView.change(writer => {\n for (const [rootName] of this._replacedRoots) {\n writer.removeClass('ck-hidden', editingView.document.getRoot(rootName));\n }\n });\n this._elementReplacer.restore();\n this._replacedRoots.clear();\n this._dataFromRoots.clear();\n editingView.focus();\n }\n /**\n * Focuses the textarea containing document source from the first editing root.\n */\n _focusSourceEditing() {\n const editor = this.editor;\n const [domSourceEditingElementWrapper] = this._replacedRoots.values();\n const textarea = domSourceEditingElementWrapper.querySelector('textarea');\n // The FocusObserver was disabled by View.render() while the DOM root was getting hidden and the replacer\n // revealed the textarea. So it couldn't notice that the DOM root got blurred in the process.\n // Let's sync this state manually here because otherwise Renderer will attempt to render selection\n // in an invisible DOM root.\n editor.editing.view.document.isFocused = false;\n textarea.focus();\n }\n /**\n * Disables all commands.\n */\n _disableCommands() {\n const editor = this.editor;\n for (const command of editor.commands.commands()) {\n command.forceDisabled(COMMAND_FORCE_DISABLE_ID);\n }\n }\n /**\n * Clears forced disable for all commands, that was previously set through {@link #_disableCommands}.\n */\n _enableCommands() {\n const editor = this.editor;\n for (const command of editor.commands.commands()) {\n command.clearForceDisabled(COMMAND_FORCE_DISABLE_ID);\n }\n }\n /**\n * Adds or removes the `readonly` attribute from the textarea from all roots, if document source mode is active.\n *\n * @param isReadOnly Indicates whether all textarea elements should be read-only.\n */\n _handleReadOnlyMode(isReadOnly) {\n if (!this.isSourceEditingMode) {\n return;\n }\n for (const [, domSourceEditingElementWrapper] of this._replacedRoots) {\n domSourceEditingElementWrapper.querySelector('textarea').readOnly = isReadOnly;\n }\n }\n /**\n * Checks, if the plugin is allowed to handle the source editing mode by itself. Currently, the source editing mode is supported only\n * for the {@link module:editor-classic/classiceditor~ClassicEditor classic editor}.\n */\n _isAllowedToHandleSourceEditingMode() {\n const editor = this.editor;\n const editable = editor.ui.view.editable;\n // Checks, if the editor's editable belongs to the editor's DOM tree.\n return editable && !editable.hasExternalElement;\n }\n /**\n * If any {@link module:ui/dialog/dialogview~DialogView editor dialog} is currently visible, hide it.\n */\n _hideVisibleDialog() {\n if (this.editor.plugins.has('Dialog')) {\n const dialogPlugin = this.editor.plugins.get('Dialog');\n if (dialogPlugin.isOpen) {\n dialogPlugin.hide();\n }\n }\n }\n}\n/**\n * Formats the content for a better readability.\n *\n * For a non-HTML source the unchanged input string is returned.\n *\n * @param input Input string to check.\n */\nfunction formatSource(input) {\n if (!isHtml(input)) {\n return input;\n }\n return formatHtml(input);\n}\n/**\n * Checks, if the document source is HTML. It is sufficient to just check the first character from the document data.\n *\n * @param input Input string to check.\n */\nfunction isHtml(input) {\n return input.startsWith('<');\n}\n\nexport { SourceEditing };\n//# sourceMappingURL=index.js.map\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module source-editing/utils/formathtml\n */\n\n/**\n * A simple (and naive) HTML code formatter that returns a formatted HTML markup that can be easily\n * parsed by human eyes. It beautifies the HTML code by adding new lines between elements that behave like block elements\n * (https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements\n * and a few more like `tr`, `td`, and similar ones) and inserting indents for nested content.\n *\n * WARNING: This function works only on a text that does not contain any indentations or new lines.\n * Calling this function on the already formatted text will damage the formatting.\n *\n * @param input An HTML string to format.\n */\nexport function formatHtml( input: string ): string {\n\t// A list of block-like elements around which the new lines should be inserted, and within which\n\t// the indentation of their children should be increased.\n\t// The list is partially based on https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements that contains\n\t// a full list of HTML block-level elements.\n\t// A void element is an element that cannot have any child - https://html.spec.whatwg.org/multipage/syntax.html#void-elements.\n\t// Note that <pre> element is not listed on this list to avoid breaking whitespace formatting.\n\t// Note that <br> element is not listed and handled separately so no additional white spaces are injected.\n\tconst elementsToFormat: Array<ElementToFormat> = [\n\t\t{ name: 'address', isVoid: false },\n\t\t{ name: 'article', isVoid: false },\n\t\t{ name: 'aside', isVoid: false },\n\t\t{ name: 'blockquote', isVoid: false },\n\t\t{ name: 'details', isVoid: false },\n\t\t{ name: 'dialog', isVoid: false },\n\t\t{ name: 'dd', isVoid: false },\n\t\t{ name: 'div', isVoid: false },\n\t\t{ name: 'dl', isVoid: false },\n\t\t{ name: 'dt', isVoid: false },\n\t\t{ name: 'fieldset', isVoid: false },\n\t\t{ name: 'figcaption', isVoid: false },\n\t\t{ name: 'figure', isVoid: false },\n\t\t{ name: 'footer', isVoid: false },\n\t\t{ name: 'form', isVoid: false },\n\t\t{ name: 'h1', isVoid: false },\n\t\t{ name: 'h2', isVoid: false },\n\t\t{ name: 'h3', isVoid: false },\n\t\t{ name: 'h4', isVoid: false },\n\t\t{ name: 'h5', isVoid: false },\n\t\t{ name: 'h6', isVoid: false },\n\t\t{ name: 'header', isVoid: false },\n\t\t{ name: 'hgroup', isVoid: false },\n\t\t{ name: 'hr', isVoid: true },\n\t\t{ name: 'li', isVoid: false },\n\t\t{ name: 'main', isVoid: false },\n\t\t{ name: 'nav', isVoid: false },\n\t\t{ name: 'ol', isVoid: false },\n\t\t{ name: 'p', isVoid: false },\n\t\t{ name: 'section', isVoid: false },\n\t\t{ name: 'table', isVoid: false },\n\t\t{ name: 'tbody', isVoid: false },\n\t\t{ name: 'td', isVoid: false },\n\t\t{ name: 'th', isVoid: false },\n\t\t{ name: 'thead', isVoid: false },\n\t\t{ name: 'tr', isVoid: false },\n\t\t{ name: 'ul', isVoid: false }\n\t];\n\n\tconst elementNamesToFormat = elementsToFormat.map( element => element.name ).join( '|' );\n\n\t// It is not the fastest way to format the HTML markup but the performance should be good enough.\n\tconst lines = input\n\t\t// Add new line before and after `<tag>` and `</tag>`.\n\t\t// It may separate individual elements with two new lines, but this will be fixed below.\n\t\t.replace( new RegExp( `</?(${ elementNamesToFormat })( .*?)?>`, 'g' ), '\\n$&\\n' )\n\t\t// Keep `<br>`s at the end of line to avoid adding additional whitespaces before `<br>`.\n\t\t.replace( /<br[^>]*>/g, '$&\\n' )\n\t\t// Divide input string into lines, which start with either an opening tag, a closing tag, or just a text.\n\t\t.split( '\\n' );\n\n\tlet indentCount = 0;\n\tlet isPreformattedLine: ReturnType<typeof isPreformattedBlockLine> = false;\n\n\treturn lines\n\t\t.filter( line => line.length )\n\t\t.map( line => {\n\t\t\tisPreformattedLine = isPreformattedBlockLine( line, isPreformattedLine );\n\n\t\t\tif ( isNonVoidOpeningTag( line, elementsToFormat ) ) {\n\t\t\t\treturn indentLine( line, indentCount++ );\n\t\t\t}\n\n\t\t\tif ( isClosingTag( line, elementsToFormat ) ) {\n\t\t\t\treturn indentLine( line, --indentCount );\n\t\t\t}\n\n\t\t\tif ( isPreformattedLine === 'middle' || isPreformattedLine === 'last' ) {\n\t\t\t\treturn line;\n\t\t\t}\n\n\t\t\treturn indentLine( line, indentCount );\n\t\t} )\n\t\t.join( '\\n' );\n}\n\n/**\n * Checks, if an argument is an opening tag of a non-void element to be formatted.\n *\n * @param line String to check.\n * @param elementsToFormat Elements to be formatted.\n */\nfunction isNonVoidOpeningTag( line: string, elementsToFormat: Array<ElementToFormat> ): boolean {\n\treturn elementsToFormat.some( element => {\n\t\tif ( element.isVoid ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !new RegExp( `<${ element.name }( .*?)?>` ).test( line ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} );\n}\n\n/**\n * Checks, if an argument is a closing tag.\n *\n * @param line String to check.\n * @param elementsToFormat Elements to be formatted.\n */\nfunction isClosingTag( line: string, elementsToFormat: Array<ElementToFormat> ): boolean {\n\treturn elementsToFormat.some( element => {\n\t\treturn new RegExp( `</${ element.name }>` ).test( line );\n\t} );\n}\n\n/**\n * Indents a line by a specified number of characters.\n *\n * @param line Line to indent.\n * @param indentCount Number of characters to use for indentation.\n * @param indentChar Indentation character(s). 4 spaces by default.\n */\nfunction indentLine( line: string, indentCount: number, indentChar: string = ' ' ): string {\n\t// More about Math.max() here in https://github.com/ckeditor/ckeditor5/issues/10698.\n\treturn `${ indentChar.repeat( Math.max( 0, indentCount ) ) }${ line }`;\n}\n\n/**\n * Checks whether a line belongs to a preformatted (`<pre>`) block.\n *\n * @param line Line to check.\n * @param isPreviousLinePreFormatted Information on whether the previous line was preformatted (and how).\n */\nfunction isPreformattedBlockLine( line: string, isPreviousLinePreFormatted: 'first' | 'last' | 'middle' | false ) {\n\tif ( new RegExp( '<pre( .*?)?>' ).test( line ) ) {\n\t\treturn 'first';\n\t} else if ( new RegExp( '</pre>' ).test( line ) ) {\n\t\treturn 'last';\n\t} else if ( isPreviousLinePreFormatted === 'first' || isPreviousLinePreFormatted === 'middle' ) {\n\t\treturn 'middle';\n\t} else {\n\t\treturn false;\n\t}\n}\n\n/**\n * Element to be formatted.\n */\ninterface ElementToFormat {\n\n\t/**\n\t * Element name.\n\t */\n\tname: string;\n\n\t/**\n\t * Flag indicating whether element is a void one.\n\t */\n\tisVoid: boolean;\n}\n","/**\n * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.\n * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license\n */\n\n/**\n * @module source-editing/sourceediting\n */\n\n/* global console */\n\nimport { type Editor, Plugin, PendingActions } from 'ckeditor5/src/core.js';\nimport { ButtonView, type Dialog } from 'ckeditor5/src/ui.js';\nimport { CKEditorError, createElement, ElementReplacer } from 'ckeditor5/src/utils.js';\nimport { formatHtml } from './utils/formathtml.js';\n\nimport '../theme/sourceediting.css';\nimport sourceEditingIcon from '../theme/icons/source-editing.svg';\n\nconst COMMAND_FORCE_DISABLE_ID = 'SourceEditingMode';\n\n/**\n * The source editing feature.\n *\n * It provides the possibility to view and edit the source of the document.\n *\n * For a detailed overview, check the {@glink features/source-editing source editing feature documentation} and the\n * {@glink api/source-editing package page}.\n */\nexport default class SourceEditing extends Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get pluginName() {\n\t\treturn 'SourceEditing' as const;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic static get requires() {\n\t\treturn [ PendingActions ] as const;\n\t}\n\n\t/**\n\t * Flag indicating whether the document source mode is active.\n\t *\n\t * @observable\n\t */\n\tdeclare public isSourceEditingMode: boolean;\n\n\t/**\n\t * The element replacer instance used to replace the editing roots with the wrapper elements containing the document source.\n\t */\n\tprivate _elementReplacer: ElementReplacer;\n\n\t/**\n\t * Maps all root names to wrapper elements containing the document source.\n\t */\n\tprivate _replacedRoots: Map<string, HTMLElement>;\n\n\t/**\n\t * Maps all root names to their document data.\n\t */\n\tprivate _dataFromRoots: Map<string, string>;\n\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor: Editor ) {\n\t\tsuper( editor );\n\n\t\tthis.set( 'isSourceEditingMode', false );\n\t\tthis._elementReplacer = new ElementReplacer();\n\t\tthis._replacedRoots = new Map();\n\t\tthis._dataFromRoots = new Map();\n\n\t\teditor.config.define( 'sourceEditing.allowCollaborationFeatures', false );\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tpublic init(): void {\n\t\tthis._checkCompatibility();\n\n\t\tconst editor = this.editor;\n\t\tconst t = editor.t;\n\n\t\teditor.ui.componentFactory.add( 'sourceEditing', locale => {\n\t\t\tconst buttonView = new ButtonView( locale );\n\n\t\t\tbuttonView.set( {\n\t\t\t\tlabel: t( 'Source' ),\n\t\t\t\ticon: sourceEditingIcon,\n\t\t\t\ttooltip: true,\n\t\t\t\twithText: true,\n\t\t\t\tclass: 'ck-source-editing-button'\n\t\t\t} );\n\n\t\t\tbuttonView.bind( 'isOn' ).to( this, 'isSourceEditingMode' );\n\n\t\t\t// The button should be disabled if one of the following conditions is met:\n\t\t\tbuttonView.bind( 'isEnabled' ).to(\n\t\t\t\tthis, 'isEnabled',\n\t\t\t\teditor, 'isReadOnly',\n\t\t\t\teditor.plugins.get( PendingActions ), 'hasAny',\n\t\t\t\t( isEnabled, isEditorReadOnly, hasAnyPendingActions ) => {\n\t\t\t\t\t// (1) The plugin itself is disabled.\n\t\t\t\t\tif ( !isEnabled ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// (2) The editor is in read-only mode.\n\t\t\t\t\tif ( isEditorReadOnly ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// (3) Any pending action is scheduled. It may change the model, so modifying the document source should be prevented\n\t\t\t\t\t// until the model is finally set.\n\t\t\t\t\tif ( hasAnyPendingActions ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t);\n\n\t\t\tthis.listenTo( buttonView, 'execute', () => {\n\t\t\t\tthis.isSourceEditingMode = !this.isSourceEditingMode;\n\t\t\t} );\n\n\t\t\treturn buttonView;\n\t\t} );\n\n\t\t// Currently, the plugin handles the source editing mode by itself only for the classic editor. To use this plugin with other\n\t\t// integrations, listen to the `change:isSourceEditingMode` event and act accordingly.\n\t\tif ( this._isAllowedToHandleSourceEditingMode() ) {\n\t\t\tthis.on( 'change:isSourceEditingMode', ( evt, name, isSourceEditingMode ) => {\n\t\t\t\tif ( isSourceEditingMode ) {\n\t\t\t\t\tthis._hideVisibleDialog();\n\t\t\t\t\tthis._showSourceEditing();\n\t\t\t\t\tthis._disableCommands();\n\t\t\t\t} else {\n\t\t\t\t\tthis._hideSourceEditing();\n\t\t\t\t\tthis._enableCommands();\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tthis.on( 'change:isEnabled', ( evt, name, isEnabled ) => this._handleReadOnlyMode( !isEnabled ) );\n\n\t\t\tthis.listenTo( editor, 'change:isReadOnly', ( evt, name, isReadOnly ) => this._handleReadOnlyMode( isReadOnly ) );\n\t\t}\n\n\t\t// Update the editor data while calling editor.getData() in the source editing mode.\n\t\teditor.data.on( 'get', () => {\n\t\t\tif ( this.isSourceEditingMode ) {\n\t\t\t\tthis.updateEditorData();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\t}\n\n\t/**\n\t * Updates the source data in all hidden editing roots.\n\t */\n\tpublic updateEditorData(): void {\n\t\tconst editor = this.editor;\n\t\tconst data: Record<string, string> = {};\n\n\t\tfor ( const [ rootName, domSourceEditingElementWrapper ] of this._replacedRoots ) {\n\t\t\tconst oldData = this._dataFromRoots.get( rootName );\n\t\t\tconst newData = domSourceEditingElementWrapper.dataset.value!;\n\n\t\t\t// Do not set the data unless some changes have been made in the meantime.\n\t\t\t// This prevents empty undo steps after switching to the normal editor.\n\t\t\tif ( oldData !== newData ) {\n\t\t\t\tdata[ rootName ] = newData;\n\t\t\t\tthis._dataFromRoots.set( rootName, newData );\n\t\t\t}\n\t\t}\n\n\t\tif ( Object.keys( data ).length ) {\n\t\t\teditor.data.set( data, { batchType: { isUndoable: true }, suppressErrorInCollaboration: true } );\n\t\t}\n\t}\n\n\tprivate _checkCompatibility() {\n\t\tconst editor = this.editor;\n\t\tconst allowCollaboration = editor.config.get( 'sourceEditing.allowCollaborationFeatures' );\n\n\t\tif ( !allowCollaboration && editor.plugins.has( 'RealTimeCollaborativeEditing' ) ) {\n\t\t\t/**\n\t\t\t * Source editing feature is not fully compatible with real-time collaboration,\n\t\t\t * and using it may lead to data loss. Please read\n\t\t\t * {@glink features/source-editing#limitations-and-incompatibilities source editing feature guide} to learn more.\n\t\t\t *\n\t\t\t * If you understand the possible risk of data loss, you can enable the source editing\n\t\t\t * by setting the\n\t\t\t * {@link module:source-editing/sourceeditingconfig~SourceEditingConfig#allowCollaborationFeatures}\n\t\t\t * configuration flag to `true`.\n\t\t\t *\n\t\t\t * @error source-editing-incompatible-with-real-time-collaboration\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'source-editing-incompatible-with-real-time-collaboration', null );\n\t\t}\n\n\t\tconst collaborationPluginNamesToWarn = [\n\t\t\t'CommentsEditing',\n\t\t\t'TrackChangesEditing',\n\t\t\t'RevisionHistory'\n\t\t];\n\n\t\t// Currently, the basic integration with Collaboration Features is to display a warning in the console.\n\t\t//\n\t\t// If `allowCollaboration` flag is set, do not show these warnings. If the flag is set, we assume that the integrator read\n\t\t// appropriate section of the guide so there's no use to spam the console with warnings.\n\t\t//\n\t\tif ( !allowCollaboration && collaborationPluginNamesToWarn.some( pluginName => editor.plugins.has( pluginName ) ) ) {\n\t\t\tconsole.warn(\n\t\t\t\t'You initialized the editor with the source editing feature and at least one of the collaboration features. ' +\n\t\t\t\t'Please be advised that the source editing feature may not work, and be careful when editing document source ' +\n\t\t\t\t'that contains markers created by the collaboration features.'\n\t\t\t);\n\t\t}\n\n\t\t// Restricted Editing integration can also lead to problems. Warn the user accordingly.\n\t\tif ( editor.plugins.has( 'RestrictedEditingModeEditing' ) ) {\n\t\t\tconsole.warn(\n\t\t\t\t'You initialized the editor with the source editing feature and restricted editing feature. ' +\n\t\t\t\t'Please be advised that the source editing feature may not work, and be careful when editing document source ' +\n\t\t\t\t'that contains markers created by the restricted editing feature.'\n\t\t\t);\n\t\t}\n\t}\n\n\t/**\n\t * Creates source editing wrappers that replace each editing root. Each wrapper contains the document source from the corresponding\n\t * root.\n\t *\n\t * The wrapper element contains a textarea and it solves the problem, that the textarea element cannot auto expand its height based on\n\t * the content it contains. The solution is to make the textarea more like a plain div element, which expands in height as much as it\n\t * needs to, in order to display the whole document source without scrolling. The wrapper element is a parent for the textarea and for\n\t * the pseudo-element `::after`, that replicates the look, content, and position of the textarea. The pseudo-element replica is hidden,\n\t * but it is styled to be an identical visual copy of the textarea with the same content. Then, the wrapper is a grid container and both\n\t * of its children (the textarea and the `::after` pseudo-element) are positioned within a CSS grid to occupy the same grid cell. The\n\t * content in the pseudo-element `::after` is set in CSS and it stretches the grid to the appropriate size based on the textarea value.\n\t * Since both children occupy the same grid cell, both have always the same height.\n\t */\n\tprivate _showSourceEditing(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\t\tconst model = editor.model;\n\n\t\tmodel.change( writer => {\n\t\t\twriter.setSelection( null );\n\t\t\twriter.removeSelectionAttribute( model.document.selection.getAttributeKeys() );\n\t\t} );\n\n\t\t// It is not needed to iterate through all editing roots, as currently the plugin supports only the Classic Editor with a single\n\t\t// main root, but this code may help understand and use this feature in external integrations.\n\t\tfor ( const [ rootName, domRootElement ] of editingView.domRoots ) {\n\t\t\tconst data = formatSource( editor.data.get( { rootName } ) );\n\n\t\t\tconst domSourceEditingElementTextarea = createElement( domRootElement.ownerDocument, 'textarea', {\n\t\t\t\trows: '1',\n\t\t\t\t'aria-label': 'Source code editing area'\n\t\t\t} );\n\n\t\t\tconst domSourceEditingElementWrapper = createElement( domRootElement.ownerDocument, 'div', {\n\t\t\t\tclass: 'ck-source-editing-area',\n\t\t\t\t'data-value': data\n\t\t\t}, [ domSourceEditingElementTextarea ] );\n\n\t\t\tdomSourceEditingElementTextarea.value = data;\n\n\t\t\t// Setting a value to textarea moves the input cursor to the end. We want the selection at the beginning.\n\t\t\tdomSourceEditingElementTextarea.setSelectionRange( 0, 0 );\n\n\t\t\t// Bind the textarea's value to the wrapper's `data-value` property. Each change of the textarea's value updates the\n\t\t\t// wrapper's `data-value` property.\n\t\t\tdomSourceEditingElementTextarea.addEventListener( 'input', () => {\n\t\t\t\tdomSourceEditingElementWrapper.dataset.value = domSourceEditingElementTextarea.value;\n\n\t\t\t\teditor.ui.update();\n\t\t\t} );\n\n\t\t\teditingView.change( writer => {\n\t\t\t\tconst viewRoot = editingView.document.getRoot( rootName )!;\n\n\t\t\t\twriter.addClass( 'ck-hidden', viewRoot );\n\t\t\t} );\n\n\t\t\t// Register the element so it becomes available for Alt+F10 and Esc navigation.\n\t\t\teditor.ui.setEditableElement( 'sourceEditing:' + rootName, domSourceEditingElementTextarea );\n\n\t\t\tthis._replacedRoots.set( rootName, domSourceEditingElementWrapper );\n\n\t\t\tthis._elementReplacer.replace( domRootElement, domSourceEditingElementWrapper );\n\n\t\t\tthis._dataFromRoots.set( rootName, data );\n\t\t}\n\n\t\tthis._focusSourceEditing();\n\t}\n\n\t/**\n\t * Restores all hidden editing roots and sets the source data in them.\n\t */\n\tprivate _hideSourceEditing(): void {\n\t\tconst editor = this.editor;\n\t\tconst editingView = editor.editing.view;\n\n\t\tthis.updateEditorData();\n\n\t\teditingView.change( writer => {\n\t\t\tfor ( const [ rootName ] of this._replacedRoots ) {\n\t\t\t\twriter.removeClass( 'ck-hidden', editingView.document.getRoot( rootName )! );\n\t\t\t}\n\t\t} );\n\n\t\tthis._elementReplacer.restore();\n\n\t\tthis._replacedRoots.clear();\n\t\tthis._dataFromRoots.clear();\n\n\t\teditingView.focus();\n\t}\n\n\t/**\n\t * Focuses the textarea containing document source from the first editing root.\n\t */\n\tprivate _focusSourceEditing(): void {\n\t\tconst editor = this.editor;\n\t\tconst [ domSourceEditingElementWrapper ] = this._replacedRoots.values();\n\t\tconst textarea = domSourceEditingElementWrapper.querySelector( 'textarea' )!;\n\n\t\t// The FocusObserver was disabled by View.render() while the DOM root was getting hidden and the replacer\n\t\t// revealed the textarea. So it couldn't notice that the DOM root got blurred in the process.\n\t\t// Let's sync this state manually here because otherwise Renderer will attempt to render selection\n\t\t// in an invisible DOM root.\n\t\teditor.editing.view.document.isFocused = false;\n\n\t\ttextarea.focus();\n\t}\n\n\t/**\n\t * Disables all commands.\n\t */\n\tprivate _disableCommands(): void {\n\t\tconst editor = this.editor;\n\n\t\tfor ( const command of editor.commands.commands() ) {\n\t\t\tcommand.forceDisabled( COMMAND_FORCE_DISABLE_ID );\n\t\t}\n\t}\n\n\t/**\n\t * Clears forced disable for all commands, that was previously set through {@link #_disableCommands}.\n\t */\n\tprivate _enableCommands(): void {\n\t\tconst editor = this.editor;\n\n\t\tfor ( const command of editor.commands.commands() ) {\n\t\t\tcommand.clearForceDisabled( COMMAND_FORCE_DISABLE_ID );\n\t\t}\n\t}\n\n\t/**\n\t * Adds or removes the `readonly` attribute from the textarea from all roots, if document source mode is active.\n\t *\n\t * @param isReadOnly Indicates whether all textarea elements should be read-only.\n\t */\n\tprivate _handleReadOnlyMode( isReadOnly: boolean ): void {\n\t\tif ( !this.isSourceEditingMode ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const [ , domSourceEditingElementWrapper ] of this._replacedRoots ) {\n\t\t\tdomSourceEditingElementWrapper.querySelector( 'textarea' )!.readOnly = isReadOnly;\n\t\t}\n\t}\n\n\t/**\n\t * Checks, if the plugin is allowed to handle the source editing mode by itself. Currently, the source editing mode is supported only\n\t * for the {@link module:editor-classic/classiceditor~ClassicEditor classic editor}.\n\t */\n\tprivate _isAllowedToHandleSourceEditingMode(): boolean {\n\t\tconst editor = this.editor;\n\t\tconst editable = editor.ui.view.editable;\n\n\t\t// Checks, if the editor's editable belongs to the editor's DOM tree.\n\t\treturn editable && !editable.hasExternalElement;\n\t}\n\n\t/**\n\t * If any {@link module:ui/dialog/dialogview~DialogView editor dialog} is currently visible, hide it.\n\t */\n\tprivate _hideVisibleDialog(): void {\n\t\tif ( this.editor.plugins.has( 'Dialog' ) ) {\n\t\t\tconst dialogPlugin: Dialog = this.editor.plugins.get( 'Dialog' );\n\n\t\t\tif ( dialogPlugin.isOpen ) {\n\t\t\t\tdialogPlugin.hide();\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Formats the content for a better readability.\n *\n * For a non-HTML source the unchanged input string is returned.\n *\n * @param input Input string to check.\n */\nfunction formatSource( input: string ): string {\n\tif ( !isHtml( input ) ) {\n\t\treturn input;\n\t}\n\n\treturn formatHtml( input );\n}\n\n/**\n * Checks, if the document source is HTML. It is sufficient to just check the first character from the document data.\n *\n * @param input Input string to check.\n */\nfunction isHtml( input: string ): boolean {\n\treturn input.startsWith( '<' );\n}\n"]}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
import type { SourceEditing, SourceEditingConfig } from './index.js';
|
6
|
+
declare module '@ckeditor/ckeditor5-core' {
|
7
|
+
interface EditorConfig {
|
8
|
+
/**
|
9
|
+
* The configuration of the source editing feature.
|
10
|
+
*
|
11
|
+
* Read more in {@link module:source-editing/sourceeditingconfig~SourceEditingConfig}.
|
12
|
+
*/
|
13
|
+
sourceEditing?: SourceEditingConfig;
|
14
|
+
}
|
15
|
+
interface PluginsMap {
|
16
|
+
[SourceEditing.pluginName]: SourceEditing;
|
17
|
+
}
|
18
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module source-editing
|
7
|
+
*/
|
8
|
+
export { default as SourceEditing } from './sourceediting.js';
|
9
|
+
export type { SourceEditingConfig } from './sourceeditingconfig.js';
|
10
|
+
import './augmentation.js';
|
@@ -0,0 +1,103 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module source-editing/sourceediting
|
7
|
+
*/
|
8
|
+
import { type Editor, Plugin, PendingActions } from 'ckeditor5/src/core.js';
|
9
|
+
import '../theme/sourceediting.css';
|
10
|
+
/**
|
11
|
+
* The source editing feature.
|
12
|
+
*
|
13
|
+
* It provides the possibility to view and edit the source of the document.
|
14
|
+
*
|
15
|
+
* For a detailed overview, check the {@glink features/source-editing source editing feature documentation} and the
|
16
|
+
* {@glink api/source-editing package page}.
|
17
|
+
*/
|
18
|
+
export default class SourceEditing extends Plugin {
|
19
|
+
/**
|
20
|
+
* @inheritDoc
|
21
|
+
*/
|
22
|
+
static get pluginName(): "SourceEditing";
|
23
|
+
/**
|
24
|
+
* @inheritDoc
|
25
|
+
*/
|
26
|
+
static get requires(): readonly [typeof PendingActions];
|
27
|
+
/**
|
28
|
+
* Flag indicating whether the document source mode is active.
|
29
|
+
*
|
30
|
+
* @observable
|
31
|
+
*/
|
32
|
+
isSourceEditingMode: boolean;
|
33
|
+
/**
|
34
|
+
* The element replacer instance used to replace the editing roots with the wrapper elements containing the document source.
|
35
|
+
*/
|
36
|
+
private _elementReplacer;
|
37
|
+
/**
|
38
|
+
* Maps all root names to wrapper elements containing the document source.
|
39
|
+
*/
|
40
|
+
private _replacedRoots;
|
41
|
+
/**
|
42
|
+
* Maps all root names to their document data.
|
43
|
+
*/
|
44
|
+
private _dataFromRoots;
|
45
|
+
/**
|
46
|
+
* @inheritDoc
|
47
|
+
*/
|
48
|
+
constructor(editor: Editor);
|
49
|
+
/**
|
50
|
+
* @inheritDoc
|
51
|
+
*/
|
52
|
+
init(): void;
|
53
|
+
/**
|
54
|
+
* Updates the source data in all hidden editing roots.
|
55
|
+
*/
|
56
|
+
updateEditorData(): void;
|
57
|
+
private _checkCompatibility;
|
58
|
+
/**
|
59
|
+
* Creates source editing wrappers that replace each editing root. Each wrapper contains the document source from the corresponding
|
60
|
+
* root.
|
61
|
+
*
|
62
|
+
* The wrapper element contains a textarea and it solves the problem, that the textarea element cannot auto expand its height based on
|
63
|
+
* the content it contains. The solution is to make the textarea more like a plain div element, which expands in height as much as it
|
64
|
+
* needs to, in order to display the whole document source without scrolling. The wrapper element is a parent for the textarea and for
|
65
|
+
* the pseudo-element `::after`, that replicates the look, content, and position of the textarea. The pseudo-element replica is hidden,
|
66
|
+
* but it is styled to be an identical visual copy of the textarea with the same content. Then, the wrapper is a grid container and both
|
67
|
+
* of its children (the textarea and the `::after` pseudo-element) are positioned within a CSS grid to occupy the same grid cell. The
|
68
|
+
* content in the pseudo-element `::after` is set in CSS and it stretches the grid to the appropriate size based on the textarea value.
|
69
|
+
* Since both children occupy the same grid cell, both have always the same height.
|
70
|
+
*/
|
71
|
+
private _showSourceEditing;
|
72
|
+
/**
|
73
|
+
* Restores all hidden editing roots and sets the source data in them.
|
74
|
+
*/
|
75
|
+
private _hideSourceEditing;
|
76
|
+
/**
|
77
|
+
* Focuses the textarea containing document source from the first editing root.
|
78
|
+
*/
|
79
|
+
private _focusSourceEditing;
|
80
|
+
/**
|
81
|
+
* Disables all commands.
|
82
|
+
*/
|
83
|
+
private _disableCommands;
|
84
|
+
/**
|
85
|
+
* Clears forced disable for all commands, that was previously set through {@link #_disableCommands}.
|
86
|
+
*/
|
87
|
+
private _enableCommands;
|
88
|
+
/**
|
89
|
+
* Adds or removes the `readonly` attribute from the textarea from all roots, if document source mode is active.
|
90
|
+
*
|
91
|
+
* @param isReadOnly Indicates whether all textarea elements should be read-only.
|
92
|
+
*/
|
93
|
+
private _handleReadOnlyMode;
|
94
|
+
/**
|
95
|
+
* Checks, if the plugin is allowed to handle the source editing mode by itself. Currently, the source editing mode is supported only
|
96
|
+
* for the {@link module:editor-classic/classiceditor~ClassicEditor classic editor}.
|
97
|
+
*/
|
98
|
+
private _isAllowedToHandleSourceEditingMode;
|
99
|
+
/**
|
100
|
+
* If any {@link module:ui/dialog/dialogview~DialogView editor dialog} is currently visible, hide it.
|
101
|
+
*/
|
102
|
+
private _hideVisibleDialog;
|
103
|
+
}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module source-editing/sourceeditingconfig
|
7
|
+
*/
|
8
|
+
/**
|
9
|
+
* The configuration of the source editing feature.
|
10
|
+
*
|
11
|
+
* ```ts
|
12
|
+
* ClassicEditor
|
13
|
+
* .create( {
|
14
|
+
* sourceEditing: {
|
15
|
+
* allowCollaborationFeatures: true
|
16
|
+
* }
|
17
|
+
* } )
|
18
|
+
* .then( ... )
|
19
|
+
* .catch( ... );
|
20
|
+
* ```
|
21
|
+
*
|
22
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
23
|
+
*/
|
24
|
+
export interface SourceEditingConfig {
|
25
|
+
/**
|
26
|
+
* Set to `true` to enable source editing feature for real-time collaboration.
|
27
|
+
*
|
28
|
+
* Please note that source editing feature is not fully compatible with real-time collaboration and using it may lead to data loss.
|
29
|
+
* {@glink features/source-editing#limitations-and-incompatibilities Read more}.
|
30
|
+
*
|
31
|
+
* @default false
|
32
|
+
*/
|
33
|
+
allowCollaborationFeatures?: boolean;
|
34
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
/**
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
4
|
+
*/
|
5
|
+
/**
|
6
|
+
* @module source-editing/utils/formathtml
|
7
|
+
*/
|
8
|
+
/**
|
9
|
+
* A simple (and naive) HTML code formatter that returns a formatted HTML markup that can be easily
|
10
|
+
* parsed by human eyes. It beautifies the HTML code by adding new lines between elements that behave like block elements
|
11
|
+
* (https://developer.mozilla.org/en-US/docs/Web/HTML/Block-level_elements
|
12
|
+
* and a few more like `tr`, `td`, and similar ones) and inserting indents for nested content.
|
13
|
+
*
|
14
|
+
* WARNING: This function works only on a text that does not contain any indentations or new lines.
|
15
|
+
* Calling this function on the already formatted text will damage the formatting.
|
16
|
+
*
|
17
|
+
* @param input An HTML string to format.
|
18
|
+
*/
|
19
|
+
export declare function formatHtml(input: string): string;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-source-editing",
|
3
|
-
"version": "41.
|
3
|
+
"version": "41.3.0-alpha.0",
|
4
4
|
"description": "Source editing feature for CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -13,8 +13,8 @@
|
|
13
13
|
"type": "module",
|
14
14
|
"main": "src/index.js",
|
15
15
|
"dependencies": {
|
16
|
-
"@ckeditor/ckeditor5-theme-lark": "41.
|
17
|
-
"ckeditor5": "41.
|
16
|
+
"@ckeditor/ckeditor5-theme-lark": "41.3.0-alpha.0",
|
17
|
+
"ckeditor5": "41.3.0-alpha.0"
|
18
18
|
},
|
19
19
|
"author": "CKSource (http://cksource.com/)",
|
20
20
|
"license": "GPL-2.0-or-later",
|
@@ -26,6 +26,7 @@
|
|
26
26
|
"directory": "packages/ckeditor5-source-editing"
|
27
27
|
},
|
28
28
|
"files": [
|
29
|
+
"dist",
|
29
30
|
"lang",
|
30
31
|
"src/**/*.js",
|
31
32
|
"src/**/*.d.ts",
|