` element.
*
* @example
* ```jsx
*
* ```
*/
defaultEditMode?: 'iframe' | 'div';
/**
* Applies custom styles to the content element wrapper of the Editor.
*
* @example
* ```jsx
*
* ```
*/
contentStyle?: React.CSSProperties;
/**
* Specifies the text directionality of the Editor content.
* Accepts `ltr` (left-to-right) or `rtl` (right-to-left).
*
* @example
* ```jsx
*
* ```
*/
dir?: string;
/**
* Adds custom CSS classes to the Editor's root element.
*
* @example
* ```jsx
*
* ```
*/
className?: string;
/**
* Applies custom styles to the Editor's root element.
*
* @example
* ```jsx
*
* ```
*/
style?: React.CSSProperties;
/**
* Identifies the element(s) that describe the Editor component.
* Similar to the [HTML aria-describedby attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-describedby_attribute).
*
* @example
* ```jsx
*
* ```
*/
ariaDescribedBy?: string;
/**
* Identifies the element(s) that label the Editor component.
*
* @example
* ```jsx
*
* ```
*/
ariaLabelledBy?: string;
/**
* Provides an accessible label for the Editor component.
* Similar to the [aria-label](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label) attribute.
*
* @example
* ```jsx
*
* ```
*/
ariaLabel?: string;
/**
* Enables or disables resizing of the Editor. Defaults to `false`.
*
* @example
* ```jsx
*
* ```
*/
resizable?: boolean;
/**
* Configures the tools available in the Editor's toolbar.
* By default, no tools are rendered.
*
* @example
* ```jsx
*
* ```
*/
tools?: Array
;
/**
* Triggered when the Editor is about to mount. Useful for configuring the `EditorView` object.
* To initialize `EditorView`, use the properties of the `event` object.
*
* @param event - The event object containing initialization details.
* @returns An `EditorView` instance or `void`.
*
* @example
* ```jsx
* console.log(event.dom)} />
* ```
*/
onMount?: (event: EditorMountEvent) => EditorView | void;
/**
* Triggered when content is pasted into the Editor. Allows modification of the pasted content.
*
* @param event - The event object containing the pasted content details.
*
* @returns The modified HTML string or `void`.
*
* @example
* ```jsx
* event.pastedHtml.toUpperCase()} />
* ```
*/
onPasteHtml?: (event: EditorPasteEvent) => string | void;
/**
* Triggered when the Editor is about to apply a transaction.
* To prevent the transaction, return `false`.
*
* @param event - The event object containing transaction details.
* @returns `false` to cancel the transaction or `void`.
*
* @example
* ```jsx
* event.transaction.steps.length > 0} />
* ```
*/
onExecute?: (event: EditorExecuteEvent) => boolean | void;
/**
* Triggered when the Editor's content element receives focus.
*
* @param event - The event object containing focus details.
*
* @example
* ```jsx
* console.log("Editor focused")} />
* ```
*/
onFocus?: (event: EditorFocusEvent) => void;
/**
* Triggered when the Editor's content element loses focus.
*
* @param event - The event object containing blur details.
*
* @example
* ```jsx
* console.log("Editor blurred")} />
* ```
*/
onBlur?: (event: EditorBlurEvent) => void;
/**
* Triggered when the value of the Editor is about to change.
*
* @param event - The event object containing change details.
*
* @example
* ```jsx
* console.log(event.value)} />
* ```
*/
onChange?: (event: EditorChangeEvent) => void;
/**
* Triggered during the initialization of an Editor with the `iframe` property set to `true`.
* Allows access to the iframe document for customization.
*
* @param event - The event object containing iframe details.
*
* @example
* ```jsx
* { event.iframe.style.border = "none"; }} />
* ```
*/
onIFrameInit?: (event: EditorIFrameInitEvent) => void;
/**
* Specifies the value of the Editor. Can be a ProseMirror `Node` or an HTML string.
*
* @example
* ```jsx
*
* ```
*/
value?: Node_2 | string;
/**
* Disables the built-in keyboard navigation of the Editor's toolbar when set to `false`.
*
* @example
* ```jsx
*
* ```
*/
keyboardNavigation?: boolean;
/**
* Defines options for parsing HTML content:
* - `false`: Collapses whitespace as per HTML rules.
* - `true`: Preserves whitespace but normalizes newlines to spaces.
* - `full`: Fully preserves whitespace.
* Defaults to `full`.
*
* @example
* ```jsx
*
* ```
*/
preserveWhitespace?: boolean | 'full';
}
/**
* @hidden
*/
export declare const editorPropsKey: PluginKey;
/**
* @hidden
*/
declare interface EditorStateInterface {
view?: EditorView;
linkDialog?: boolean;
}
/**
* Represents a wrapping namespace for the tool components, props, and functions of the Editor.
*/
export declare namespace EditorTools {
/**
* The props for the Align tool component of the Editor.
*/
export interface AlignToolProps extends ToolProps {
}
/**
* The props for the AlignLeft tool component of the Editor.
*/
export interface AlignLeftProps extends AlignToolProps {
}
/**
* The props for the AlignRight tool component of the Editor.
*/
export interface AlignRightProps extends AlignToolProps {
}
/**
* The props for the AlignCenter tool component of the Editor.
*/
export interface AlignCenterProps extends AlignToolProps {
}
/**
* The props for the AlignJustify tool component of the Editor.
*/
export interface AlignJustifyProps extends AlignToolProps {
}
/**
* Creates the Align tool component of the Editor.
*
* @param {AlignSettings} settings
* @returns {React.ComponentClass} - Editor's Align tool component.
*/
export function createAlignTool(settings: EditorToolsSettings.AlignSettings): React_2.ComponentClass;
const AlignLeft_base: React_2.ComponentClass;
/**
* The AlignLeft tool component.
*/
export class AlignLeft extends AlignLeft_base {
}
const AlignRight_base: React_2.ComponentClass;
/**
* The AlignRight tool component.
*/
export class AlignRight extends AlignRight_base {
}
const AlignCenter_base: React_2.ComponentClass;
/**
* The AlignCenter tool component.
*/
export class AlignCenter extends AlignCenter_base {
}
const AlignJustify_base: React_2.ComponentClass;
/**
* The AlignJustify tool component.
*/
export class AlignJustify extends AlignJustify_base {
}
/**
* The props for the InsertTable tool component of the Editor.
*/
export interface InsertTableProps extends InsertTableToolNS.InsertTableProps {
}
/**
* Creates the InsertTable tool component of the Editor.
*
* @param {InsertTableSettings} - The settings of the InsertTable tool.
* @returns {React.ComponentClass} - The InsertTable tool component of the Editor.
*/
export function createInsertTableTool(settings: EditorToolsSettings.InsertTableSettings): React_2.ComponentClass;
const InsertTable_base: React_2.ComponentClass;
/**
* The InsertTable tool component.
*/
export class InsertTable extends InsertTable_base {
}
/**
* The props of the `InsertTablePopup` component.
*/
export interface InsertTablePopupProps extends InsertTablePopupNS.InsertTablePopupProps {
}
/**
* The `InsertTablePopup` component.
*/
export class InsertTablePopup extends InsertTablePopupNS.InsertTablePopup {
}
/**
* The props for the DropDownList tool component for inline styling of the Editor.
*/
export interface DropDownListToolProps extends FontStyleToolNS.DropDownListToolProps {
}
/**
* The props for the FontSize tool component of the Editor.
*/
export interface FontSizeProps extends FontStyleToolNS.DropDownListToolProps {
}
/**
* The props for the FontName tool component of the Editor.
*/
export interface FontNameProps extends FontStyleToolNS.DropDownListToolProps {
}
/**
* Creates the DropDownList tool component of the Editor which applies inline styles to inline HTML elements.
*
* @param {StyleDropDownListSettings} settings
* @returns {React.ComponentClass} - The DropDownList tool component of the Editor.
*/
export function createStyleDropDownList(settings: EditorToolsSettings.StyleDropDownListSettings): React_2.ComponentClass;
const FontSize_base: React_2.ComponentClass;
/**
* The FontSize tool component.
*/
export class FontSize extends FontSize_base {
}
const FontName_base: React_2.ComponentClass;
/**
* The FontName tool component.
*/
export class FontName extends FontName_base {
}
/**
* The props for the ForeColor tool component of the Editor.
*/
export interface ForeColorProps extends ApplyColorToolProps {
}
/**
* The props for the BackColor tool component of the Editor.
*/
export interface BackColorProps extends ApplyColorToolProps {
}
/**
* The ForeColor tool component.
*/
const ForeColor: React_2.FunctionComponent;
/**
* The BackColor tool component.
*/
const BackColor: React_2.FunctionComponent;
/**
* The props for the FormatBlock tool component of the Editor.
*/
export interface FormatBlockProps extends FormatBlockToolNS.FormatBlockProps {
}
/**
* Creates the FormatBlock tool component of the Editor.
*
* @param {FormatBlockDropDownListSettings} settings
* @returns {React.ComponentClass} - The FormatBlock tool component of the Editor.
*/
export function createFormatBlockDropDownList(settings: EditorToolsSettings.FormatBlockDropDownListSettings): React_2.ComponentClass;
const FormatBlock_base: React_2.ComponentClass;
/**
* The FormatBlock tool component.
*/
export class FormatBlock extends FormatBlock_base {
}
/**
* The props for the Undo tool component of the Editor.
*/
export interface UndoProps extends HistoryToolNS.UndoProps {
}
/**
* The props for the Redo tool component of the Editor.
*/
export interface RedoProps extends HistoryToolNS.RedoProps {
}
/**
* Creates the Undo tool component of the Editor.
*
* @param {ToolSettings} settings
* @returns {React.ComponentClass} - The Undo tool component of the Editor.
*/
export function createUndoTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
/**
* Creates the Redo tool component of the Editor.
*
* @param {ToolSettings} settings
* @returns {React.ComponentClass} - The Redo tool component of the Editor.
*/
export function createRedoTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
const Undo_base: React_2.ComponentClass;
/**
* The Undo tool component of the Editor.
*/
export class Undo extends Undo_base {
}
const Redo_base: React_2.ComponentClass;
/**
* The Redo tool component of the Editor.
*/
export class Redo extends Redo_base {
}
/**
* The props for the Indent tool component of the Editor.
*/
export interface IndentProps extends IndentToolNS.IndentProps {
}
/**
* Creates the Indent tool component of the Editor.
*
* @param {IndentationSettings} settings
* @returns {React.ComponentClass} - The Indent tool component of the Editor.
*/
export function createIndentTool(settings: EditorToolsSettings.IndentationSettings): React_2.ComponentClass;
const Indent_base: React_2.ComponentClass;
/**
* The Indent tool component.
*/
export class Indent extends Indent_base {
}
/**
* The props for the InlineFormat tool component of the Editor.
*/
export interface InlineFormatToolProps extends InlineFormatToolNS.InlineFormatToolProps {
}
/**
* The props for the Bold tool component of the Editor.
*/
export interface BoldProps extends InlineFormatToolNS.BoldProps {
}
/**
* The props for the Italic tool component of the Editor.
*/
export interface ItalicProps extends InlineFormatToolNS.ItalicProps {
}
/**
* The props for the Underline tool component of the Editor.
*/
export interface UnderlineProps extends InlineFormatToolNS.UnderlineProps {
}
/**
* The props for the Strikethrough tool component of the Editor.
*/
export interface StrikethroughProps extends InlineFormatToolNS.StrikethroughProps {
}
/**
* The props for the Subscript tool component of the Editor.
*/
export interface SubscriptProps extends InlineFormatToolNS.SubscriptProps {
}
/**
* The props for the Superscript tool component of the Editor.
*/
export interface SuperscriptProps extends InlineFormatToolNS.SuperscriptProps {
}
/**
* Creates the InlineFormat tool component of the Editor.
*
* @param {InlineFormatSettings} settings
* @returns {React.ComponentClass} - Editor's InlineFormat tool component.
*/
export function createInlineFormatTool(settings: EditorToolsSettings.InlineFormatSettings): React_2.ComponentClass;
const Bold_base: React_2.ComponentClass;
/**
* The Bold tool component.
*/
export class Bold extends Bold_base {
}
const Italic_base: React_2.ComponentClass;
/**
* The Italic tool component.
*/
export class Italic extends Italic_base {
}
const Underline_base: React_2.ComponentClass;
/**
* The Underline tool component.
*/
export class Underline extends Underline_base {
}
const Strikethrough_base: React_2.ComponentClass;
/**
* The Strikethrough tool component.
*/
export class Strikethrough extends Strikethrough_base {
}
const Subscript_base: React_2.ComponentClass;
/**
* The Subscript tool component.
*/
export class Subscript extends Subscript_base {
}
const Superscript_base: React_2.ComponentClass;
/**
* The Superscript tool component.
*/
export class Superscript extends Superscript_base {
}
/**
* The props for the InsertImage tool component of the Editor.
*/
export interface InsertImageProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
}
/**
* Creates the InsertImage tool component of the Editor.
*
* @param {ImageSettings} settings
* @returns {React.ComponentClass} - The InsertImage tool component of the Editor.
*/
export function createInsertImageTool(settings: EditorToolsSettings.ImageSettings): React_2.ComponentClass;
const InsertImage_base: React_2.ComponentClass;
/**
* The InsertImage tool component.
*/
export class InsertImage extends InsertImage_base {
}
/**
* The props for the Link tool component of the Editor.
*/
export interface LinkProps extends LinkToolNS.LinkProps {
}
/**
* Creates the Link tool component of the Editor.
*
* @param {LinkSettings} settings
* @returns {React.ComponentClass} - The Link tool component of the Editor.
*/
export function createLinkTool(settings: EditorToolsSettings.LinkSettings): React_2.ComponentClass;
const Link_base: React_2.ComponentClass;
/**
* The Link tool component.
*/
export class Link extends Link_base {
}
const InsertFile_base: React_2.ComponentClass;
/**
* The InsertFile tool component.
*/
export class InsertFile extends InsertFile_base {
}
/**
* The base interface of `OrderedListProps` and `UnorderedListProps`.
*/
export interface ListToolProps extends ListToolNS.ListToolProps {
}
/**
* The props for the OrderedList tool component of the Editor.
*/
export interface OrderedListProps extends ListToolNS.OrderedListProps {
}
/**
* The props for the UnorderedList tool component of the Editor.
*/
export interface UnorderedListProps extends ListToolNS.UnorderedListProps {
}
/**
* Creates the List tool component of the Editor.
*
* @param {ToolSettings} settings
* @returns {React.ComponentClass} - The List tool component of the Editor.
*/
export function createListTool(settings: EditorToolsSettings.ListSettings): React_2.ComponentClass;
const OrderedList_base: React_2.ComponentClass;
/**
* The basic OrderedList tool component. Will render a button which applies `` HTML element.
*/
export class OrderedList extends OrderedList_base {
}
const UnorderedList_base: React_2.ComponentClass;
/**
* The basic UnorderedList tool component. Will render a button which applies `` HTML element.
*/
export class UnorderedList extends UnorderedList_base {
}
/**
* The BulletedList tool component.
* Will render a SplitButton which applies `` HTML element with predefined styles - disc and square.
*/
const BulletedList: (props: any) => JSX.Element;
/**
* The NumberedList tool component.
* Will render a SplitButton which applies `` HTML element with predefined styles - upper-roman, lower-roman, upper-latin and lower-latin.
*/
const NumberedList: (props: any) => JSX.Element;
/**
* The TableCellProperties tool component.
*/
const TableCellProperties: React_2.FunctionComponent;
/**
* The props for the TableCellProperties tool component of the Editor.
*/
export interface TableCellPropertiesProps extends TableCellPropertiesProps {
}
/**
* The TableProperties tool component.
*/
const TableProperties: React_2.FunctionComponent;
/**
* The props for the TableProperties tool component of the Editor.
*/
export interface TablePropertiesProps extends TablePropertiesProps {
}
/**
* The props for the Outdent tool component of the Editor.
*/
export interface OutdentProps extends IndentToolNS.IndentProps {
}
/**
* Creates the Outdent tool component of the Editor.
*
* @param {IndentationSettings} settings
* @returns {React.ComponentClass} - The Outdent tool component of the Editor.
*/
export function createOutdentTool(settings: EditorToolsSettings.IndentationSettings): React_2.ComponentClass;
const Outdent_base: React_2.ComponentClass;
/**
* The Outdent tool component.
*/
export class Outdent extends Outdent_base {
}
/**
* The props for the Print tool component of the Editor.
*/
export interface PrintProps extends PrintProps {
}
/**
* The Print tool component.
* Designed to work only if Editor's defaultEditMode prop is set to 'iframe'.
*/
const Print: React_2.FunctionComponent;
/**
* The props for the Export to PDF tool component of the Editor.
*/
export interface PdfProps extends PdfProps {
}
/**
* The Export to PDF tool component.
*
* To modify the default PDF export options, see the following example:
*
* @example
* ```jsx-no-run
* import { Editor, EditorTools } from '@progress/kendo-react-editor';
* const { Bold, Italic, Pdf } = EditorTools;
*
* const PdfTool = (props: EditorTools.PdfProps) => (
*
* );
*
* class App extends React.Component {
* render() {
* return (
*
* );
* }
* }
* ```
*/
const Pdf: React_2.FunctionComponent;
/**
* The props for the SelectAll tool component of the Editor.
*/
export interface SelectAllProps extends SelectAllToolProps {
}
/**
* The SelectAll tool component.
*/
const SelectAll: React_2.FunctionComponent;
/**
* The props for the CleanFormatting tool component of the Editor.
*/
export interface CleanFormattingProps extends CleanFormattingToolProps {
}
/**
* The CleanFormatting tool component.
*/
const CleanFormatting: React_2.FunctionComponent;
/**
* The props for the AddRowBefore tool component of the Editor.
*/
export interface AddRowBeforeProps extends TableEditNS.AddRowBeforeProps {
}
/**
* The props for the AddRowAfter tool component of the Editor.
*/
export interface AddRowAfterProps extends TableEditNS.AddRowAfterProps {
}
/**
* The props for the AddColumnBefore tool component of the Editor.
*/
export interface AddColumnBeforeProps extends TableEditNS.AddColumnBeforeProps {
}
/**
* The props for the AddColumnAfter tool component of the Editor.
*/
export interface AddColumnAfterProps extends TableEditNS.AddColumnAfterProps {
}
/**
* The props for the DeleteRow tool component of the Editor.
*/
export interface DeleteRowProps extends TableEditNS.DeleteRowProps {
}
/**
* The props for the DeleteColumn tool component of the Editor.
*/
export interface DeleteColumnProps extends TableEditNS.DeleteColumnProps {
}
/**
* The props for the DeleteTable tool component of the Editor.
*/
export interface DeleteTableProps extends TableEditNS.DeleteTableProps {
}
/**
* The props for the MergeCells tool component of the Editor.
*/
export interface MergeCellsProps extends TableEditNS.MergeCellsProps {
}
/**
* The props for the SplitCell tool component of the Editor.
*/
export interface SplitCellProps extends TableEditNS.SplitCellProps {
}
/**
* Creates the AddRowBefore tool component of the Editor.
*
* @param {ToolSettings} - The settings of the AddRowBefore tool.
* @returns {React.ComponentClass} - The AddRowBefore tool component of the Editor.
*/
export function createAddRowBeforeTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
/**
* Creates the AddRowAfter tool component of the Editor.
*
* @param {ToolSettings} - The settings of the AddRowAfter tool.
* @returns {React.ComponentClass} - The AddRowAfter tool component of the Editor.
*/
export function createAddRowAfterTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
/**
* Creates the AddColumnBefore tool component of the Editor.
*
* @param {ToolSettings} - The settings of the AddColumnBefore tool.
* @returns {React.ComponentClass} - The AddColumnBefore tool component of the Editor.
*/
export function createAddColumnBeforeTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
/**
* Creates the AddColumnAfter tool component of the Editor.
*
* @param {ToolSettings} - The settings of the AddColumnAfter tool.
* @returns {React.ComponentClass} - The AddColumnAfter tool component of the Editor.
*/
export function createAddColumnAfterTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
/**
* Creates the DeleteRow tool component of the Editor.
*
* @param {ToolSettings} - The settings of the DeleteRow tool.
* @returns {React.ComponentClass} - The DeleteRow tool component of the Editor.
*/
export function createDeleteRowTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
/**
* Creates the DeleteColumn tool component of the Editor.
*
* @param {ToolSettings} - The settings of the DeleteColumn tool.
* @returns {React.ComponentClass} - The DeleteColumn tool component of the Editor.
*/
export function createDeleteColumnTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
/**
* Creates the DeleteTable tool component of the Editor.
*
* @param {ToolSettings} - The settings of the DeleteTable tool.
* @returns {React.ComponentClass} - The DeleteTable tool component of the Editor.
*/
export function createDeleteTableTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
/**
* Creates the MergeCells tool component of the Editor.
*
* @param {ToolSettings} - The settings of the MergeCells tool
* @returns {React.ComponentClass} - The MergeCells tool component of the Editor.
*/
export function createMergeCellsTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
/**
* Creates the SplitCell tool component of the Editor.
*
* @param {ToolSettings} - The settings of the SplitCell tool.
* @returns {React.ComponentClass} - The SplitCell tool component of the Editor.
*/
export function createSplitCellTool(settings: EditorToolsSettings.ToolSettings): React_2.ComponentClass;
const AddRowBefore_base: React_2.ComponentClass;
/**
* The AddRowBefore tool component.
*/
export class AddRowBefore extends AddRowBefore_base {
}
const AddRowAfter_base: React_2.ComponentClass;
/**
* The AddRowAfter tool component.
*/
export class AddRowAfter extends AddRowAfter_base {
}
const AddColumnBefore_base: React_2.ComponentClass;
/**
* The AddColumnBefore tool component.
*/
export class AddColumnBefore extends AddColumnBefore_base {
}
const AddColumnAfter_base: React_2.ComponentClass;
/**
* The AddColumnAfter tool component.
*/
export class AddColumnAfter extends AddColumnAfter_base {
}
const DeleteRow_base: React_2.ComponentClass;
/**
* The DeleteRow tool component.
*/
export class DeleteRow extends DeleteRow_base {
}
const DeleteColumn_base: React_2.ComponentClass;
/**
* The DeleteColumn tool component.
*/
export class DeleteColumn extends DeleteColumn_base {
}
const DeleteTable_base: React_2.ComponentClass;
/**
* The DeleteTable tool component.
*/
export class DeleteTable extends DeleteTable_base {
}
const MergeCells_base: React_2.ComponentClass;
/**
* The MergeCells tool component.
*/
export class MergeCells extends MergeCells_base {
}
const SplitCell_base: React_2.ComponentClass;
/**
* The SplitCell tool component.
*/
export class SplitCell extends SplitCell_base {
}
/**
* The props for the Unlink tool component of the Editor.
*/
export interface UnlinkProps extends UnlinkToolNS.UnlinkProps {
}
/**
* Creates the Unlink tool component of the Editor.
*
* @param {UnlinkSettings} settings
* @returns {React.ComponentClass} - The Unlink tool component of the Editor.
*/
export function createUnlinkTool(settings: EditorToolsSettings.UnlinkSettings): React_2.ComponentClass;
const Unlink_base: React_2.ComponentClass;
/**
* The Unlink tool component.
*/
export class Unlink extends Unlink_base {
}
/**
* The props for the ViewHtml tool component of the Editor.
*/
export interface ViewHtmlProps extends ViewHtmlToolNS.ViewHtmlProps {
}
/**
* Creates the ViewHtml tool component of the Editor.
*
* @param {ViewHtmlSettings} settings
* @returns {React.ComponentClass} - The ViewHtml tool component of the Editor.
*/
export function createViewHtmlTool(settings: EditorToolsSettings.ViewHtmlSettings): React_2.ComponentClass;
const ViewHtml_base: React_2.ComponentClass;
/**
* The ViewHtml tool component.
*/
export class ViewHtml extends ViewHtml_base {
}
/**
* The FindAndReplace tool component.
*/
export class FindAndReplace extends FindAndReplace {
}
/**
* The props for the FindAndReplace tool component of the Editor.
*/
export interface FindAndReplaceProps extends FindAndReplaceProps {
}
{};
}
/**
* Represents a wrapping namespace for the tool settings of the Editor.
*/
export declare namespace EditorToolsSettings {
/**
* The type of the Editor command.
*/
export type Command = 'Bold' | 'Italic' | 'Underline' | 'Strikethrough' | 'Subscript' | 'Superscript' | 'Undo' | 'Redo' | 'Link' | 'Unlink' | 'InsertImage' | 'InsertFile' | 'AlignLeft' | 'AlignCenter' | 'AlignRight' | 'AlignJustify' | 'AlignRemove' | 'OrderedList' | 'UnorderedList' | 'Indent' | 'Outdent' | 'SetContent' | 'FontSize' | 'FontName' | 'ForeColor' | 'BackColor' | 'FormatBlock' | 'InsertTable' | 'AddRowBefore' | 'AddRowAfter' | 'AddColumnBefore' | 'AddColumnAfter' | 'DeleteRow' | 'DeleteColumn' | 'DeleteTable' | 'MergeCells' | 'SplitCell' | 'CleanFormatting' | 'Custom';
/**
* The settings of the toolbar tools.
*/
export interface ToolSettings {
/**
* The props which will be added to the Button component of the tool.
*/
props: ButtonProps;
/**
* The keys of the messages that are used by the tool.
*/
messages: {
[key: string]: string;
};
/**
* The name of the command that is used by the tool.
*/
commandName?: Command;
}
/**
* The `AlignAction` object.
*/
export interface AlignAction {
/**
* The name of the target node.
*/
node: string;
/**
* The styles that will be applied to the target node.
*/
style: Array<{
name: string;
value: string;
}>;
}
/**
* The settings of the Align tool.
*/
export interface AlignSettings extends ToolSettings {
/**
* A collection of `AlignAction` objects which defines the behavior of the Align tool.
*/
actions: Array;
}
/**
* The settings of the Style tool which is presented by a DropDownList component.
*/
export interface StyleDropDownListSettings {
/**
* The name of the style which will be added or removed by the Style tool.
*/
style: string;
/**
* The default item of the Style tool.
*/
defaultItem?: {
text: string;
value: string;
localizationKey?: string;
};
/**
* The data items of the Style tool.
*/
items: Array<{
text: string;
value: string;
style?: React.CSSProperties;
}>;
/**
* The name of the command that is used by the Style tool.
*/
commandName?: Command;
}
/**
* The settings of the FormatBlock tool which is presented by a DropDownList.
*/
export interface FormatBlockDropDownListSettings {
/**
* The default item of the FormatBlock tool.
*/
defaultItem: {
text: string;
value: string;
localizationKey?: string;
};
/**
* The data items of the FormatBlock tool.
*/
items: Array<{
text: string;
value: string;
style?: React.CSSProperties;
}>;
/**
* The name of the command that is used by the FormatBlock tool.
*/
commandName?: Command;
}
/**
* The inline-formatting options.
*/
export interface InlineFormatOptions {
/**
* The mark which will be applied or stripped.
*/
mark: string;
/**
* The additional marks which will be stripped.
*/
altMarks?: Array;
/**
* An object which holds the style that will be stripped by the tool.
*/
altStyle?: {
/**
* The name of the style.
*/
name: string;
/**
* The regular expression which will be matched with the value of the style.
*/
value: RegExp;
};
}
/**
* The settings of the tool which applies inline formatting.
*/
export interface InlineFormatSettings extends ToolSettings, InlineFormatOptions {
}
/**
* The settings of the ForeColor and BackColor tools.
*/
export interface ApplyColorSettings {
/**
* The applied style by the tool (`color` or `background-color`).
*/
style: string;
/**
* The props of the underlying [KendoReact ColorPicker component]({% slug overview_colorpicker %}).
*/
colorPickerProps: ColorPickerProps;
/**
* The name of the applied command.
*/
commandName: string;
}
/**
* The setting of the IndentAction tool.
*/
export interface IndentAction {
node: string;
style: string;
rtlStyle: string;
step: number;
unit: string;
}
/**
* The settings of the tool which applies indentation.
*/
export interface IndentationSettings extends ToolSettings {
actions: Array;
/**
* The list node types of the Indent and Outdent tools.
*/
listsTypes: {
orderedList: string;
bulletList: string;
listItem: string;
};
}
/**
* The settings of the Link tool or dialog.
*/
export interface LinkSettings extends ToolSettings {
mark: string;
linkTarget?: boolean;
}
/**
* The settings of the Unlink tool.
*/
export interface UnlinkSettings extends ToolSettings {
mark: string;
}
/**
* The settings of the InsertFile tool or dialog.
*/
export interface InsertFileSettings extends LinkSettings {
}
/**
* The settings of the tool which toggles lists.
*/
export interface ListSettings extends ToolSettings {
/**
* The list type of the tool.
*/
listType: string;
/**
* The types of the list nodes that are used by the tool.
*/
types: {
orderedList: string;
bulletList: string;
listItem: string;
};
}
/**
* The settings of the InsertTable tool.
*/
export interface InsertTableSettings extends ToolSettings {
}
/**
* The settings of the AddRowBefore tool.
*/
export interface AddRowBeforeSettings extends ToolSettings {
}
/**
* The settings of the AddRowAfter tool.
*/
export interface AddRowAfterSettings extends ToolSettings {
}
/**
* The settings of the AddColumnBefore tool.
*/
export interface AddColumnBeforeSettings extends ToolSettings {
}
/**
* The settings of the AddColumnAfter tool.
*/
export interface AddColumnAfterSettings extends ToolSettings {
}
/**
* The settings of the DeleteRow tool.
*/
export interface DeleteRowSettings extends ToolSettings {
}
/**
* The settings of the DeleteColumn tool.
*/
export interface DeleteColumnSettings extends ToolSettings {
}
/**
* The settings of the DeleteTable tool.
*/
export interface DeleteTableSettings extends ToolSettings {
}
/**
* The settings of the MergeCells tool.
*/
export interface MergeCellsSettings extends ToolSettings {
}
/**
* The settings of the SplitCell tool.
*/
export interface SplitCellSettings extends ToolSettings {
}
/**
* The settings of the Print tool.
*/
export interface PrintSettings extends ToolSettings {
}
/**
* The settings of the SelectAll tool.
*/
export interface SelectAllSettings extends ToolSettings {
}
/**
* The settings of the Pdf tool.
*/
export interface PdfSettings extends ToolSettings {
}
/**
* The settings of the CleanFormatting tool.
*/
export interface CleanFormattingSettings extends ToolSettings {
}
/**
* The settings of the InsertImage tool or dialog.
*/
export interface ImageSettings extends ToolSettings {
node: string;
}
/**
* The settings of the ViewHtml tool or dialog.
*/
export interface ViewHtmlSettings extends ToolSettings {
}
/**
* The settings of the Find and Replace tool or dialog.
*/
export interface FindReplaceSettings extends ToolSettings {
}
/**
* The object of the Bold tool settings.
*/
const bold: InlineFormatSettings;
/**
* The object of the Italic tool settings.
*/
const italic: InlineFormatSettings;
/**
* The object of the Underline tool settings.
*/
const underline: InlineFormatSettings;
/**
* The object of the Strikethrough tool settings.
*/
const strikethrough: InlineFormatSettings;
/**
* The object of the Subscript tool settings.
*/
const subscript: InlineFormatSettings;
/**
* The object of the Superscript tool settings.
*/
const superscript: InlineFormatSettings;
/**
* The object of the Link tool settings.
*/
const link: LinkSettings;
/**
* The object of the Link tool settings.
*/
const insertFile: InsertFileSettings;
/**
* The object of the InsertTable tool settings.
*/
const insertTable: InsertTableSettings;
/**
* The object of the AddRowBefore tool settings.
*/
const addRowBefore: AddRowBeforeSettings;
/**
* The object of the AddRowAfter tool settings.
*/
const addRowAfter: AddRowAfterSettings;
/**
* The object of the AddColumnBefore tool settings.
*/
const addColumnBefore: AddColumnBeforeSettings;
/**
* The object of the AddColumnAfter tool settings.
*/
const addColumnAfter: AddColumnAfterSettings;
/**
* The object of the DeleteRow tool settings.
*/
const deleteRow: DeleteRowSettings;
/**
* The object of the DeleteColumn tool settings.
*/
const deleteColumn: DeleteColumnSettings;
/**
* The object of the DeleteTable tool settings.
*/
const deleteTable: DeleteTableSettings;
/**
* The object of the MergeCells tool settings.
*/
const mergeCells: MergeCellsSettings;
/**
* The object of the SplitCell tool settings.
*/
const splitCell: SplitCellSettings;
/**
* The object of the Print tool settings.
*/
const print: PrintSettings;
/**
* The object of the Print tool settings.
*/
const selectAll: SelectAllSettings;
/**
* The object of the Print tool settings.
*/
const pdf: PdfSettings;
/**
* The PDF export options.
*
* const savePdfOptions = {
* fileName: 'editor.pdf',
* paperSize: 'A4',
* margin: '1cm'
* };
*/
const savePdfOptions: PDFExportProps;
/**
* The object of the CleanFormatting tool settings.
*/
const cleanFormatting: CleanFormattingSettings;
/**
* The object of the InsertImage tool settings.
*/
const image: ImageSettings;
/**
* The object of the ViewHtml tool settings.
*/
const viewHtml: ViewHtmlSettings;
/**
* The object of the Find and Replace tool settings.
*/
const findAndReplace: FindReplaceSettings;
/**
* The object of the Unlink tool settings.
*/
const unlink: UnlinkSettings;
/**
* The object of the Undo tool settings.
*/
const undo: ToolSettings;
/**
* The object of the Redo tool settings.
*/
const redo: ToolSettings;
/**
* The object of the FontSize tool settings.
*/
const fontSize: StyleDropDownListSettings;
/**
* The object of the FontName tool settings.
*/
const fontName: StyleDropDownListSettings;
/**
* The object of the FormatBlock tool settings.
*/
const formatBlock: FormatBlockDropDownListSettings;
/**
* The object of the ForeColor tool settings.
*/
const foreColor: ApplyColorSettings;
/**
* The object of the BackColor tool settings.
*/
const backColor: ApplyColorSettings;
/**
* The object of the AlignLeft tool settings.
*/
const alignLeft: AlignSettings;
/**
* The object of the AlignRight tool settings.
*/
const alignRight: AlignSettings;
/**
* The object of the AlignCenter tool settings.
*/
const alignCenter: AlignSettings;
/**
* The object of the AlignJustify tool settings.
*/
const alignJustify: AlignSettings;
/**
* The object of the AlignRemove tool settings.
*/
const alignRemove: AlignSettings;
/**
* The object of the Indent tool settings.
*/
const indent: IndentationSettings;
/**
* The object of the Outdent tool settings.
*/
const outdent: IndentationSettings;
/**
* The object of the OrderedList tool settings.
*/
const orderedList: ListSettings;
/**
* The object of the UnorderedList tool settings.
*/
const bulletList: ListSettings;
}
/**
* Represents a wrapping namespace for the utility functions, `nodes`, and `marks` objects of the Editor.
*/
export declare namespace EditorUtils {
/**
* Aligns the block elements in the selection.
*
* @returns {boolean}—If alignment is applied to any of the elements, returns `true`.
*/
export function alignBlocks(view: EditorView, actions: EditorToolsSettings.AlignAction[], command?: EditorToolsSettings.Command): boolean;
/**
* Wraps the selection in a `span` element with inline styles.
*
* @returns {boolean}—If a style is applied to any of the elements, returns `true`.
*/
export function applyInlineStyle(view: EditorView, options: {
style: string;
value: string;
}, command?: EditorToolsSettings.Command): boolean;
/**
* Applies the link mark.
*
* @returns {boolean}—If the link is applied, returns `true`.
*/
export function applyLink(view: any, options: {
mark: string;
attrs: any;
}, command?: EditorToolsSettings.Command): boolean;
/**
* Checks if any of the `list` elements in the selection can be indented.
*
* @returns {boolean}
*/
export function canIndentList(state: EditorState, nodeType: NodeType): boolean;
/**
* Checks if a node can be inserted in the current selection.
*
* @param {EditorState} state—The `state` object of the Editor.
* @param {NodeType} nodeType—The type of the node that will be inserted.
* @returns {boolean}—The node of this type can be inserted in the current selection.
*/
export function canInsert(state: EditorState, nodeType: NodeType): boolean;
/**
* Checks if any of the `list` elements in the selection can be outdented.
*
* @returns {boolean}
*/
export function canOutdentList(state: EditorState, listsTypes: {
listItem: string;
orderedList: string;
bulletList: string;
}): boolean;
/**
* Converts the MS Word lists into HTML lists.
*
* @param {string} html—The input HTML.
* @returns {string}—The result HTML.
*/
export function convertMsLists(html: string): string;
/**
* Creates an Editor document from HTML content.
*
* @param {Schema} schema—The `schema` object of the Editor.
* @param {string} html—The HTML content.
* @param {ParseOptions} parseOptions—The HTML parsing options. Defaults to `{ preserveWhitespace: 'full' }`.
* @returns {Node}—The `document` object of the Editor.
*/
export function createDocument(schema: Schema, html: string, parseOptions?: ParseOptions): Node_2;
/**
* Creates a table.
*
* @param {object} tableTypes—An object which contains `table`, `table_row`, and `table_cell` node types.
* @param {number} rows—The number of rows.
* @param {number} columns—The number of columns.
* @returns {Node}—The generated table.
*
* @example
* ```jsx-no-run
* import { EditorUtils } from '@progress/kendo-react-editor';
*
* const nodes = editorRef.view.state.schema.nodes;
* const rows = 3;
* const columns = 4;
*
* const table = EditorUtils.createTable(nodes, rows, columns);
* ```
*/
export function createTable(tableTypes: {
table: NodeType;
table_row: NodeType;
table_cell: NodeType;
}, rows: number, columns: number): Node_2;
/**
* Formats the paragraph and heading nodes in the selection.
*
* @returns {boolean}—If an element is formatted, returns `true`.
*/
export function formatBlockElements(view: EditorView, value: 'p' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6', commandName?: EditorToolsSettings.Command): boolean;
/**
* Returns the paragraph and heading nodes in the selection.
*
* @returns {string[]}
*/
export function getBlockFormats(state: EditorState): string[];
/**
* Gets the HTML from the `EditorState` object.
*
* @param {EditorState} state—The `state` object of the Editor or an object containing editor's `doc` and `schema`
*—{ doc: value, schema: value.types.schema } where the `value` variable is the editor's value prop.
* @returns {string}—The HTML content.
*/
export function getHtml(state: EditorState | {
doc: Node_2;
schema: Schema;
}): string;
/**
* @returns {string[]}—An array of matched styles that are found in the selection.
*/
export function getInlineStyles(state: EditorState, style: {
name: string;
value: RegExp;
}): string[];
/**
* Returns a mark of the specified type from the nodes in selection.
*
* @returns {Mark}
*/
export function getMark(state: EditorState, markType: MarkType): Mark | undefined;
/**
* Checks if according to the specified `InlineFormatOptions` a node in the selection is present.
*
* @returns {boolean}
*/
export function hasMark(state: EditorState, options: EditorToolsSettings.InlineFormatOptions): boolean;
/**
* Checks if the selection contains a specific type of node.
*
* @returns {boolean}
*/
export function hasNode(state: EditorState, nodeType: NodeType): boolean;
/**
* Indents the block elements in the selection.
*
* @returns {boolean}—If indentation is applied to any of the elements, returns `true`.
*/
export function indentBlocks(view: EditorView, actions: EditorToolsSettings.IndentAction[], command?: EditorToolsSettings.Command, dir?: string): boolean;
/**
* Adds new lines after block elements and hard breaks.
*
* @param {string} content—The HTML content.
* @returns {string}—The indented HTML.
*/
export function indentHtml(content: string): string;
/**
* Inserts a node in the selection.
*
* @param {EditorView} view—The `view` object of the Editor.
* @param {Node} node—A `node` object of the Editor.
* @param {boolean} scrollIntoView—An optional parameter.
* Defines if the content element will be scrolled to the current selection.
*/
export function insertNode(view: EditorView | {
state: EditorState;
dispatch: (tr: Transaction) => void;
}, node: Node_2, scrollIntoView?: boolean | undefined): void;
/**
* Checks if any of the block elements in the selection is aligned.
*
* @returns {boolean}
*/
export function isAligned(state: EditorState, actions: EditorToolsSettings.AlignAction[]): boolean;
/**
* Checks if any of the block elements in the selection is indented.
*
* @returns {boolean}
*/
export function isIndented(state: any, actions: EditorToolsSettings.IndentAction[], dir?: string): boolean;
/**
* Removes the comments from the HTML.
*
* @param {string} html—The input HTML.
* @returns {string}—The result HTML.
*
* @example
* ```jsx-no-run
* import { EditorUtils } from '@progress/kendo-react-editor';
* const html = EditorUtils.removeComments('some content
');
* ```
*/
export function removeComments(html: string): string;
/**
* Removes the specified tag from the HTML and keeps its child nodes.
*
* @param {string} html—The input HTML.
* @param {string} tag—A tag or multiple tags separated by a vertical slash which will be removed.
* For example, `span` or `b|i|u|span`.
* @returns {string}—The resulting HTML.
*
* @example
* ```jsx-no-run
* import { EditorUtils } from '@progress/kendo-react-editor';
* const html = EditorUtils.removeTag('some content
', 'span|p');
* ```
*/
export function removeTag(html: string, tag: string): string;
/**
* A function for sanitizing the content on paste ([see example]({% slug paste_editor %})).
*
* @param {string} html—The input HTML.
* @param {PasteCleanupSettings} settings—The settings used for sanitizing the content.
* @returns {string}—The resulting HTML.
*/
export function pasteCleanup(html: string, settings: PasteCleanupSettings): string;
/**
* A function for sanitizing the CSS classes of the pasted from MS Word content ([see example]({% slug paste_editor %})).
* The function will remove any class attribute which value starts with `Mso`.
* For example `pasted from MS Word
` will result in `pasted from MS Word
`.
*
* @param {Attr} attr—The DOM class attribute that will be sanitized.
*/
export function sanitizeClassAttr(attr: Attr): void;
/**
* A function for sanitizing the style attributes of the pasted from MS Word content ([see example]({% slug paste_editor %})).
* The function will loop through all styles and will remove those that are invalid.
* For example `content
`,
* will result in `content
`.
*
* @param {Attr} attr—The DOM style attribute that will be sanitized.
*/
export function sanitizeStyleAttr(attr: Attr): void;
/**
* A function that will remove a DOM attribute from the pasted content ([see example]({% slug paste_editor %})).
*
* @param {Attr} attr—The DOM attribute that will be removed.
*/
export function removeAttribute(attr: Attr): void;
/**
* Removes the invalid HTML.
*
* @param {string} html—The HTML which will be sanitized.
* @returns {string}—The sanitized HTML.
*
* @example
* ```jsx-no-run
* import { EditorUtils } from '@progress/kendo-react-editor';
* const html = EditorUtils.sanitize('something pasted from MS Word, containing , , void;
}, options: EditorToolsSettings.InlineFormatOptions, transaction?: Transaction, markAttrs?: any): boolean;
/**
* Toggles a list of the specified type.
*
* @returns {boolean}
*/
export function toggleList(view: EditorView, types: {
listType: string;
orderedList: string;
bulletList: string;
listItem: string;
}, command?: EditorToolsSettings.Command): boolean;
/**
* Represents the `Shortcuts` object.
*/
export interface Shortcuts extends shortcuts.Shortcuts {
}
/**
* A function which returns the mapped `Shortcuts` object based on the passed settings.
* Useful when the default Editor nodes or tool settings are changed and the `Shortcuts` object has to be regenerated.
*
* @params—An object which holds specific types of nodes and tool settings that are used by the default `Shortcuts` handlers.
* @returns—An object which holds the shortcuts.
*/
export function getShortcuts(settings?: {
types?: {
listItem: string;
hardBreak: string;
};
toolsSettings?: {
bold?: EditorToolsSettings.InlineFormatOptions;
italic?: EditorToolsSettings.InlineFormatOptions;
underline?: EditorToolsSettings.InlineFormatOptions;
};
}): Shortcuts;
/**
* The `PluginKey` used in the Editor to pass editor props to the tools.
*/
const propsKey: PluginKey;
/**
* The `PluginKey` used in the Editor by the image resizing plugin.
*/
const imageResizeKey: PluginKey;
/**
* Represents the `marks` object of the Editor.
*/
const marks: {
[mark: string]: MarkSpec;
};
/**
* Represents the `nodes` object of the Editor.
*/
const nodes: {
[node: string]: NodeSpec;
};
}
/**
* @hidden
*/
declare class FindAndReplace extends React_2.Component {
/**
* @hidden
*/
state: {
showDialog: boolean;
};
/**
* @hidden
*/
render(): (false | JSX.Element | undefined)[];
private onClose;
private onOpen;
}
/**
* @hidden
*/
declare class FindAndReplaceDialog extends React_2.Component {
/**
* @hidden
*/
state: FindAndReplaceDialogState;
private get settings();
constructor(props: FindAndReplaceDialogProps);
/**
* @hidden
*/
componentDidUpdate(_: FindAndReplaceDialogProps, prevState: FindAndReplaceDialogState): void;
/**
* @hidden
*/
render(): JSX.Element;
private onTabSelect;
private onClose;
private matchesMessage;
private onFindNext;
private onFindPrev;
private onFind;
private onReplace;
private onReplaceAll;
private onKeyDown;
private onMatchCaseChecked;
private onMatchWordChecked;
private onMatchCyclicChecked;
private onUseRegExpChecked;
private onSearchChange;
private onReplaceChange;
private setNextState;
}
/**
* @hidden
*/
declare interface FindAndReplaceDialogProps {
/**
* The `EditorView` object.
*/
view: EditorView;
/**
* The `settings` object of the Dialog.
*/
settings?: EditorToolsSettings.FindReplaceSettings;
/**
* Represents the `dir` HTML attribute.
*/
dir?: string;
/**
* The `close` event which will be triggered when the Dialog is about to be unmounted.
*/
onClose: () => void;
}
declare interface FindAndReplaceDialogState {
selectedTab: number;
matches?: TextSelection[];
nextMatch?: TextSelection;
searchText: string;
replaceText: string;
matchCase: boolean;
matchWord: boolean;
matchCyclic: boolean;
useRegExp: boolean;
error?: string;
}
/**
* @hidden
*/
declare interface FindAndReplaceProps extends BasicToolProps, ButtonProps {
}
declare interface FindAndReplaceState {
showDialog: boolean;
}
/**
* @hidden
*/
declare namespace FontStyleToolNS {
/**
* @hidden
*/
interface DropDownListToolProps extends BasicToolProps, ToolRenderProp, DropDownListProps {
}
/**
* @hidden
*/
interface FontSizeProps extends DropDownListToolProps {
}
/**
* @hidden
*/
interface FontNameProps extends DropDownListToolProps {
}
/**
* @hidden
*/
const createStyleDropDownList: (settings: EditorToolsSettings.StyleDropDownListSettings) => React_2.ComponentClass;
}
/**
* @hidden
*/
declare namespace FormatBlockToolNS {
/**
* @hidden
*/
interface FormatBlockProps extends BasicToolProps, ToolRenderProp, DropDownListProps {
}
/**
* @hidden
*/
const createFormatBlockDropDownList: (settings: EditorToolsSettings.FormatBlockDropDownListSettings) => React_2.ComponentClass;
}
export { getHtml }
/**
* @hidden
*/
declare const getShortcuts: (settings?: {
types?: {
listItem: string;
hardBreak: string;
};
toolsSettings?: {
bold?: EditorToolsSettings.InlineFormatOptions;
italic?: EditorToolsSettings.InlineFormatOptions;
underline?: EditorToolsSettings.InlineFormatOptions;
};
}) => Shortcuts;
/**
* @hidden
*/
declare namespace HistoryToolNS {
/**
* @hidden
*/
interface UndoProps extends ToolProps {
}
/**
* @hidden
*/
interface RedoProps extends ToolProps {
}
/**
* @hidden
*/
const createUndoTool: (settings: EditorToolsSettings.ToolSettings) => React_2.ComponentClass;
/**
* @hidden
*/
const createRedoTool: (settings: EditorToolsSettings.ToolSettings) => React_2.ComponentClass;
}
/**
* @hidden
*/
declare namespace IndentToolNS {
/**
* @hidden
*/
interface IndentProps extends ToolProps {
}
/**
* @hidden
*/
const createIndentTool: (settings: EditorToolsSettings.IndentationSettings) => React_2.ComponentClass;
}
/**
* @hidden
*/
declare namespace InlineFormatToolNS {
/**
* @hidden
*/
interface InlineFormatToolProps extends ToolProps {
}
/**
* @hidden
*/
interface BoldProps extends InlineFormatToolProps {
}
/**
* @hidden
*/
interface ItalicProps extends InlineFormatToolProps {
}
/**
* @hidden
*/
interface UnderlineProps extends InlineFormatToolProps {
}
/**
* @hidden
*/
interface StrikethroughProps extends InlineFormatToolProps {
}
/**
* @hidden
*/
interface SubscriptProps extends InlineFormatToolProps {
}
/**
* @hidden
*/
interface SuperscriptProps extends InlineFormatToolProps {
}
/**
* @hidden
*/
const createInlineFormatTool: (settings: EditorToolsSettings.InlineFormatSettings) => React_2.ComponentClass;
}
/**
* @hidden
*/
declare class InsertImageDialog extends React_2.Component {
private src;
private altText;
private title;
private width;
private height;
/**
* @hidden
*/
render(): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | JSX.Element | null | undefined;
private onClose;
private onInsert;
}
/**
* @hidden
*/
declare interface InsertImageDialogProps extends EditorDialogProps {
/**
* The `ImageSettings` object.
*/
settings: EditorToolsSettings.ImageSettings;
}
/**
* @hidden
*/
declare class InsertLinkDialog extends React_2.Component {
private href;
private title;
private target;
/**
* @hidden
*/
render(): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | JSX.Element | null | undefined;
private onClose;
private onInsert;
}
/**
* @hidden
*/
declare interface InsertLinkDialogProps extends EditorDialogProps {
/**
* The `LinkSettings` object.
*/
settings: EditorToolsSettings.LinkSettings;
}
/**
* @hidden
*/
declare namespace InsertTablePopupNS {
/**
* @hidden
*/
interface InsertTablePopupProps {
/**
* The element which will be used as an anchor.
*/
anchor: HTMLButtonElement | null;
/**
* Controls the visibility of the Popup.
*/
show: boolean;
/**
* The `Create a table` message.
*/
createTableMessage: string;
/**
* The `Create a {0} x {1} table` message.
*/
createTableHintMessage: string;
/**
* The number of rows.
*/
rows?: number;
/**
* The number of columns.
*/
columns?: number;
/**
* The `dir` HTML attribute.
*/
dir?: string;
/**
* The `close` event which will be triggered when the `InsertTablePopup` is about to be closed.
*/
onClose: () => void;
/**
* The `onTableInsert` event which will be triggered when a cell in `InsertTablePopup` is clicked.
*/
onTableInsert: (row: number, col: number) => void;
}
/**
* @hidden
*/
class InsertTablePopup extends React_2.Component {
/**
* @hidden
*/
static propTypes: {
show: default_2.Validator;
createTableMessage: default_2.Validator;
createTableHintMessage: default_2.Validator;
onClose: default_2.Validator<(...args: any[]) => any>;
onTableInsert: default_2.Validator<(...args: any[]) => any>;
anchor: default_2.Requireable;
rows: default_2.Requireable;
columns: default_2.Requireable;
dir: default_2.Requireable;
};
/**
* @hidden
*/
static defaultProps: {
rows: number;
columns: number;
};
private pointerdown;
/**
* @hidden
*/
componentDidUpdate(prevProps: InsertTablePopupProps): void;
/**
* @hidden
*/
componentDidMount(): void;
/**
* @hidden
*/
componentWillUnmount(): void;
/**
* @hidden
*/
render(): JSX.Element;
private onWindowDown;
private onPointerDown;
}
}
/**
* @hidden
*/
declare namespace InsertTableToolNS {
/**
* @hidden
*/
interface InsertTableProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
}
/**
* @hidden
*/
interface InsertTableToolState {
openedPopup: boolean;
}
/**
* @hidden
*/
const createInsertTableTool: (settings: EditorToolsSettings.InsertTableSettings) => React_2.ComponentClass;
}
/**
* @hidden
*/
declare namespace LinkToolNS {
/**
* @hidden
*/
interface LinkProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
}
/**
* @hidden
*/
interface LinkToolState {
openedDialog: boolean;
}
/**
* @hidden
*/
const createLinkTool: (settings: EditorToolsSettings.LinkSettings) => React_2.ComponentClass;
}
/**
* @hidden
*/
declare namespace ListToolNS {
/**
* @hidden
*/
interface ListToolProps extends ToolProps {
}
/**
* @hidden
*/
interface OrderedListProps extends ListToolProps {
}
/**
* @hidden
*/
interface UnorderedListProps extends ListToolProps {
}
/**
* @hidden
*/
const createListTool: (settings: EditorToolsSettings.ListSettings) => React_2.ComponentClass;
}
export { marks }
export { MarkSpec }
export { nodes }
export { NodeSpec }
export { parseContent }
/**
* The settings passed to `pasteCleanup` function ([see example]({% slug paste_editor %})).
*/
export declare interface PasteCleanupSettings extends PasteCleanupSettings_2 {
}
/**
* @hidden
*/
declare interface PdfProps extends ToolProps {
/**
* The settings of the tool. Use it to modify the tool appearance.
*/
settings?: EditorToolsSettings.PdfSettings;
/**
* The options which will be passed to the [`savePDF`]({% slug api_pdf_savepdf %}) function.
*/
savePdfOptions?: PDFExportProps;
/**
* The callback which will be passed to the [`savePDF`]({% slug api_pdf_savepdf %}) function.
*/
savePdfCallback?: () => void;
}
/**
* @hidden
*/
declare interface PrintProps extends ToolProps {
/**
* The settings of the tool. Use it to modify the tool appearance.
*/
settings?: EditorToolsSettings.PrintSettings;
}
/**
* An object containing the content of ProseMirror packages used at the Editor component.
*
* "prosemirror-state",
* "prosemirror-view",
* "prosemirror-model",
* "prosemirror-transform",
* "prosemirror-commands",
* "prosemirror-keymap",
* "prosemirror-tables",
* "prosemirror-schema-list",
* "prosemirror-history",
* "prosemirror-inputrules",
* "prosemirror-dropcursor",
* "prosemirror-gapcursor"
*/
export declare const ProseMirror: {
Selection: typeof Selection_2;
SelectionRange: typeof SelectionRange;
TextSelection: typeof TextSelection;
NodeSelection: typeof NodeSelection;
AllSelection: typeof AllSelection;
EditorState: typeof EditorState;
Plugin: typeof Plugin_2;
PluginKey: typeof PluginKey;
Transaction: typeof Transaction;
Decoration: typeof Decoration;
DecorationSet: typeof DecorationSet;
EditorView: typeof EditorView;
Node: typeof Node_2;
ResolvedPos: typeof ResolvedPos;
NodeRange: typeof NodeRange;
Fragment: typeof Fragment;
Slice: typeof Slice;
ReplaceError: typeof ReplaceError;
Mark: typeof Mark;
Schema: typeof Schema;
NodeType: typeof NodeType;
MarkType: typeof MarkType;
ContentMatch: typeof ContentMatch;
DOMParser: typeof DOMParser_2;
DOMSerializer: typeof DOMSerializer;
Transform: typeof Transform;
Step: typeof Step;
StepResult: typeof StepResult;
joinPoint: typeof joinPoint;
canJoin: typeof canJoin;
canSplit: typeof canSplit;
insertPoint: typeof insertPoint;
dropPoint: typeof dropPoint;
liftTarget: typeof liftTarget;
findWrapping: typeof findWrapping;
StepMap: typeof StepMap;
MapResult: typeof MapResult;
Mapping: typeof Mapping;
AddMarkStep: typeof AddMarkStep;
RemoveMarkStep: typeof RemoveMarkStep;
ReplaceStep: typeof ReplaceStep;
ReplaceAroundStep: typeof ReplaceAroundStep;
replaceStep: typeof replaceStep;
deleteSelection: Command;
joinBackward: Command;
selectNodeBackward: Command;
joinForward: Command;
selectNodeForward: Command;
joinUp: Command;
joinDown: Command;
lift: Command;
newlineInCode: Command;
exitCode: Command;
createParagraphNear: Command;
liftEmptyBlock: Command;
splitBlock: Command;
splitBlockKeepMarks: Command;
selectParentNode: Command;
selectAll: Command;
wrapIn: typeof wrapIn;
setBlockType: typeof setBlockType;
toggleMark: typeof toggleMark;
autoJoin: typeof autoJoin;
chainCommands: typeof chainCommands;
pcBaseKeymap: {
[key: string]: Command;
};
macBaseKeymap: {
[key: string]: Command;
};
baseKeymap: {
[key: string]: Command;
};
history: typeof history_2;
undo: Command;
redo: Command;
undoDepth: typeof undoDepth;
redoDepth: typeof redoDepth;
InputRule: typeof InputRule;
inputRules: typeof inputRules;
undoInputRule: Command;
emDash: InputRule;
ellipsis: InputRule;
openDoubleQuote: InputRule;
closeDoubleQuote: InputRule;
openSingleQuote: InputRule;
closeSingleQuote: InputRule;
smartQuotes: readonly InputRule[];
wrappingInputRule: typeof wrappingInputRule;
textblockTypeInputRule: typeof textblockTypeInputRule;
keymap: typeof keymap;
keydownHandler: typeof keydownHandler;
orderedList: NodeSpec;
bulletList: NodeSpec;
listItem: NodeSpec;
addListNodes: typeof addListNodes;
wrapInList: typeof wrapInList;
splitListItem: typeof splitListItem;
liftListItem: typeof liftListItem;
sinkListItem: typeof sinkListItem;
dropCursor: typeof dropCursor;
gapCursor: typeof gapCursor;
tableEditing: typeof tableEditing;
fixTables: typeof fixTables;
fixTablesKey: PluginKey<{
fixTables: boolean;
}>;
cellAround: typeof cellAround;
isInTable: typeof isInTable;
selectionCell: typeof selectionCell;
moveCellForward: typeof moveCellForward;
inSameTable: typeof inSameTable;
findCell: typeof findCell;
colCount: typeof colCount;
nextCell: typeof nextCell;
removeColSpan: typeof removeColSpan;
addColSpan: typeof addColSpan;
columnIsHeader: typeof columnIsHeader;
tableNodes: typeof tableNodes;
tableNodeTypes: typeof tableNodeTypes;
CellSelection: typeof CellSelection;
TableMap: typeof TableMap;
tableEditingKey: PluginKey;
columnResizing: typeof columnResizing;
columnResizingPluginKey: PluginKey;
updateColumnsOnResize: typeof updateColumnsOnResize;
selectedRect: typeof selectedRect;
addColumn: typeof addColumn;
addColumnBefore: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
addColumnAfter: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
deleteColumn: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
rowIsHeader: typeof rowIsHeader;
addRow: typeof addRow;
addRowBefore: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
addRowAfter: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
deleteRow: typeof deleteRow;
mergeCells: typeof mergeCells;
splitCell: typeof splitCell;
splitCellWithType: typeof splitCellWithType;
setCellAttr: typeof setCellAttr;
toggleHeader: typeof toggleHeader;
toggleHeaderRow: Command;
toggleHeaderColumn: Command;
toggleHeaderCell: Command;
goToNextCell: typeof goToNextCell;
deleteTable: typeof deleteTable;
};
/**
* @hidden
*/
declare interface SelectAllToolProps extends ToolProps {
/**
* The settings of the tool. Use it to modify the tool appearance.
*/
settings?: EditorToolsSettings.SelectAllSettings;
}
/**
* @hidden
*/
export declare interface Shortcuts {
[key: string]: (state: EditorState, dispatch: (tr: Transaction) => void, view: EditorView) => boolean;
}
declare namespace shortcuts {
export {
Shortcuts,
getShortcuts
}
}
/**
* @hidden
*/
declare interface TableCellPropertiesProps extends ToolProps {
}
/**
* @hidden
*/
declare namespace TableEditNS {
/**
* @hidden
*/
interface AddRowBeforeProps extends ToolProps {
}
/**
* @hidden
*/
interface AddRowAfterProps extends ToolProps {
}
/**
* @hidden
*/
interface AddColumnBeforeProps extends ToolProps {
}
/**
* @hidden
*/
interface AddColumnAfterProps extends ToolProps {
}
/**
* @hidden
*/
interface DeleteRowProps extends ToolProps {
}
/**
* @hidden
*/
interface DeleteColumnProps extends ToolProps {
}
/**
* @hidden
*/
interface DeleteTableProps extends ToolProps {
}
/**
* @hidden
*/
interface MergeCellsProps extends ToolProps {
}
/**
* @hidden
*/
interface SplitCellProps extends ToolProps {
}
/**
* @hidden
*/
const createAddRowBeforeTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass;
/**
* @hidden
*/
const createAddRowAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass;
/**
* @hidden
*/
const createAddColumnBeforeTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass;
/**
* @hidden
*/
const createAddColumnAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass;
/**
* @hidden
*/
const createDeleteRowTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass;
/**
* @hidden
*/
const createDeleteColumnTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass;
/**
* @hidden
*/
const createDeleteTableTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass;
/**
* @hidden
*/
const createMergeCellsTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass;
/**
* @hidden
*/
const createSplitCellTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass;
}
/**
* @hidden
*/
declare interface TablePropertiesProps extends ToolProps {
}
/**
* @hidden
*/
declare interface ToolProps extends BasicToolProps, ToolRenderProp, ButtonProps {
}
/**
* @hidden
*/
declare interface ToolRenderProp {
/**
* Fires when a tool is about to be rendered. Used to override the default appearance of the tool.
*/
render?: (tool: React.ReactElement, args?: any) => React.ReactNode;
}
/**
* @hidden
*/
declare interface ToolWithDialogRenderProp {
/**
* Fires when a tool is about to be rendered. Used to override the default appearance of the tool.
*/
render?: (tool: [React.ReactElement, React.ReactElement | null], args?: any) => React.ReactNode;
}
/**
* @hidden
*/
declare namespace UnlinkToolNS {
/**
* @hidden
*/
interface UnlinkProps extends ToolProps {
}
/**
* @hidden
*/
const createUnlinkTool: (settings: EditorToolsSettings.UnlinkSettings) => React_2.ComponentClass;
}
/**
* @hidden
*/
declare class ViewHtmlDialog extends React_2.Component {
private htmlArea;
/**
* @hidden
*/
render(): string | number | bigint | boolean | Iterable | Promise> | Iterable | null | undefined> | JSX.Element | null | undefined;
private textAreaRef;
private onUpdate;
private onClose;
}
/**
* @hidden
*/
declare interface ViewHtmlDialogProps extends EditorDialogProps {
/**
* The `ViewHtmlSettings` object.
*/
settings: EditorToolsSettings.ViewHtmlSettings;
}
/**
* @hidden
*/
declare namespace ViewHtmlToolNS {
/**
* @hidden
*/
interface ViewHtmlProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
}
/**
* @hidden
*/
interface ViewHtmlState {
openedDialog: boolean;
}
/**
* @hidden
*/
const createViewHtmlTool: (settings: EditorToolsSettings.ViewHtmlSettings) => React_2.ComponentClass;
}
export { }