@procore/text-editor 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/dist/TextEditor/TextEditor.styles.js +1 -1
- package/dist/TextEditor/license_key.d.ts +2 -2
- package/dist/TextEditor/license_key.js +2 -2
- package/dist/TextEditor/license_key.js.map +1 -1
- package/dist/TextEditor/useCKEditorCss.js +8 -1
- package/dist/TextEditor/useCKEditorCss.js.map +1 -1
- package/dist/TextEditor/utils/config.js +3 -2
- package/dist/TextEditor/utils/config.js.map +1 -1
- package/dist/TextEditorOutput/TextEditorOutput.styles.js +1 -1
- package/dist/_typedoc/TextEditor/TextEditor.types.json +17 -17
- package/dist/_typedoc/TextEditor/TextEditorProvider.types.json +2 -2
- package/dist/_typedoc/TextEditorOutput/TextEditorOutput.types.json +3 -3
- package/jestConfig.js +1 -0
- package/package.json +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# @procore/text-editor
|
|
2
2
|
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 5e18bea: Breaking - Added the MultiLevelList plugin from ckeditor5-premium-features peerDep to the editor configuration, enabling multi-level/nested list support. Apps must install it as a singleton dependency.
|
|
8
|
+
|
|
9
|
+
## 0.3.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- ff71188: Updated CKEditor license keys after renewal
|
|
14
|
+
- Updated dependencies [ae28df6]
|
|
15
|
+
- Updated dependencies [e3601e1]
|
|
16
|
+
- Updated dependencies [aaf9541]
|
|
17
|
+
- Updated dependencies [9a06acb]
|
|
18
|
+
- @procore/core-react@12.46.0
|
|
19
|
+
|
|
3
20
|
## 0.3.1
|
|
4
21
|
|
|
5
22
|
### Patch Changes
|
|
@@ -30,7 +30,7 @@ export var GlobalEditorStyles = /*#__PURE__*/createGlobalStyle([":root{--ck-z-de
|
|
|
30
30
|
});
|
|
31
31
|
export var StyledTextEditor = /*#__PURE__*/styled.div.withConfig({
|
|
32
32
|
displayName: "StyledTextEditor",
|
|
33
|
-
componentId: "text-editor-
|
|
33
|
+
componentId: "text-editor-0_4_0__sc-iim79x-0"
|
|
34
34
|
})(["", ""], function (_ref0) {
|
|
35
35
|
var error = _ref0.error;
|
|
36
36
|
return error && "\n .ck-sticky-panel__content {\n border-top-color: ".concat(colors.red50, " !important;\n border-left-color: ").concat(colors.red50, " !important;\n border-right-color: ").concat(colors.red50, " !important;\n }\n\n .ck-editor__editable {\n border-left-color: ").concat(colors.red50, " !important;\n border-right-color: ").concat(colors.red50, " !important;\n border-bottom-color: ").concat(colors.red50, " !important;\n }\n ");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DEV_CK_EDITOR_LICENSE_KEY = "eyJhbGciOiJFUzI1NiJ9.
|
|
2
|
-
export declare const CK_EDITOR_LICENSE_KEY = "eyJhbGciOiJFUzI1NiJ9.
|
|
1
|
+
export declare const DEV_CK_EDITOR_LICENSE_KEY = "eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE4MDU5MzI3OTksImp0aSI6IjVkZTZmZjM1LTkyOGMtNDVmOC1hZThjLTIxMTQ4M2JhNTJiYyIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwibGljZW5zZVR5cGUiOiJkZXZlbG9wbWVudCIsImZlYXR1cmVzIjpbIkRSVVAiLCJETyIsIkZQIiwiU0MiLCJUT0MiLCJUUEwiLCJQT0UiLCJDQyIsIk1GIiwiU0VFIiwiRUNIIiwiRUlTIiwiTEgiLCJGT08iLCJNTEwiXSwidmMiOiI3YTc1ZTA4YyJ9.B19JLbq858FIBVNHUCaplYuN5-F1ahTg74ihITpucJJxSe0ZjYKBQV_9LH7oYtF6S56dkN6Cp4KWPBKVF1bJLw";
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ZjYKBQV_9LH7oYtF6S56dkN6Cp4KWPBKVF1bJLw';
|
|
2
|
+
export var CK_EDITOR_LICENSE_KEY = 'eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE4MDU5MzI3OTksImp0aSI6ImJkYTE4MzliLWU3NDAtNDBkNy1hYmEyLWZkN2IxMDU1YWZhYyIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwiZmVhdHVyZXMiOlsiRFJVUCIsIkRPIiwiRlAiLCJTQyIsIlRPQyIsIlRQTCIsIlBPRSIsIkNDIiwiTUYiLCJTRUUiLCJFQ0giLCJFSVMiLCJMSCIsIkZPTyIsIk1MTCJdLCJ2YyI6IjVkZDhlMmRiIn0.Ksi_3ee7IjEUAtZRWi_rJb7HTFpjnxDZPJ529UCqkIbMu8ujPAYzv3eDtdwAEFkWdWTa0H-8G-o19QSAJjemPg';
|
|
3
3
|
//# sourceMappingURL=license_key.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"license_key.js","names":["DEV_CK_EDITOR_LICENSE_KEY","CK_EDITOR_LICENSE_KEY"],"sources":["../../src/TextEditor/license_key.ts"],"sourcesContent":["export const DEV_CK_EDITOR_LICENSE_KEY =\n 'eyJhbGciOiJFUzI1NiJ9.
|
|
1
|
+
{"version":3,"file":"license_key.js","names":["DEV_CK_EDITOR_LICENSE_KEY","CK_EDITOR_LICENSE_KEY"],"sources":["../../src/TextEditor/license_key.ts"],"sourcesContent":["export const DEV_CK_EDITOR_LICENSE_KEY =\n 'eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE4MDU5MzI3OTksImp0aSI6IjVkZTZmZjM1LTkyOGMtNDVmOC1hZThjLTIxMTQ4M2JhNTJiYyIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwibGljZW5zZVR5cGUiOiJkZXZlbG9wbWVudCIsImZlYXR1cmVzIjpbIkRSVVAiLCJETyIsIkZQIiwiU0MiLCJUT0MiLCJUUEwiLCJQT0UiLCJDQyIsIk1GIiwiU0VFIiwiRUNIIiwiRUlTIiwiTEgiLCJGT08iLCJNTEwiXSwidmMiOiI3YTc1ZTA4YyJ9.B19JLbq858FIBVNHUCaplYuN5-F1ahTg74ihITpucJJxSe0ZjYKBQV_9LH7oYtF6S56dkN6Cp4KWPBKVF1bJLw'\n\nexport const CK_EDITOR_LICENSE_KEY =\n 'eyJhbGciOiJFUzI1NiJ9.eyJleHAiOjE4MDU5MzI3OTksImp0aSI6ImJkYTE4MzliLWU3NDAtNDBkNy1hYmEyLWZkN2IxMDU1YWZhYyIsImRpc3RyaWJ1dGlvbkNoYW5uZWwiOlsic2giLCJkcnVwYWwiXSwid2hpdGVMYWJlbCI6dHJ1ZSwiZmVhdHVyZXMiOlsiRFJVUCIsIkRPIiwiRlAiLCJTQyIsIlRPQyIsIlRQTCIsIlBPRSIsIkNDIiwiTUYiLCJTRUUiLCJFQ0giLCJFSVMiLCJMSCIsIkZPTyIsIk1MTCJdLCJ2YyI6IjVkZDhlMmRiIn0.Ksi_3ee7IjEUAtZRWi_rJb7HTFpjnxDZPJ529UCqkIbMu8ujPAYzv3eDtdwAEFkWdWTa0H-8G-o19QSAJjemPg'\n"],"mappings":"AAAA,OAAO,IAAMA,yBAAyB,GACpC,0cAA0c;AAE5c,OAAO,IAAMC,qBAAqB,GAChC,qaAAqa"}
|
|
@@ -5,8 +5,10 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import { useEffect, useState } from 'react';
|
|
8
|
-
var CKEDITOR_CSS_URL = 'https://cdn.ckeditor.com/ckeditor5/46.0.1/ckeditor5.css';
|
|
9
8
|
var CKEDITOR_CSS_ID = 'ckeditor-styles';
|
|
9
|
+
var CKEDITOR_CSS_URL = 'https://cdn.ckeditor.com/ckeditor5/47.6.1/ckeditor5.css';
|
|
10
|
+
var PREMIUM_FEATURE_CSS_ID = 'ckeditor-premium-styles';
|
|
11
|
+
var CKEDITOR_CSS_PREMIUM_FEATURE_URL = 'https://cdn.ckeditor.com/ckeditor5-premium-features/47.6.1/ckeditor5-premium-features.css';
|
|
10
12
|
export var useCKEditorCss = function useCKEditorCss() {
|
|
11
13
|
var _useState = useState(true),
|
|
12
14
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -21,6 +23,10 @@ export var useCKEditorCss = function useCKEditorCss() {
|
|
|
21
23
|
link.id = CKEDITOR_CSS_ID;
|
|
22
24
|
link.href = CKEDITOR_CSS_URL;
|
|
23
25
|
link.rel = 'stylesheet';
|
|
26
|
+
var premiumFeatureLink = document.createElement('link');
|
|
27
|
+
premiumFeatureLink.id = PREMIUM_FEATURE_CSS_ID;
|
|
28
|
+
premiumFeatureLink.href = CKEDITOR_CSS_PREMIUM_FEATURE_URL;
|
|
29
|
+
premiumFeatureLink.rel = 'stylesheet';
|
|
24
30
|
link.onload = function () {
|
|
25
31
|
setIsLoading(false);
|
|
26
32
|
};
|
|
@@ -28,6 +34,7 @@ export var useCKEditorCss = function useCKEditorCss() {
|
|
|
28
34
|
setIsLoading(false);
|
|
29
35
|
};
|
|
30
36
|
document.head.appendChild(link);
|
|
37
|
+
document.head.appendChild(premiumFeatureLink);
|
|
31
38
|
}, []);
|
|
32
39
|
return {
|
|
33
40
|
isLoading: isLoading
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCKEditorCss.js","names":["useEffect","useState","CKEDITOR_CSS_URL","
|
|
1
|
+
{"version":3,"file":"useCKEditorCss.js","names":["useEffect","useState","CKEDITOR_CSS_ID","CKEDITOR_CSS_URL","PREMIUM_FEATURE_CSS_ID","CKEDITOR_CSS_PREMIUM_FEATURE_URL","useCKEditorCss","_useState","_useState2","_slicedToArray","isLoading","setIsLoading","document","getElementById","link","createElement","id","href","rel","premiumFeatureLink","onload","onerror","head","appendChild"],"sources":["../../src/TextEditor/useCKEditorCss.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\nconst CKEDITOR_CSS_ID = 'ckeditor-styles'\nconst CKEDITOR_CSS_URL =\n 'https://cdn.ckeditor.com/ckeditor5/47.6.1/ckeditor5.css'\n\nconst PREMIUM_FEATURE_CSS_ID = 'ckeditor-premium-styles'\nconst CKEDITOR_CSS_PREMIUM_FEATURE_URL =\n 'https://cdn.ckeditor.com/ckeditor5-premium-features/47.6.1/ckeditor5-premium-features.css'\n\nexport const useCKEditorCss = () => {\n const [isLoading, setIsLoading] = useState(true)\n\n useEffect(() => {\n if (document.getElementById(CKEDITOR_CSS_ID)) {\n setIsLoading(false)\n return\n }\n\n const link = document.createElement('link')\n link.id = CKEDITOR_CSS_ID\n link.href = CKEDITOR_CSS_URL\n link.rel = 'stylesheet'\n\n const premiumFeatureLink = document.createElement('link')\n premiumFeatureLink.id = PREMIUM_FEATURE_CSS_ID\n premiumFeatureLink.href = CKEDITOR_CSS_PREMIUM_FEATURE_URL\n premiumFeatureLink.rel = 'stylesheet'\n\n link.onload = () => {\n setIsLoading(false)\n }\n\n link.onerror = () => {\n setIsLoading(false)\n }\n\n document.head.appendChild(link)\n document.head.appendChild(premiumFeatureLink)\n }, [])\n\n return { isLoading }\n}\n"],"mappings":";;;;;;AAAA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAE3C,IAAMC,eAAe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
|
|
|
1
1
|
import { Alignment, Autoformat, AutoLink, BlockQuote, Bold, Clipboard, CodeBlock, Essentials, FontBackgroundColor, FontColor, FontSize, GeneralHtmlSupport, Heading, HorizontalLine, Indent, IndentBlock, Italic, Link, List, ListProperties, Paragraph, RemoveFormat, SpecialCharacters, SpecialCharactersEssentials, Strikethrough, Subscript, Superscript, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, Underline } from 'ckeditor5';
|
|
2
|
+
import { MultiLevelList } from 'ckeditor5-premium-features';
|
|
2
3
|
import { CK_EDITOR_LICENSE_KEY } from '../license_key';
|
|
3
4
|
import { CutPlugin } from '../plugins/CutPlugin';
|
|
4
5
|
import { IndentPaddingToMarginPlugin } from '../plugins/IndentPaddingToMarginPlugin';
|
|
@@ -57,10 +58,10 @@ export var getDefaultConfig = function getDefaultConfig() {
|
|
|
57
58
|
licenseKey: CK_EDITOR_LICENSE_KEY,
|
|
58
59
|
language: getValidEditorLocale(locale),
|
|
59
60
|
translations: [getEditorTranslation(locale)],
|
|
60
|
-
plugins: [Alignment, AutoLink, Bold, Clipboard, Essentials, FontBackgroundColor, FontColor, FontSize, GeneralHtmlSupport, Indent, IndentBlock, Italic, Link, List, ListProperties, Paragraph, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, Underline, CutPlugin, PastePlugin, PasteAsTextPlugin, IndentPaddingToMarginPlugin, BlockQuote, Heading, Autoformat, SpecialCharacters, SpecialCharactersEssentials, Subscript, Superscript, HorizontalLine, RemoveFormat, CodeBlock, TabSpacesPlugin // TODO - delete
|
|
61
|
+
plugins: [Alignment, AutoLink, Bold, Clipboard, Essentials, FontBackgroundColor, FontColor, FontSize, GeneralHtmlSupport, Indent, IndentBlock, Italic, Link, List, ListProperties, MultiLevelList, Paragraph, Strikethrough, Table, TableCaption, TableCellProperties, TableColumnResize, TableProperties, TableToolbar, Underline, CutPlugin, PastePlugin, PasteAsTextPlugin, IndentPaddingToMarginPlugin, BlockQuote, Heading, Autoformat, SpecialCharacters, SpecialCharactersEssentials, Subscript, Superscript, HorizontalLine, RemoveFormat, CodeBlock, TabSpacesPlugin // TODO - delete
|
|
61
62
|
],
|
|
62
63
|
|
|
63
|
-
toolbar: ['bold', 'italic', 'underline', 'strikethrough', '|', 'alignment:left', 'alignment:center', 'alignment:right', '|', 'bulletedList', 'numberedList', '|', 'outdent', 'indent', '|', 'cut', 'paste', 'pasteAsText', '|', 'fontSize', '|', 'fontColor', 'fontBackgroundColor', '|', 'insertTable', 'link', '|', 'blockquote', 'heading', '|', 'horizontalLine', 'removeFormat', 'specialCharacters', 'subscript', 'superscript', 'codeblock', '|', 'undo', 'redo'],
|
|
64
|
+
toolbar: ['bold', 'italic', 'underline', 'strikethrough', '|', 'alignment:left', 'alignment:center', 'alignment:right', '|', 'bulletedList', 'numberedList', 'multiLevelList', '|', 'outdent', 'indent', '|', 'cut', 'paste', 'pasteAsText', '|', 'fontSize', '|', 'fontColor', 'fontBackgroundColor', '|', 'insertTable', 'link', '|', 'blockquote', 'heading', '|', 'horizontalLine', 'removeFormat', 'specialCharacters', 'subscript', 'superscript', 'codeblock', '|', 'undo', 'redo'],
|
|
64
65
|
fontSize: {
|
|
65
66
|
options: [{
|
|
66
67
|
title: '8pt',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","names":["Alignment","Autoformat","AutoLink","BlockQuote","Bold","Clipboard","CodeBlock","Essentials","FontBackgroundColor","FontColor","FontSize","GeneralHtmlSupport","Heading","HorizontalLine","Indent","IndentBlock","Italic","Link","List","ListProperties","Paragraph","RemoveFormat","SpecialCharacters","SpecialCharactersEssentials","Strikethrough","Subscript","Superscript","Table","TableCaption","TableCellProperties","TableColumnResize","TableProperties","TableToolbar","Underline","CK_EDITOR_LICENSE_KEY","CutPlugin","IndentPaddingToMarginPlugin","PasteAsTextPlugin","PastePlugin","TabSpacesPlugin","getEditorTranslation","getValidEditorLocale","TEXT_COLOR_PALETTE","color","getDefaultConfig","locale","arguments","length","undefined","licenseKey","language","translations","plugins","toolbar","fontSize","options","title","model","supportAllValues","fontColor","colors","fontBackgroundColor","indentBlock","offset","unit","htmlSupport","allow","name","styles","list","properties","useAttribute","startIndex","reversed","image","insert","integrations","table","contentToolbar","tableProperties","borderColors","backgroundColors","tableCellProperties","addButtonDataAttributes","editor","applyAttributes","toolbarElement","ui","view","element","toolbarChildren","Array","from","querySelectorAll","moreDropdownButtons","allToolbarElements","concat","toolbarItems","config","get","elementIndex","forEach","itemName","classList","contains","setAttribute","observer","MutationObserver","observe","childList","subtree","on","disconnect"],"sources":["../../../src/TextEditor/utils/config.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig } from 'ckeditor5'\nimport {\n Alignment,\n Autoformat,\n AutoLink,\n BlockQuote,\n Bold,\n Clipboard,\n CodeBlock,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Heading,\n HorizontalLine,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n Paragraph,\n RemoveFormat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n} from 'ckeditor5'\n\nimport { CK_EDITOR_LICENSE_KEY } from '../license_key'\nimport { CutPlugin } from '../plugins/CutPlugin'\nimport { IndentPaddingToMarginPlugin } from '../plugins/IndentPaddingToMarginPlugin'\nimport { PasteAsTextPlugin } from '../plugins/PasteAsTextPlugin'\nimport { PastePlugin } from '../plugins/PastePlugin'\nimport { TabSpacesPlugin } from '../plugins/TabSpacesPlugin'\nimport { getEditorTranslation, getValidEditorLocale } from './locale'\n\nconst TEXT_COLOR_PALETTE = [\n { color: '#BFEDD2' },\n { color: '#FBEEB8' },\n { color: '#F8CAC6' },\n { color: '#ECCAFA' },\n { color: '#C2E0F4' },\n { color: '#2DC26B' },\n { color: '#F1C40F' },\n { color: '#E03E2D' },\n { color: '#B96AD9' },\n { color: '#3598DB' },\n { color: '#169179' },\n { color: '#E67E23' },\n { color: '#BA372A' },\n { color: '#843FA1' },\n { color: '#236FA1' },\n { color: '#ECF0F1' },\n { color: '#CED4D9' },\n { color: '#95A5A6' },\n { color: '#7E8C8D' },\n { color: '#34495E' },\n { color: '#000000' },\n { color: '#FFFFFF' },\n]\n\nexport const getDefaultConfig = (locale: string = 'en'): EditorConfig => ({\n licenseKey: CK_EDITOR_LICENSE_KEY,\n language: getValidEditorLocale(locale),\n translations: [getEditorTranslation(locale)],\n plugins: [\n Alignment,\n AutoLink,\n Bold,\n Clipboard,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n Paragraph,\n Strikethrough,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n CutPlugin,\n PastePlugin,\n PasteAsTextPlugin,\n IndentPaddingToMarginPlugin,\n BlockQuote,\n Heading,\n Autoformat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Subscript,\n Superscript,\n HorizontalLine,\n RemoveFormat,\n CodeBlock,\n TabSpacesPlugin, // TODO - delete\n ],\n toolbar: [\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n '|',\n 'alignment:left',\n 'alignment:center',\n 'alignment:right',\n '|',\n 'bulletedList',\n 'numberedList',\n '|',\n 'outdent',\n 'indent',\n '|',\n 'cut',\n 'paste',\n 'pasteAsText',\n '|',\n 'fontSize',\n '|',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'insertTable',\n 'link',\n '|',\n 'blockquote',\n 'heading',\n '|',\n 'horizontalLine',\n 'removeFormat',\n 'specialCharacters',\n 'subscript',\n 'superscript',\n 'codeblock',\n '|',\n 'undo',\n 'redo',\n ],\n fontSize: {\n options: [\n { title: '8pt', model: '8px' },\n { title: '10pt', model: '10px' },\n { title: '12pt', model: '12px' },\n { title: '14pt', model: '14px' },\n { title: '18pt', model: '18px' },\n { title: '24pt', model: '24px' },\n { title: '36pt', model: '36px' },\n ],\n supportAllValues: true,\n },\n fontColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n fontBackgroundColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n indentBlock: {\n offset: 40,\n unit: 'px',\n },\n htmlSupport: {\n allow: [\n {\n name: 'p',\n styles: {\n 'margin-left': true,\n },\n },\n ],\n },\n list: {\n properties: {\n styles: {\n useAttribute: false,\n },\n startIndex: true,\n reversed: true,\n },\n },\n image: {\n insert: {\n integrations: ['insertImageViaUrl'],\n },\n toolbar: ['imageTextAlternative'],\n },\n table: {\n contentToolbar: [\n 'tableColumn',\n 'tableRow',\n 'mergeTableCells',\n 'tableProperties',\n 'tableCellProperties',\n ],\n tableProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n tableCellProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n },\n})\n\n// Add stable data attributes to toolbar buttons for the styling (or testing) purposes\nexport const addButtonDataAttributes = (editor: ClassicEditor) => {\n const applyAttributes = () => {\n const toolbarElement = editor.ui.view.toolbar.element\n if (!toolbarElement) {\n return\n }\n\n // Get buttons in the main toolbar\n const toolbarChildren = Array.from(\n toolbarElement.querySelectorAll('.ck-toolbar__items > *')\n )\n\n // Get buttons hidden in \"more\" dropdown\n const moreDropdownButtons = Array.from(\n toolbarElement.querySelectorAll('.ck-dropdown__panel .ck-list .ck-button')\n )\n\n const allToolbarElements = [...toolbarChildren, ...moreDropdownButtons]\n\n // Create mapping based on toolbar configuration order\n const toolbarItems = (editor.config.get('toolbar') || []) as string[]\n let elementIndex = 0\n\n toolbarItems.forEach((itemName) => {\n const element = allToolbarElements[elementIndex]\n if (\n itemName !== '|' &&\n element &&\n !element.classList.contains('ck-toolbar__separator')\n ) {\n // Use the toolbar item name as the stable identifier\n element.setAttribute('data-cke-command', itemName)\n }\n elementIndex++\n })\n }\n\n // Apply attributes initially\n applyAttributes()\n\n // Re-apply when dropdown menus are opened (buttons get created dynamically)\n const toolbarElement = editor.ui.view.toolbar.element\n if (toolbarElement) {\n const observer = new MutationObserver(() => {\n applyAttributes()\n })\n observer.observe(toolbarElement, {\n childList: true,\n subtree: true,\n })\n editor.on('destroy', () => {\n observer.disconnect()\n })\n }\n}\n"],"mappings":"AACA,SACEA,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,mBAAmB,EACnBC,SAAS,EACTC,QAAQ,EACRC,kBAAkB,EAClBC,OAAO,EACPC,cAAc,EACdC,MAAM,EACNC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,cAAc,EACdC,SAAS,EACTC,YAAY,EACZC,iBAAiB,EACjBC,2BAA2B,EAC3BC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,KAAK,EACLC,YAAY,EACZC,mBAAmB,EACnBC,iBAAiB,EACjBC,eAAe,EACfC,YAAY,EACZC,SAAS,QACJ,WAAW;AAElB,SAASC,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAASC,2BAA2B,QAAQ,wCAAwC;AACpF,SAASC,iBAAiB,QAAQ,8BAA8B;AAChE,SAASC,WAAW,QAAQ,wBAAwB;AACpD,SAASC,eAAe,QAAQ,4BAA4B;AAC5D,SAASC,oBAAoB,EAAEC,oBAAoB,QAAQ,UAAU;AAErE,IAAMC,kBAAkB,GAAG,CACzB;EAAEC,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,KAAK,EAAE;AAAU,CAAC,EACpB;EAAEA,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AED;IACA,IAAMC,mBAAmB,GAAGH,KAAK,CAACC,IAAI,CACpCN,cAAc,CAACO,gBAAgB,CAAC,yCAAyC,CAC3E,CAAC;IAED,IAAME,kBAAkB,MAAAC,MAAA,CAAON,eAAe,EAAKI,mBAAmB,CAAC;;IAEvE;IACA,IAAMG,YAAY,GAAIb,MAAM,CAACc,MAAM,CAACC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAe;IACrE,IAAIC,YAAY,GAAG,CAAC;IAEpBH,YAAY,CAACI,OAAO,CAAC,UAACC,QAAQ,EAAK;MACjC,IAAMb,OAAO,GAAGM,kBAAkB,CAACK,YAAY,CAAC;MAChD,IACEE,QAAQ,KAAK,GAAG,IAChBb,OAAO,IACP,CAACA,OAAO,CAACc,SAAS,CAACC,QAAQ,CAAC,uBAAuB,CAAC,EACpD;QACA;QACAf,OAAO,CAACgB,YAAY,CAAC,kBAAkB,EAAEH,QAAQ,CAAC;MACpD;MACAF,YAAY,EAAE;IAChB,CAAC,CAAC;EACJ,CAAC;;EAED;EACAf,eAAe,CAAC,CAAC;;EAEjB;EACA,IAAMC,cAAc,GAAGF,MAAM,CAACG,EAAE,CAACC,IAAI,CAACnC,OAAO,CAACoC,OAAO;EACrD,IAAIH,cAAc,EAAE;IAClB,IAAMoB,QAAQ,GAAG,IAAIC,gBAAgB,CAAC,YAAM;MAC1CtB,eAAe,CAAC,CAAC;IACnB,CAAC,CAAC;IACFqB,QAAQ,CAACE,OAAO,CAACtB,cAAc,EAAE;MAC/BuB,SAAS,EAAE,IAAI;MACfC,OAAO,EAAE;IACX,CAAC,CAAC;IACF1B,MAAM,CAAC2B,EAAE,CAAC,SAAS,EAAE,YAAM;MACzBL,QAAQ,CAACM,UAAU,CAAC,CAAC;IACvB,CAAC,CAAC;EACJ;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"config.js","names":["Alignment","Autoformat","AutoLink","BlockQuote","Bold","Clipboard","CodeBlock","Essentials","FontBackgroundColor","FontColor","FontSize","GeneralHtmlSupport","Heading","HorizontalLine","Indent","IndentBlock","Italic","Link","List","ListProperties","Paragraph","RemoveFormat","SpecialCharacters","SpecialCharactersEssentials","Strikethrough","Subscript","Superscript","Table","TableCaption","TableCellProperties","TableColumnResize","TableProperties","TableToolbar","Underline","MultiLevelList","CK_EDITOR_LICENSE_KEY","CutPlugin","IndentPaddingToMarginPlugin","PasteAsTextPlugin","PastePlugin","TabSpacesPlugin","getEditorTranslation","getValidEditorLocale","TEXT_COLOR_PALETTE","color","getDefaultConfig","locale","arguments","length","undefined","licenseKey","language","translations","plugins","toolbar","fontSize","options","title","model","supportAllValues","fontColor","colors","fontBackgroundColor","indentBlock","offset","unit","htmlSupport","allow","name","styles","list","properties","useAttribute","startIndex","reversed","image","insert","integrations","table","contentToolbar","tableProperties","borderColors","backgroundColors","tableCellProperties","addButtonDataAttributes","editor","applyAttributes","toolbarElement","ui","view","element","toolbarChildren","Array","from","querySelectorAll","moreDropdownButtons","allToolbarElements","concat","toolbarItems","config","get","elementIndex","forEach","itemName","classList","contains","setAttribute","observer","MutationObserver","observe","childList","subtree","on","disconnect"],"sources":["../../../src/TextEditor/utils/config.ts"],"sourcesContent":["import type { ClassicEditor, EditorConfig } from 'ckeditor5'\nimport {\n Alignment,\n Autoformat,\n AutoLink,\n BlockQuote,\n Bold,\n Clipboard,\n CodeBlock,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Heading,\n HorizontalLine,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n Paragraph,\n RemoveFormat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Strikethrough,\n Subscript,\n Superscript,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n} from 'ckeditor5'\nimport { MultiLevelList } from 'ckeditor5-premium-features'\n\nimport { CK_EDITOR_LICENSE_KEY } from '../license_key'\nimport { CutPlugin } from '../plugins/CutPlugin'\nimport { IndentPaddingToMarginPlugin } from '../plugins/IndentPaddingToMarginPlugin'\nimport { PasteAsTextPlugin } from '../plugins/PasteAsTextPlugin'\nimport { PastePlugin } from '../plugins/PastePlugin'\nimport { TabSpacesPlugin } from '../plugins/TabSpacesPlugin'\nimport { getEditorTranslation, getValidEditorLocale } from './locale'\n\nconst TEXT_COLOR_PALETTE = [\n { color: '#BFEDD2' },\n { color: '#FBEEB8' },\n { color: '#F8CAC6' },\n { color: '#ECCAFA' },\n { color: '#C2E0F4' },\n { color: '#2DC26B' },\n { color: '#F1C40F' },\n { color: '#E03E2D' },\n { color: '#B96AD9' },\n { color: '#3598DB' },\n { color: '#169179' },\n { color: '#E67E23' },\n { color: '#BA372A' },\n { color: '#843FA1' },\n { color: '#236FA1' },\n { color: '#ECF0F1' },\n { color: '#CED4D9' },\n { color: '#95A5A6' },\n { color: '#7E8C8D' },\n { color: '#34495E' },\n { color: '#000000' },\n { color: '#FFFFFF' },\n]\n\nexport const getDefaultConfig = (locale: string = 'en'): EditorConfig => ({\n licenseKey: CK_EDITOR_LICENSE_KEY,\n language: getValidEditorLocale(locale),\n translations: [getEditorTranslation(locale)],\n plugins: [\n Alignment,\n AutoLink,\n Bold,\n Clipboard,\n Essentials,\n FontBackgroundColor,\n FontColor,\n FontSize,\n GeneralHtmlSupport,\n Indent,\n IndentBlock,\n Italic,\n Link,\n List,\n ListProperties,\n MultiLevelList,\n Paragraph,\n Strikethrough,\n Table,\n TableCaption,\n TableCellProperties,\n TableColumnResize,\n TableProperties,\n TableToolbar,\n Underline,\n CutPlugin,\n PastePlugin,\n PasteAsTextPlugin,\n IndentPaddingToMarginPlugin,\n BlockQuote,\n Heading,\n Autoformat,\n SpecialCharacters,\n SpecialCharactersEssentials,\n Subscript,\n Superscript,\n HorizontalLine,\n RemoveFormat,\n CodeBlock,\n TabSpacesPlugin, // TODO - delete\n ],\n toolbar: [\n 'bold',\n 'italic',\n 'underline',\n 'strikethrough',\n '|',\n 'alignment:left',\n 'alignment:center',\n 'alignment:right',\n '|',\n 'bulletedList',\n 'numberedList',\n 'multiLevelList',\n '|',\n 'outdent',\n 'indent',\n '|',\n 'cut',\n 'paste',\n 'pasteAsText',\n '|',\n 'fontSize',\n '|',\n 'fontColor',\n 'fontBackgroundColor',\n '|',\n 'insertTable',\n 'link',\n '|',\n 'blockquote',\n 'heading',\n '|',\n 'horizontalLine',\n 'removeFormat',\n 'specialCharacters',\n 'subscript',\n 'superscript',\n 'codeblock',\n '|',\n 'undo',\n 'redo',\n ],\n fontSize: {\n options: [\n { title: '8pt', model: '8px' },\n { title: '10pt', model: '10px' },\n { title: '12pt', model: '12px' },\n { title: '14pt', model: '14px' },\n { title: '18pt', model: '18px' },\n { title: '24pt', model: '24px' },\n { title: '36pt', model: '36px' },\n ],\n supportAllValues: true,\n },\n fontColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n fontBackgroundColor: {\n colors: TEXT_COLOR_PALETTE,\n },\n indentBlock: {\n offset: 40,\n unit: 'px',\n },\n htmlSupport: {\n allow: [\n {\n name: 'p',\n styles: {\n 'margin-left': true,\n },\n },\n ],\n },\n list: {\n properties: {\n styles: {\n useAttribute: false,\n },\n startIndex: true,\n reversed: true,\n },\n },\n image: {\n insert: {\n integrations: ['insertImageViaUrl'],\n },\n toolbar: ['imageTextAlternative'],\n },\n table: {\n contentToolbar: [\n 'tableColumn',\n 'tableRow',\n 'mergeTableCells',\n 'tableProperties',\n 'tableCellProperties',\n ],\n tableProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n tableCellProperties: {\n borderColors: TEXT_COLOR_PALETTE,\n backgroundColors: TEXT_COLOR_PALETTE,\n },\n },\n})\n\n// Add stable data attributes to toolbar buttons for the styling (or testing) purposes\nexport const addButtonDataAttributes = (editor: ClassicEditor) => {\n const applyAttributes = () => {\n const toolbarElement = editor.ui.view.toolbar.element\n if (!toolbarElement) {\n return\n }\n\n // Get buttons in the main toolbar\n const toolbarChildren = Array.from(\n toolbarElement.querySelectorAll('.ck-toolbar__items > *')\n )\n\n // Get buttons hidden in \"more\" dropdown\n const moreDropdownButtons = Array.from(\n toolbarElement.querySelectorAll('.ck-dropdown__panel .ck-list .ck-button')\n )\n\n const allToolbarElements = [...toolbarChildren, ...moreDropdownButtons]\n\n // Create mapping based on toolbar configuration order\n const toolbarItems = (editor.config.get('toolbar') || []) as string[]\n let elementIndex = 0\n\n toolbarItems.forEach((itemName) => {\n const element = allToolbarElements[elementIndex]\n if (\n itemName !== '|' &&\n element &&\n !element.classList.contains('ck-toolbar__separator')\n ) {\n // Use the toolbar item name as the stable identifier\n element.setAttribute('data-cke-command', itemName)\n }\n elementIndex++\n })\n }\n\n // Apply attributes initially\n applyAttributes()\n\n // Re-apply when dropdown menus are opened (buttons get created dynamically)\n const toolbarElement = editor.ui.view.toolbar.element\n if (toolbarElement) {\n const observer = new MutationObserver(() => {\n applyAttributes()\n })\n observer.observe(toolbarElement, {\n childList: true,\n subtree: true,\n })\n editor.on('destroy', () => {\n observer.disconnect()\n })\n }\n}\n"],"mappings":"AACA,SACEA,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,SAAS,EACTC,SAAS,EACTC,UAAU,EACVC,mBAAmB,EACnBC,SAAS,EACTC,QAAQ,EACRC,kBAAkB,EAClBC,OAAO,EACPC,cAAc,EACdC,MAAM,EACNC,WAAW,EACXC,MAAM,EACNC,IAAI,EACJC,IAAI,EACJC,cAAc,EACdC,SAAS,EACTC,YAAY,EACZC,iBAAiB,EACjBC,2BAA2B,EAC3BC,aAAa,EACbC,SAAS,EACTC,WAAW,EACXC,KAAK,EACLC,YAAY,EACZC,mBAAmB,EACnBC,iBAAiB,EACjBC,eAAe,EACfC,YAAY,EACZC,SAAS,QACJ,WAAW;AAClB,SAASC,cAAc,QAAQ,4BAA4B;AAE3D,SAASC,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAAS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,GAAG,IAAIC,gBAAgB,CAAC,YAAM;MAC1CtB,eAAe,CAAC,CAAC;IACnB,CAAC,CAAC;IACFqB,QAAQ,CAACE,OAAO,CAACtB,cAAc,EAAE;MAC/BuB,SAAS,EAAE,IAAI;MACfC,OAAO,EAAE;IACX,CAAC,CAAC;IACF1B,MAAM,CAAC2B,EAAE,CAAC,SAAS,EAAE,YAAM;MACzBL,QAAQ,CAACM,UAAU,CAAC,CAAC;IACvB,CAAC,CAAC;EACJ;AACF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
export var StyledEditor = /*#__PURE__*/styled.div.withConfig({
|
|
3
3
|
displayName: "StyledEditor",
|
|
4
|
-
componentId: "text-editor-
|
|
4
|
+
componentId: "text-editor-0_4_0__sc-1oujb2g-0"
|
|
5
5
|
})([".ck-editor__top{height:0 !important;}.ck-content{border:none !important;padding:0 !important;--ck-content-font-family:Inter,'Noto Sans JP','Noto Sans KR','Noto Sans SC','Noto Sans TC',sans-serif;--ck-content-font-size:14px;p{margin:0;}table,img{margin-left:auto;margin-right:auto;}img{display:block;}table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;th{text-align:left;}& > thead,& > tbody{& > tr > td,& > tr > th{border:1px solid #bfbfbf;min-width:2em;padding:0.4em;}& > tr > th{background:rgba(0,0,0,0.05);font-weight:700;}}}}"]);
|
|
6
6
|
//# sourceMappingURL=TextEditorOutput.styles.js.map
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "Accessible description for the editor's editable area.\nThis text provides additional context to screen reader users. It will be\nannounced after the label when the user focuses the editor.",
|
|
11
11
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Accessible description for the editor's editable area.\nThis text provides additional context to screen reader users. It will be\nannounced after the label when the user focuses the editor.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.1.0</p>\n</dd></dl></div>",
|
|
12
12
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L68"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "aria-label",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Accessible label for the editor's editable area. This text will be\nannounced by screen readers when the user focuses the editor. It should\nmatch or include the visible label associated with this editor field.\nIf not provided, screen readers will announce a generic \"Rich Text Editor\" message.",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Accessible label for the editor's editable area. This text will be\nannounced by screen readers when the user focuses the editor. It should\nmatch or include the visible label associated with this editor field.\nIf not provided, screen readers will announce a generic "Rich Text Editor" message.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.1.0</p>\n</dd></dl></div>",
|
|
22
22
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L59"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "disabled",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"description": "Indicates if the editor is disabled",
|
|
31
31
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is disabled</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
32
32
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
33
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
33
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L34"
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
"name": "error",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"description": "Indicates if the editor is in an error state",
|
|
41
41
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is in an error state</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
42
42
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
43
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
43
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L41"
|
|
44
44
|
},
|
|
45
45
|
{
|
|
46
46
|
"name": "id",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"description": "Unique identifier for the editor",
|
|
51
51
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Unique identifier for the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
52
52
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
53
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
53
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L10"
|
|
54
54
|
},
|
|
55
55
|
{
|
|
56
56
|
"name": "initialValue",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"deprecated": "`initialValue` has been deprecated and will be removed in a future version.\nPlease use the `value` prop instead",
|
|
63
63
|
"deprecatedSince": "0.0.1",
|
|
64
64
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
65
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
65
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L20"
|
|
66
66
|
},
|
|
67
67
|
{
|
|
68
68
|
"name": "locale",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"description": "Locale which will be used for localization. Can be passed directly or\nset by wrapping components in I18n provider.",
|
|
73
73
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Locale which will be used for localization. Can be passed directly or\nset by wrapping components in I18n provider.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
74
74
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
75
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
75
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L75"
|
|
76
76
|
},
|
|
77
77
|
{
|
|
78
78
|
"name": "readonly",
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
"description": "Indicates if the editor is in readonly mode.\nWhen true, renders the content using TextEditorOutput instead of the editable editor.",
|
|
83
83
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Indicates if the editor is in readonly mode.\nWhen true, renders the content using TextEditorOutput instead of the editable editor.</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.2.0</p>\n</dd></dl></div>",
|
|
84
84
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
85
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
85
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L49"
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
88
|
"name": "value",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"description": "The current value of the editor",
|
|
93
93
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>The current value of the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
94
94
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
95
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
95
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L27"
|
|
96
96
|
},
|
|
97
97
|
{
|
|
98
98
|
"name": "onAfterDestroy",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"description": "Callback fired after the editor instance is destroyed",
|
|
103
103
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired after the editor instance is destroyed</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
104
104
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
105
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
105
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L125"
|
|
106
106
|
},
|
|
107
107
|
{
|
|
108
108
|
"name": "onBlur",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"description": "Callback fired when the editor loses focus",
|
|
113
113
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor loses focus</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
114
114
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
115
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
115
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L98"
|
|
116
116
|
},
|
|
117
117
|
{
|
|
118
118
|
"name": "onChange",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"description": "Callback fired when the editor content changes",
|
|
123
123
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor content changes</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
124
124
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
125
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
125
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L84"
|
|
126
126
|
},
|
|
127
127
|
{
|
|
128
128
|
"name": "onDirty",
|
|
@@ -132,7 +132,7 @@
|
|
|
132
132
|
"description": "Callback fired when the editor becomes dirty (content differs from initial value)",
|
|
133
133
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor becomes dirty (content differs from initial value)</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
134
134
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
135
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
135
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L132"
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
"name": "onError",
|
|
@@ -142,7 +142,7 @@
|
|
|
142
142
|
"description": "Callback fired when an error occurs in the editor",
|
|
143
143
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when an error occurs in the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
144
144
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
145
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
145
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L105"
|
|
146
146
|
},
|
|
147
147
|
{
|
|
148
148
|
"name": "onFocus",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"description": "Callback fired when the editor gains focus",
|
|
153
153
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor gains focus</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
154
154
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
155
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
155
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L91"
|
|
156
156
|
},
|
|
157
157
|
{
|
|
158
158
|
"name": "onInit",
|
|
@@ -162,7 +162,7 @@
|
|
|
162
162
|
"description": "Callback fired when the editor is ready",
|
|
163
163
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when the editor is ready</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
164
164
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
165
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
165
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L118"
|
|
166
166
|
},
|
|
167
167
|
{
|
|
168
168
|
"name": "onKeyDown",
|
|
@@ -172,7 +172,7 @@
|
|
|
172
172
|
"description": "Callback fired when a key is pressed in the editor",
|
|
173
173
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Callback fired when a key is pressed in the editor</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>0.0.1</p>\n</dd></dl></div>",
|
|
174
174
|
"sourceFile": "TextEditor/TextEditor.types.ts",
|
|
175
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
175
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditor.types.ts#L141"
|
|
176
176
|
}
|
|
177
177
|
],
|
|
178
178
|
"description": ""
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "",
|
|
11
11
|
"descriptionHtml": "",
|
|
12
12
|
"sourceFile": "TextEditor/TextEditorProvider.types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L9"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "features",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "- `stickyToolbar` - Have the editor toolbar stick to the top when content is longer than the page length.\n- `tabAsNavigation` - Have `Tab` key exit the editor. Support `Alt`/`Opt` + `Tab` as triple space indent.",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<ul>\n<li><code>stickyToolbar</code> - Have the editor toolbar stick to the top when content is longer than the page length.</li>\n<li><code>tabAsNavigation</code> - Have <code>Tab</code> key exit the editor. Support <code>Alt</code>/<code>Opt</code> + <code>Tab</code> as triple space indent.</li>\n</ul>\n</div></div>",
|
|
22
22
|
"sourceFile": "TextEditor/TextEditorProvider.types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditor/TextEditorProvider.types.ts#L14"
|
|
24
24
|
}
|
|
25
25
|
],
|
|
26
26
|
"description": ""
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"description": "Additional classNames",
|
|
11
11
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional classNames</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p>\n</dd></dl></div>",
|
|
12
12
|
"sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
|
|
13
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
13
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L14"
|
|
14
14
|
},
|
|
15
15
|
{
|
|
16
16
|
"name": "style",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"description": "Additional CSS styles",
|
|
21
21
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Additional CSS styles</p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p>\n</dd></dl></div>",
|
|
22
22
|
"sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
|
|
23
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
23
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L21"
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "value",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"description": "Formatted text from `TextEditor`",
|
|
31
31
|
"descriptionHtml": "<div class=\"tsd-comment tsd-typography\"><div class=\"lead\">\n<p>Formatted text from <code>TextEditor</code></p>\n</div><dl class=\"tsd-comment-tags\"><dt>since</dt><dd><p>10.24.0</p>\n</dd></dl></div>",
|
|
32
32
|
"sourceFile": "TextEditorOutput/TextEditorOutput.types.ts",
|
|
33
|
-
"sourceUrl": "https://github.com/procore/core/blob/
|
|
33
|
+
"sourceUrl": "https://github.com/procore/core/blob/9c37d7a/packages/text-editor/src/TextEditorOutput/TextEditorOutput.types.ts#L7"
|
|
34
34
|
}
|
|
35
35
|
],
|
|
36
36
|
"description": ""
|
package/jestConfig.js
CHANGED
|
@@ -46,6 +46,7 @@ function textEditorJestConfig(config) {
|
|
|
46
46
|
...config,
|
|
47
47
|
moduleNameMapper: {
|
|
48
48
|
'^ckeditor5$': resolveMockFile('ckeditorMock.js'),
|
|
49
|
+
'^ckeditor5-premium-features$': resolveMockFile('ckeditorMock.js'),
|
|
49
50
|
'^@ckeditor/ckeditor5-react$': resolveMockFile('ckeditorMock.js'),
|
|
50
51
|
'^@ckeditor/ckeditor5-utils/src/translation-service$':
|
|
51
52
|
resolveMockFile('translationMock.js'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@procore/text-editor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Rich text editor component based on CKEditor 5",
|
|
5
5
|
"author": "Procore Technologies",
|
|
6
6
|
"homepage": "https://github.com/procore/core/tree/main/packages/text-editor",
|
|
@@ -69,9 +69,10 @@
|
|
|
69
69
|
"test:watch": "yarn run test --watch"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@procore/core-react": "^12.
|
|
72
|
+
"@procore/core-react": "^12.47.0",
|
|
73
73
|
"@procore/globalization-toolkit": ">= 3 < 4",
|
|
74
74
|
"ckeditor5": "^47.6.1",
|
|
75
|
+
"ckeditor5-premium-features": "^47.6.1",
|
|
75
76
|
"react": ">=16.8.0 < 19",
|
|
76
77
|
"react-dom": ">=16.8.0 < 19",
|
|
77
78
|
"styled-components": ">= 5.1.1 < 7"
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
"dependencies": {
|
|
80
81
|
"@ckeditor/ckeditor5-react": "^11.0.0",
|
|
81
82
|
"@procore/core-i18n-js": "^10.30.0",
|
|
82
|
-
"@procore/core-icons": "^12.
|
|
83
|
+
"@procore/core-icons": "^12.16.0",
|
|
83
84
|
"@react-aria/focus": "3.16.2",
|
|
84
85
|
"@react-aria/utils": "3.23.2",
|
|
85
86
|
"sanitize-html": "^2.17.0"
|
|
@@ -93,7 +94,7 @@
|
|
|
93
94
|
"@babel/preset-react": "7.18.6",
|
|
94
95
|
"@babel/preset-typescript": "7.18.6",
|
|
95
96
|
"@babel/register": "7.18.9",
|
|
96
|
-
"@procore/core-react": "^12.
|
|
97
|
+
"@procore/core-react": "^12.47.0",
|
|
97
98
|
"@procore/globalization-toolkit": "3.0.0",
|
|
98
99
|
"@storybook/addon-webpack5-compiler-swc": "^4.0.2",
|
|
99
100
|
"@storybook/jest": "^0.2.3",
|
|
@@ -117,6 +118,7 @@
|
|
|
117
118
|
"babel-plugin-styled-components": "2.1.4",
|
|
118
119
|
"chromatic": "^13.1.3",
|
|
119
120
|
"ckeditor5": "^47.6.1",
|
|
121
|
+
"ckeditor5-premium-features": "^47.6.1",
|
|
120
122
|
"css-loader": "^7.1.2",
|
|
121
123
|
"eslint": "8.31.0",
|
|
122
124
|
"eslint-config-prettier": "8.6.0",
|