import { SvelteComponent } from 'svelte'; /** * Provides a reactive wrapper for direct content editable elements. Allows editing Foundry document data or * directly from content prop. Automatic HTML enrichment occurs for the content when saved. * * ### Props * There are no required props, but the following are available to set: * - `content` - Provides an initial content string; you can bind to `content` from a parent component to get reactive * updates when `content` changes. Two-way binding. * * - `enrichedContent` - Provides the enriched content via {@link TextEditor.enrichHTML} when `content` changes. * You can bind to `enrichedContent` from a parent component to get reactive updates though it is not * recommended to change `enrichedContent` externally. One-way binding. * * - `options` - Defines the options object for this component. Please review all the options defined below * {@link TJSContentEditOptions}. * * ### Events * There are five events fired when the editor is canceled, saved, and started: * * - `editor:cancel` - Fired when editing is canceled by a user action or reactive response to document changes. * * - `editor:document:deleted` - Fired when the edited document is deleted. Access the document from * `event.detail.document`. * * - `editor:enrichedContent` - Fired when content is enriched. Access enriched content from * `event.detail.enrichedContent`. * * - `editor:save` - Fired when editing is saved. Access the content from `event.detail.content`. * * - `editor:start` - Fired when editing is started. * * ### CSS Variables * The following CSS variables control the associated styles with the default values: * * ``` * `.editor` HTMLDivElement: * --------------------------------- * --tjs-editor-background - none * --tjs-editor-border - none * --tjs-editor-border-radius - 0 * --tjs-editor-height - 100% * --tjs-editor-margin - 0 * --tjs-editor-overflow - auto * --tjs-editor-transition * --tjs-editor-width - 100% * * `.editor` HTMLDivElement; properties available when activated: * --------------------------------- * --tjs-editor-active-box-shadow, unset; Foundry default: 0 0 5px var(--color-shadow-primary) * --tjs-editor-active-outline - unset * --tjs-editor-active-overflow - unset; When inactive the editor overflow is auto; when active overflow is unset. * * `.editor` HTMLDivElement; properties available when inactive, but manually focused: * --------------------------------- * --tjs-editor-inactive-box-shadow-focus-visible - fallback: --tjs-default-box-shadow-focus-visible * --tjs-editor-inactive-outline-focus-visible - fallback: --tjs-default-outline-focus-visible; default: revert * --tjs-editor-inactive-transition-focus-visible - fallback: --tjs-default-transition-focus-visible * * `.editor` HTMLDivElement; properties available when inactive, but hovered: * --------------------------------- * --tjs-editor-inactive-cursor-hover - text * --tjs-editor-inactive-box-shadow-hover - unset * --tjs-editor-inactive-outline-hover - unset * --tjs-editor-inactive-user-select-hover - text * * `.editor` HTMLDivElement; when editing - the content overflow is set to auto: * --------------------------------- * --tjs-editor-content-color - #000 * --tjs-editor-content-font-family - "Signika" * --tjs-editor-content-font-size - 10.5pt * --tjs-editor-content-line-height - 1.2 * --tjs-editor-content-overflow - auto * --tjs-editor-content-padding - 0 * * .editor-edit; Defines the position of the edit button from top / right absolute positioning: * --------------------------------- * --tjs-editor-edit-button-right - 5px * --tjs-editor-edit-button-top - 0 * ``` */ declare class TjsContentEdit extends SvelteComponent< TjsContentEdit.Props, TjsContentEdit.Events, TjsContentEdit.Slots > {} /** Event / Prop / Slot type aliases for {@link TjsContentEdit | associated component}. */ declare namespace TjsContentEdit { /** Props type alias for {@link TjsContentEdit | associated component}. */ export type Props = { /** @type {string} */ content?: string; /** * Provides the options object that can be reactively updated. See documentation above. * * @type {import('./index').TJSContentEditOptions} */ options?: TJSContentEditOptions; /** @type {string} */ enrichedContent?: string; }; /** Events type alias for {@link TjsContentEdit | associated component}. */ export type Events = { 'editor:cancel': CustomEvent; 'editor:start': CustomEvent; 'editor:enrichedContent': CustomEvent; 'editor:document:deleted': CustomEvent; 'editor:save': CustomEvent; } & { [evt: string]: CustomEvent }; /** Slots type alias for {@link TjsContentEdit | associated component}. */ export type Slots = {}; } type TJSContentEditOptions = { /** * Provides an edit button to start editing. When button is false editing is * always enabled. */ button?: boolean; /** * An array of strings to add to the `.editor` element classes. This allows easier * setting of CSS variables across a range of various editor components. */ classes?: string[]; /** * When true the edit button is not shown and a click on the editor * content initializes the editor. */ clickToEdit?: boolean; /** * Set to a Foundry document to load and save content from it. * Requires `fieldName` to be set. */ document?: foundry.abstract.Document; /** * Prevents editing and hides button. When set to false any active editor * is cancelled. Default: user is GM or when a document is assigned the user has ownership. */ editable?: boolean; /** * When set to false content won't be enriched by `TextEditor.enrichHTML`. */ enrichContent?: boolean; /** * Additional `TextEditor.enrichHTML` options. */ enrichOptions?: fvtt.EnrichmentOptions; /** * A field name to load and save to / from associated document. IE `a.b.c`. */ fieldName?: string; /** * Initial selection range; 'all', 'end' or 'start'. */ initialSelection?: 'all' | 'end' | 'start'; /** * Defines the key event code to activate the editor when focused. */ keyCode?: string; /** * When defined as an integer greater than 0 this limits the max * characters that can be entered. */ maxCharacterLength?: number; /** * When true this prevents enter key from creating a new line / * paragraph. */ preventEnterKey?: boolean; /** * Prevents pasting content into the editor. */ preventPaste?: boolean; /** * When true any loss of focus / blur from the editor saves the editor * state. */ saveOnBlur?: boolean; /** * When true saves the editor state when the enter key is pressed. */ saveOnEnterKey?: boolean; /** * Additional CSS property names and values to set as inline styles. * This is useful for dynamically overriding any built in styles and in particular setting CSS variables supported. */ styles?: { [x: string]: string; }; }; /** * Provides a reactive wrapper for Foundry ProseMirror editor support. Allows editing Foundry document data or * directly from content prop. Automatic HTML enrichment occurs for the content when saved. * * ### Props * There are no required props, but the following are available to set: * * - `content` - Provides an initial content string; you can bind to `content` from a parent component to get reactive * updates when `content` changes. Two-way binding. * * - `enrichedContent` - Provides the enriched content via {@link TextEditor.enrichHTML} when `content` changes. * You can bind to `enrichedContent` from a parent component to get reactive updates though it is not * recommended to change `enrichedContent` externally. One-way binding. * * - `options` - Defines the options object for this component and passed on to the Foundry TinyMCE support. * Please review all the options defined below {@link TJSProseMirrorOptions}. * * Notable options passed onto Foundry ProseMirror support: * * - `options.collaborate` - [boolean: false] When a `document` and `fieldName` is provided set this to true to * enable collaborative editing. * * - `options.plugins` - [object] An additional set of ProseMirror plugins to load. * * ### Events * * There are five events fired when the editor is canceled, saved, and started: * * - `editor:cancel` - Fired when editing is canceled by a user action or reactive response to document changes. * * - `editor:document:deleted` - Fired when the edited document is deleted. Access the document from * `event.detail.document`. * * - `editor:enrichedContent` - Fired when content is enriched. Access enriched content from * `event.detail.enrichedContent`. * * - `editor:save` - Fired when editing is saved. Access the content from `event.detail.content`. * * - `editor:start` - Fired when editing is started. * * ### CSS Variables * * The following CSS variables control the associated styles with the default values: * * ``` * `.editor` HTMLDivElement: * --------------------------------- * --tjs-editor-background - none * --tjs-editor-border - none * --tjs-editor-border-radius - 0 * --tjs-editor-height - 100% * --tjs-editor-margin - 0 * --tjs-editor-overflow - auto * --tjs-editor-transition * --tjs-editor-width - 100% * * `.editor` HTMLDivElement; properties available when activated: * --------------------------------- * --tjs-editor-active-box-shadow, unset; Foundry default: 0 0 5px var(--color-shadow-primary) * --tjs-editor-active-outline - unset * --tjs-editor-active-overflow - unset; When inactive the editor overflow is auto; when active overflow is unset. * * `.editor` HTMLDivElement; properties available when inactive, but manually focused: * --------------------------------- * --tjs-editor-inactive-box-shadow-focus-visible - fallback: --tjs-default-box-shadow-focus-visible * --tjs-editor-inactive-outline-focus-visible - fallback: --tjs-default-outline-focus-visible; default: revert * --tjs-editor-inactive-transition-focus-visible - fallback: --tjs-default-transition-focus-visible * * `.editor` HTMLDivElement; properties available when inactive, but hovered: * --------------------------------- * --tjs-editor-inactive-cursor-hover - text * --tjs-editor-inactive-box-shadow-hover - unset * --tjs-editor-inactive-outline-hover - unset * --tjs-editor-inactive-user-select-hover - text * * `.editor-content` HTMLDivElement; when editing - the content overflow is set to auto: * --------------------------------- * --tjs-editor-content-overflow - auto * --tjs-editor-content-padding - 0 0 0 0.25em * * `.editor-container` HTMLDivElement; when editing - removes default margins. * --------------------------------- * --tjs-editor-container-margin - 0 * * .editor-edit; Defines the position of the edit button from top / right absolute positioning: * --------------------------------- * --tjs-editor-edit-button-right - 5px * --tjs-editor-edit-button-top - 0 * * .editor-menu; Defines the toolbar / menu. * --------------------------------- * --tjs-editor-toolbar-background - rgba(0, 0, 0, 0.1) * --tjs-editor-toolbar-border-radius - 6px * --tjs-editor-toolbar-box-shadow - 0 2px 2px -2px rgb(34 47 62 / 10%), 0 8px 8px -4px rgb(34 47 62 / 7%) * --tjs-editor-toolbar-padding - 2px 0 * --tjs-editor-toolbar-width - 100% * ``` */ declare class TjsProseMirror extends SvelteComponent< TjsProseMirror.Props, TjsProseMirror.Events, TjsProseMirror.Slots > {} /** Event / Prop / Slot type aliases for {@link TjsProseMirror | associated component}. */ declare namespace TjsProseMirror { /** Props type alias for {@link TjsProseMirror | associated component}. */ export type Props = { /** @type {string} */ content?: string; /** * Provides the options object that can be reactively updated. See documentation above. * * @type {import('./index').TJSProseMirrorOptions} */ options?: TJSProseMirrorOptions; /** @type {string} */ enrichedContent?: string; }; /** Events type alias for {@link TjsProseMirror | associated component}. */ export type Events = { 'editor:cancel': CustomEvent; 'editor:start': CustomEvent; 'editor:enrichedContent': CustomEvent; 'editor:document:deleted': CustomEvent; 'editor:save': CustomEvent; } & { [evt: string]: CustomEvent }; /** Slots type alias for {@link TjsProseMirror | associated component}. */ export type Slots = {}; } type TJSProseMirrorOptions = { /** * Provides an edit button to start editing. When button is false editing is * always enabled. */ button?: boolean; /** * An array of strings to add to the `.editor` element classes. This allows easier * setting of CSS variables across a range of various editor components. */ classes?: string[]; /** * When true the edit button is not shown and a click on the editor * content initializes the editor. */ clickToEdit?: boolean; /** * Enables ProseMirror collaboration; requires a document to be set. */ collaborate?: boolean; /** * Set to a Foundry document to load and save content from it. * Requires `fieldName` to be set. */ document?: foundry.abstract.Document; /** * Prevents editing and hides button. When set to false any active editor * is cancelled. Default: user is GM or when a document is assigned the user has ownership. */ editable?: boolean; /** * When set to false content won't be enriched by `TextEditor.enrichHTML`. */ enrichContent?: boolean; /** * Additional `TextEditor.enrichHTML` options. */ enrichOptions?: fvtt.EnrichmentOptions; /** * A field name to load and save to / from associated document. IE `a.b.c`. */ fieldName?: string; /** * Initial selection range; 'all', 'end' or 'start'. */ initialSelection?: 'all' | 'end' | 'start'; /** * Defines the key event code to activate the editor when focused. */ keyCode?: string; /** * Additional ProseMirror plugins to load. */ plugins?: { [key: string]: globalThis.ProseMirror.Plugin; }; /** * Initializes the ProseMirror editor with a compact menu. */ menuCompact?: boolean; /** * Additional CSS property names and values to set as inline * styles. This is useful for dynamically overriding any built in styles and in particular setting CSS variables * supported. */ styles?: { [key: string]: string | null; }; }; /** * Defines extra data passed to TJSEditorOptions ProseMirror plugin. */ type PMEditorExtra = { /** * The default value if `options.initialSelection is not defined. */ initialSelectionDefault: string; }; /** * Provides a reactive wrapper for Foundry TinyMCE editor support. Allows editing Foundry document data or * directly from content prop. Automatic HTML enrichment occurs for the content when saved. * * ### Props * There are no required props, but the following are available to set: * * - `content` - Provides an initial content string; you can bind to `content` from a parent component to get * reactive updates when `content` changes. Two-way binding. * * - `enrichedContent` - Provides the enriched content via {@link TextEditor.enrichHTML} when `content` changes. * You can bind to `enrichedContent` from a parent component to get reactive updates though it is not recommended * to change `enrichedContent` externally. One-way binding. * * - `options` - Defines the options object for this component and passed on to the Foundry TinyMCE support. * Please review all the options defined below {@link TJSTinyMCEOptions}. * * Notable options passed onto TinyMCE instance: * * - `options.mceConfig` - [object] TinyMCE configuration object. * * ### Events * * There are five events fired when the editor is canceled, saved, and started. * * - `editor:cancel` - Fired when editing is canceled by a user action or reactive response to document changes. * * - `editor:document:deleted` - Fired when the edited document is deleted. Access the document from * `event.detail.document`. * * - `editor:enrichedContent` - Fired when content is enriched. Access enriched content from * `event.detail.enrichedContent`. * * - `editor:save` - Fired when editing is saved. Access the content from `event.detail.content`. * * - `editor:start` - Fired when editing is started. * * ### CSS Variables * * The following CSS variables control the associated styles with the default values: * * ``` * `.editor` HTMLDivElement: * --------------------------------- * --tjs-editor-background - none * --tjs-editor-border - none * --tjs-editor-border-radius - 0 * --tjs-editor-height - 100% * --tjs-editor-margin - 0 * --tjs-editor-transition * --tjs-editor-width - 100% * * `.editor` HTMLDivElement; properties available when activated: * --------------------------------- * --tjs-editor-active-box-shadow, unset; Foundry default: 0 0 5px var(--color-shadow-primary) * --tjs-editor-active-outline - unset * --tjs-editor-active-overflow - unset; When inactive the editor overflow is auto; when active overflow is unset. * * `.editor` HTMLDivElement; properties available when inactive, but manually focused: * --------------------------------- * --tjs-editor-inactive-box-shadow-focus-visible - fallback: --tjs-default-box-shadow-focus-visible * --tjs-editor-inactive-outline-focus-visible - fallback: --tjs-default-outline-focus-visible; default: revert * --tjs-editor-inactive-transition-focus-visible - fallback: --tjs-default-transition-focus-visible * * `.editor` HTMLDivElement; properties available when inactive, but hovered: * --------------------------------- * --tjs-editor-inactive-cursor-hover - text * --tjs-editor-inactive-box-shadow-hover - unset * --tjs-editor-inactive-outline-hover - unset * --tjs-editor-inactive-user-select-hover - text * * `.editor-content` HTMLDivElement; when editing - the content overflow is set to auto: * --------------------------------- * --tjs-editor-content-color - #000 * --tjs-editor-content-font-family - "Signika" * --tjs-editor-content-font-size - 10.5pt * --tjs-editor-content-line-height - 1.2 * --tjs-editor-content-overflow - auto * --tjs-editor-content-padding - 0 * * `.editor-container` HTMLDivElement; when editing - removes default margins. * --------------------------------- * --tjs-editor-container-margin - 0 * * .editor-edit; Defines the position of the edit button from top / right absolute positioning: * --------------------------------- * --tjs-editor-edit-button-right - 5px * --tjs-editor-edit-button-top - 0 * * Various TinyMCE `tox` toolbar elements; Defines the toolbar / menu. * --------------------------------- * --tjs-editor-menu-item-active-background - #dee0e2 - This targets the auxiliary TMCE menus. * --tjs-editor-toolbar-background - rgba(0, 0, 0, 0.1) * --tjs-editor-toolbar-border-radius - 6px * --tjs-editor-toolbar-button-background - none * --tjs-editor-toolbar-button-background-hover - var(--color-hover-bg, #f0f0e0)) * --tjs-editor-toolbar-button-color - var(--color-text-dark-primary, #191813) * --tjs-editor-toolbar-button-disabled-color - rgba(34, 47, 62, .5) * --tjs-editor-toolbar-box-shadow - 0 2px 2px -2px rgb(34 47 62 / 10%), 0 8px 8px -4px rgb(34 47 62 / 7%) * --tjs-editor-toolbar-chevron-active-color - var(--color-text-dark-primary, #191813)) * --tjs-editor-toolbar-chevron-inactive-color - var(--color-text-light-7, #888)) * --tjs-editor-toolbar-padding - 0 2px * --tjs-editor-toolbar-separator-border - 1px solid var(--color-text-light-3, #ccc) * --tjs-editor-toolbar-select-background - var(--color-control-bg, #d9d8c8) * --tjs-editor-toolbar-width - 100% * ``` */ declare class TjsTinyMce extends SvelteComponent {} /** Event / Prop / Slot type aliases for {@link TjsTinyMce | associated component}. */ declare namespace TjsTinyMce { /** Props type alias for {@link TjsTinyMce | associated component}. */ export type Props = { /** @type {string} */ content?: string; /** * Provides the options object that can be reactively updated. See documentation above. * * @type {import('./index').TJSTinyMCEOptions} */ options?: TJSTinyMCEOptions; /** @type {string} */ enrichedContent?: string; }; /** Events type alias for {@link TjsTinyMce | associated component}. */ export type Events = { 'editor:cancel': CustomEvent; 'editor:start': CustomEvent; 'editor:enrichedContent': CustomEvent; 'editor:document:deleted': CustomEvent; 'editor:save': CustomEvent; } & { [evt: string]: CustomEvent }; /** Slots type alias for {@link TjsTinyMce | associated component}. */ export type Slots = {}; } /** * Provides custom options for TinyMCE. * * Please see {@link CONFIG.TinyMCE} for the default Foundry options. */ declare class TinyMCEHelper { /** * Provides a very basic / limited TinyMCE config that limits the ability to apply many styles from the toolbar * or with key commands. * * @param {object} [opts] - Optional parameters. * * @param {boolean} [opts.basicFormats=true] - When true, only basic style formats are allowed. * * @param {string[]} [opts.contentCSS] - An array of CSS paths to load. `getRoute` will be applied to them. * * @param {string} [opts.contentStyle=''] - The same content style string for TinyMCE options. * * @param {boolean} [opts.fontFormat=true] - Includes font select box. * * @param {boolean} [opts.fontSize=false] - Includes font size select box. * * @param {boolean} [opts.help=false] - When true include help plugin / toolbar button. * * @param {boolean} [opts.stripStyleFormat=true] - Strips any additional style formats added by other modules. * * @param {boolean} [opts.styleFormat=true] - Includes style format select box. * * @param {boolean} [opts.tjsStyles=false] - Includes extensive TJS styling options. * * @param {boolean} [opts.toolbar=true] - Includes the editor toolbar. * * @returns {object} TinyMCE options */ static configBasic({ basicFormats, contentCSS, contentStyle, fontFormat, fontSize, help, stripStyleFormat, styleFormat, tjsStyles, toolbar, }?: { basicFormats?: boolean; contentCSS?: string[]; contentStyle?: string; fontFormat?: boolean; fontSize?: boolean; help?: boolean; stripStyleFormat?: boolean; styleFormat?: boolean; tjsStyles?: boolean; toolbar?: boolean; }): object; /** * Provides the standard TinyMCE configuration options. This is similar to standard core configuration and the * ProseMirror editor. * * @param {object} [opts] - Optional parameters. * * @param {boolean} [opts.basicFormats=false] - When true, only basic style formats are allowed. * * @param {boolean} [opts.code=true] - When true include source code editing option. * * @param {string[]} [opts.contentCSS] - An array of CSS paths to load. `getRoute` will be applied to them. * * @param {string} [opts.contentStyle=''] - The same content style string for TinyMCE options. * * @param {boolean} [opts.fontFormat=true] - Includes font select box. * * @param {boolean} [opts.fontSize=false] - Includes font size select box. * * @param {boolean} [opts.help=false] - When true include help plugin / toolbar button. * * @param {boolean} [opts.stripStyleFormat=true] - Strips any additional style formats added by other modules. * * @param {boolean} [opts.styleFormat=true] - Includes style format select box. * * @param {boolean} [opts.tjsOembed=false] - Includes custom oEmbed plugin to include video from YouTube / Vimeo. * * @param {boolean} [opts.tjsStyles=false] - Includes extensive TJS styling options. * * @param {boolean} [opts.toolbar=true] - Includes the editor toolbar. * * @returns {object} TinyMCE options */ static configStandard({ basicFormats, code, contentCSS, contentStyle, fontFormat, fontSize, help, stripStyleFormat, styleFormat, tjsOembed, tjsStyles, toolbar, }?: { basicFormats?: boolean; code?: boolean; contentCSS?: string[]; contentStyle?: string; fontFormat?: boolean; fontSize?: boolean; help?: boolean; stripStyleFormat?: boolean; styleFormat?: boolean; tjsOembed?: boolean; tjsStyles?: boolean; toolbar?: boolean; }): object; /** * Provides the TJS super cool TinyMCE configuration options. These options are selected for increased media * embedding and styling flexibility. * * @param {object} [opts] - Optional parameters. * * @param {boolean} [opts.basicFormats=false] - When true, only basic style formats are allowed. * * @param {boolean} [opts.code=true] - When true include source code editing option. * * @param {string[]} [opts.contentCSS] - An array of CSS paths to load. `getRoute` will be applied to them. * * @param {string} [opts.contentStyle=''] - The same content style string for TinyMCE options. * * @param {boolean} [opts.fontFormat=true] - Includes font formats, size, line spacing and color options. * * @param {boolean} [opts.fontSize=true] - Includes font size options. * * @param {boolean} [opts.help=false] - When true include help plugin / toolbar button. * * @param {boolean} [opts.stripStyleFormat=true] - Strips any additional style formats added by other modules. * * @param {boolean} [opts.styleFormat=true] - Includes style format select box. * * @param {boolean} [opts.tjsOembed=true] - Includes custom oEmbed plugin to include video from YouTube / Vimeo. * * @param {boolean} [opts.tjsStyles=true] - Includes extensive TJS styling options. * * @param {boolean} [opts.toolbar=true] - Includes the editor toolbar. * * @returns {object} TinyMCE options */ static configTJS({ basicFormats, code, contentCSS, contentStyle, fontFormat, fontSize, help, stripStyleFormat, styleFormat, tjsOembed, tjsStyles, toolbar, }?: { basicFormats?: boolean; code?: boolean; contentCSS?: string[]; contentStyle?: string; fontFormat?: boolean; fontSize?: boolean; help?: boolean; stripStyleFormat?: boolean; styleFormat?: boolean; tjsOembed?: boolean; tjsStyles?: boolean; toolbar?: boolean; }): object; /** * Provides a combined `mceConfig` and other default options to create a single line editor that prevents pasting, * prevents enter key / new lines, saves on editor blur, and doesn't show the toolbar. This is useful as a shortcut * to enable TJSTinyMCE to act as a content editable text entry for a single line text field. * * Note: Since this function returns an object w/ mceConfig and other options you must use it like in TJSTinyMCE * options; where `font-size` in contentStyleBody and any other styles match the editor CSS variables: * * ...TinyMCEHelper.configSingleLine({ contentStyleBody: { 'font-size': '22pt' }}) * * @param {object} [opts] - Optional parameters. * * @param {string[]} [opts.contentCSS] - An array of CSS paths to load. `getRoute` will be applied to them. * * @param {string} [opts.contentStyle=''] - The same content style string for TinyMCE options. * * @returns {object} TinyMCE options */ static optionsSingleLine({ contentCSS, contentStyle }?: { contentCSS?: string[]; contentStyle?: string }): object; } type TJSTinyMCEOptions = { /** * Provides an edit button to start editing. When button is false editing is * always enabled. */ button?: boolean; /** * An array of strings to add to the `.editor` element classes. This allows easier * setting of CSS variables across a range of various editor components. */ classes?: string[]; /** * When true the edit button is not shown and a click on the editor * content initializes the editor. */ clickToEdit?: boolean; /** * Set to a Foundry document to load and save content from it. * Requires `fieldName` to be set. */ document?: foundry.abstract.Document; /** * Prevents editing and hides button. When set to false any active editor * is cancelled. Default: user is GM or when a document is assigned the user has ownership. */ editable?: boolean; /** * When set to false content won't be enriched by `TextEditor.enrichHTML`. */ enrichContent?: boolean; /** * Additional `TextEditor.enrichHTML` options. */ enrichOptions?: fvtt.EnrichmentOptions; /** * A field name to load and save to / from associated document. IE `a.b.c`. */ fieldName?: string; /** * An additional object defining module / custom fonts to load * specific to this editor. */ fonts?: any; /** * Initial selection range; 'all', 'end' or 'start'. */ initialSelection?: 'all' | 'end' | 'start'; /** * Defines the key event code to activate the editor when focused. */ keyCode?: string; /** * When defined as an integer greater than 0 this limits the max * characters that can be entered. */ maxCharacterLength?: number; /** * User defined TinyMCE config object. Please see TinyMCE documentation and also * take into consideration that there are differences between Foundry v9 (TinyMCE v5) and Foundry v10+ (TinyMCE v6). * Note: There are several pre-made configurations available in {@link TinyMCEHelper}. If not defined * {@link TinyMCEHelper.configStandard} is used. */ mceConfig?: object; /** * When true this prevents enter key from creating a new line / * paragraph. */ preventEnterKey?: boolean; /** * Prevents pasting content into the editor. */ preventPaste?: boolean; /** * When true any loss of focus / blur from the editor saves the editor * state. */ saveOnBlur?: boolean; /** * When true saves the editor state when the enter key is pressed. * This is useful when configuring the editor for single line entry. For an automatic setup for single line entry * refer to {@link TinyMCEHelper.optionsSingleLine}. */ saveOnEnterKey?: boolean; /** * Additional CSS property names and values to set as inline styles. * This is useful for dynamically overriding any built in styles and in particular setting CSS variables supported. */ styles?: { [x: string]: string; }; }; export { type PMEditorExtra, TjsContentEdit as TJSContentEdit, type TJSContentEditOptions, TjsProseMirror as TJSProseMirror, type TJSProseMirrorOptions, TjsTinyMce as TJSTinyMCE, type TJSTinyMCEOptions, TinyMCEHelper, };