diff --git a/etc/lime-elements.api.md b/etc/lime-elements.api.md index a79645741d..c2749ea935 100644 --- a/etc/lime-elements.api.md +++ b/etc/lime-elements.api.md @@ -677,7 +677,7 @@ export namespace Components { "required"?: boolean; // @alpha "triggers": TriggerCharacter[]; - "ui"?: 'standard' | 'minimal'; + "ui"?: EditorUiType; "value": string; } // @beta @@ -761,6 +761,9 @@ export type EditorTextLink = { href: string; }; +// @beta (undocumented) +export type EditorUiType = 'standard' | 'minimal'; + // Warning: (ae-missing-release-tag) "EventEmitter" is part of the package's API, but it is missing a release tag (@alpha, @beta, @public, or @internal) // // @public (undocumented) @@ -1683,7 +1686,7 @@ namespace JSX_2 { "required"?: boolean; // @alpha "triggers"?: TriggerCharacter[]; - "ui"?: 'standard' | 'minimal'; + "ui"?: EditorUiType; "value"?: string; } // @beta diff --git a/src/components/text-editor/text-editor.tsx b/src/components/text-editor/text-editor.tsx index 02ec18c638..6531fe37fc 100644 --- a/src/components/text-editor/text-editor.tsx +++ b/src/components/text-editor/text-editor.tsx @@ -4,6 +4,7 @@ import { Languages } from '../date-picker/date.types'; import { createRandomString } from '../../util/random-string'; import { CustomElementDefinition } from '../../global/shared-types/custom-element.types'; import { TriggerCharacter, TriggerEventDetail } from './text-editor.types'; +import { EditorUiType } from './types'; /** * A rich text editor that offers a rich text editing experience with markdown support, @@ -151,7 +152,7 @@ export class TextEditor implements FormComponent { * until the editor is focused. */ @Prop({ reflect: true }) - public ui?: 'standard' | 'minimal' = 'standard'; + public ui?: EditorUiType = 'standard'; /** * Dispatched when a change is made to the editor diff --git a/src/components/text-editor/types.ts b/src/components/text-editor/types.ts index a6615c1c02..aefbf99179 100644 --- a/src/components/text-editor/types.ts +++ b/src/components/text-editor/types.ts @@ -7,3 +7,8 @@ import { CustomElementDefinition } from '../../global/shared-types/custom-elemen export type TextEditorPlugin = { node: CustomElementDefinition[]; }; + +/** + * @beta + */ +export type EditorUiType = 'standard' | 'minimal';