@orangelogic/design-system 5.2.0 → 5.3.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/library/package.json
CHANGED
|
@@ -68,7 +68,7 @@ import { RichTextMenuBarSpec, RichTextStyleFormat, RichTextToolbarSpec } from '.
|
|
|
68
68
|
* Optional **`fire-change-on-same-content`** (default true): when false, `cx-rich-text-change` is not emitted if `editor.getHTML()` matches the last emitted HTML.
|
|
69
69
|
*
|
|
70
70
|
* @event {{ files: FileList }} cx-rich-text-image-drop - Emitted when an image is dropped onto the editor; `detail.files` is the dropped files.
|
|
71
|
-
* @event {{ content: string }} cx-rich-text-change - Emitted when the document changes; `detail.content` is `
|
|
71
|
+
* @event {{ content: string }} cx-rich-text-change - Emitted when the document changes; `detail.content` is the published HTML, as `getValue()` returns it.
|
|
72
72
|
* @event cx-rich-text-blur - Emitted when the editor loses focus.
|
|
73
73
|
* @event cx-rich-text-focus - Emitted when the editor gains focus.
|
|
74
74
|
* @event cx-rich-text-click - Emitted when the user clicks inside the toolbar, editor, or table bubble.
|
|
@@ -86,6 +86,12 @@ export default class CxRichText extends CortexElement {
|
|
|
86
86
|
'cx-rich-text-toolbar': typeof CxRichTextToolbar;
|
|
87
87
|
'cx-rich-text-video-viewer': typeof CxRichTextVideoViewer;
|
|
88
88
|
};
|
|
89
|
+
/**
|
|
90
|
+
* The whole document is one paragraph with nothing in it: TinyMCE's rule for an empty field.
|
|
91
|
+
* Narrower than `editor.isEmpty`, which also counts several empty lines, or a table or list
|
|
92
|
+
* without text, as empty. A pending suggestion on that paragraph (`attrs.track`) counts as content.
|
|
93
|
+
*/
|
|
94
|
+
private static isOnlyEmptyParagraph;
|
|
89
95
|
readonly localize: LocalizeController;
|
|
90
96
|
private caretAnimationId?;
|
|
91
97
|
readonly editorContainer: HTMLDivElement;
|
|
@@ -295,6 +301,7 @@ export default class CxRichText extends CortexElement {
|
|
|
295
301
|
* The content as it should be published: stored, rendered by a viewer, or sent as email.
|
|
296
302
|
* `editor.getHTML()` stays a faithful serialization of the document, wrappers the schema forces
|
|
297
303
|
* included; this resolves those away. Hosts that persist the value should read this.
|
|
304
|
+
* A document holding only an empty paragraph publishes as an empty string.
|
|
298
305
|
*/
|
|
299
306
|
getValue(): string;
|
|
300
307
|
private teardownEditor;
|