@progress/kendo-react-editor
Version:
Kendo UI for React Editor package
684 lines (683 loc) • 25 kB
TypeScript
import * as React from 'react';
import { EditorToolsSettings } from '../config/toolsSettings';
import { InsertTableToolNS, InsertTablePopupNS } from './insertTable';
import { FontStyleToolNS } from './fontStyle';
import { ApplyColorToolProps } from './applyColor';
import { FormatBlockToolNS } from './formatBlock';
import { HistoryToolNS } from './history';
import { IndentToolNS } from './indent';
import { InlineFormatToolNS } from './inlineFormat';
import { LinkToolNS } from './insertLink';
import { ListToolNS } from './lists';
import { ToolProps, BasicToolProps, ToolWithDialogRenderProp } from './ToolProps';
import { TableEditNS } from './tableEdit';
import { UnlinkToolNS } from './unlink';
import { ViewHtmlToolNS } from './viewHtml';
import { PrintProps as PrintToolProps } from './print';
import { PdfProps as PdfToolProps } from './pdf';
import { SelectAllProps as SelectAllToolProps } from './selectAll';
import { CleanFormattingProps as CleanFormattingToolProps } from './cleanFormatting';
import { FindAndReplace as FindAndReplaceTool, FindAndReplaceProps as FindAndReplaceToolProps } from './findReplace';
import { ButtonProps } from '@progress/kendo-react-buttons';
/**
* 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.
*/
interface AlignToolProps extends ToolProps {
}
/**
* The props for the AlignLeft tool component of the Editor.
*/
interface AlignLeftProps extends AlignToolProps {
}
/**
* The props for the AlignRight tool component of the Editor.
*/
interface AlignRightProps extends AlignToolProps {
}
/**
* The props for the AlignCenter tool component of the Editor.
*/
interface AlignCenterProps extends AlignToolProps {
}
/**
* The props for the AlignJustify tool component of the Editor.
*/
interface AlignJustifyProps extends AlignToolProps {
}
/**
* Creates the Align tool component of the Editor.
*
* @param {AlignSettings} settings
* @returns {React.ComponentClass<AlignToolProps>} - Editor's Align tool component.
*/
function createAlignTool(settings: EditorToolsSettings.AlignSettings): React.ComponentClass<AlignToolProps, React.ComponentState>;
const AlignLeft_base: React.ComponentClass<AlignToolProps, any>;
/**
* The AlignLeft tool component.
*/
class AlignLeft extends AlignLeft_base {
}
const AlignRight_base: React.ComponentClass<AlignToolProps, any>;
/**
* The AlignRight tool component.
*/
class AlignRight extends AlignRight_base {
}
const AlignCenter_base: React.ComponentClass<AlignToolProps, any>;
/**
* The AlignCenter tool component.
*/
class AlignCenter extends AlignCenter_base {
}
const AlignJustify_base: React.ComponentClass<AlignToolProps, any>;
/**
* The AlignJustify tool component.
*/
class AlignJustify extends AlignJustify_base {
}
/**
* The props for the InsertTable tool component of the Editor.
*/
interface InsertTableProps extends InsertTableToolNS.InsertTableProps {
}
/**
* Creates the InsertTable tool component of the Editor.
*
* @param {InsertTableSettings} - The settings of the InsertTable tool.
* @returns {React.ComponentClass<InsertTableProps>} - The InsertTable tool component of the Editor.
*/
function createInsertTableTool(settings: EditorToolsSettings.InsertTableSettings): React.ComponentClass<InsertTableProps>;
const InsertTable_base: React.ComponentClass<InsertTableProps, any>;
/**
* The InsertTable tool component.
*/
class InsertTable extends InsertTable_base {
}
/**
* The props of the `InsertTablePopup` component.
*/
interface InsertTablePopupProps extends InsertTablePopupNS.InsertTablePopupProps {
}
/**
* The `InsertTablePopup` component.
*/
class InsertTablePopup extends InsertTablePopupNS.InsertTablePopup {
}
/**
* The props for the DropDownList tool component for inline styling of the Editor.
*/
interface DropDownListToolProps extends FontStyleToolNS.DropDownListToolProps {
}
/**
* The props for the FontSize tool component of the Editor.
*/
interface FontSizeProps extends FontStyleToolNS.DropDownListToolProps {
}
/**
* The props for the FontName tool component of the Editor.
*/
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<DropDownListToolProps>} - The DropDownList tool component of the Editor.
*/
function createStyleDropDownList(settings: EditorToolsSettings.StyleDropDownListSettings): React.ComponentClass<DropDownListToolProps, React.ComponentState>;
const FontSize_base: React.ComponentClass<DropDownListToolProps, any>;
/**
* The FontSize tool component.
*/
class FontSize extends FontSize_base {
}
const FontName_base: React.ComponentClass<DropDownListToolProps, any>;
/**
* The FontName tool component.
*/
class FontName extends FontName_base {
}
/**
* The props for the ForeColor tool component of the Editor.
*/
interface ForeColorProps extends ApplyColorToolProps {
}
/**
* The props for the BackColor tool component of the Editor.
*/
interface BackColorProps extends ApplyColorToolProps {
}
/**
* The ForeColor tool component.
*/
const ForeColor: React.FunctionComponent<ForeColorProps>;
/**
* The BackColor tool component.
*/
const BackColor: React.FunctionComponent<BackColorProps>;
/**
* The props for the FormatBlock tool component of the Editor.
*/
interface FormatBlockProps extends FormatBlockToolNS.FormatBlockProps {
}
/**
* Creates the FormatBlock tool component of the Editor.
*
* @param {FormatBlockDropDownListSettings} settings
* @returns {React.ComponentClass<FormatBlockProps>} - The FormatBlock tool component of the Editor.
*/
function createFormatBlockDropDownList(settings: EditorToolsSettings.FormatBlockDropDownListSettings): React.ComponentClass<FormatBlockProps, React.ComponentState>;
const FormatBlock_base: React.ComponentClass<FormatBlockProps, any>;
/**
* The FormatBlock tool component.
*/
class FormatBlock extends FormatBlock_base {
}
/**
* The props for the Undo tool component of the Editor.
*/
interface UndoProps extends HistoryToolNS.UndoProps {
}
/**
* The props for the Redo tool component of the Editor.
*/
interface RedoProps extends HistoryToolNS.RedoProps {
}
/**
* Creates the Undo tool component of the Editor.
*
* @param {ToolSettings} settings
* @returns {React.ComponentClass<UndoProps>} - The Undo tool component of the Editor.
*/
function createUndoTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
/**
* Creates the Redo tool component of the Editor.
*
* @param {ToolSettings} settings
* @returns {React.ComponentClass<RedoProps>} - The Redo tool component of the Editor.
*/
function createRedoTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
const Undo_base: React.ComponentClass<ToolProps, any>;
/**
* The Undo tool component of the Editor.
*/
class Undo extends Undo_base {
}
const Redo_base: React.ComponentClass<ToolProps, any>;
/**
* The Redo tool component of the Editor.
*/
class Redo extends Redo_base {
}
/**
* The props for the Indent tool component of the Editor.
*/
interface IndentProps extends IndentToolNS.IndentProps {
}
/**
* Creates the Indent tool component of the Editor.
*
* @param {IndentationSettings} settings
* @returns {React.ComponentClass<IndentProps>} - The Indent tool component of the Editor.
*/
function createIndentTool(settings: EditorToolsSettings.IndentationSettings): React.ComponentClass<IndentProps, React.ComponentState>;
const Indent_base: React.ComponentClass<IndentProps, any>;
/**
* The Indent tool component.
*/
class Indent extends Indent_base {
}
/**
* The props for the InlineFormat tool component of the Editor.
*/
interface InlineFormatToolProps extends InlineFormatToolNS.InlineFormatToolProps {
}
/**
* The props for the Bold tool component of the Editor.
*/
interface BoldProps extends InlineFormatToolNS.BoldProps {
}
/**
* The props for the Italic tool component of the Editor.
*/
interface ItalicProps extends InlineFormatToolNS.ItalicProps {
}
/**
* The props for the Underline tool component of the Editor.
*/
interface UnderlineProps extends InlineFormatToolNS.UnderlineProps {
}
/**
* The props for the Strikethrough tool component of the Editor.
*/
interface StrikethroughProps extends InlineFormatToolNS.StrikethroughProps {
}
/**
* The props for the Subscript tool component of the Editor.
*/
interface SubscriptProps extends InlineFormatToolNS.SubscriptProps {
}
/**
* The props for the Superscript tool component of the Editor.
*/
interface SuperscriptProps extends InlineFormatToolNS.SuperscriptProps {
}
/**
* Creates the InlineFormat tool component of the Editor.
*
* @param {InlineFormatSettings} settings
* @returns {React.ComponentClass<InlineFormatToolProps>} - Editor's InlineFormat tool component.
*/
function createInlineFormatTool(settings: EditorToolsSettings.InlineFormatSettings): React.ComponentClass<InlineFormatToolProps, React.ComponentState>;
const Bold_base: React.ComponentClass<InlineFormatToolProps, any>;
/**
* The Bold tool component.
*/
class Bold extends Bold_base {
}
const Italic_base: React.ComponentClass<InlineFormatToolProps, any>;
/**
* The Italic tool component.
*/
class Italic extends Italic_base {
}
const Underline_base: React.ComponentClass<InlineFormatToolProps, any>;
/**
* The Underline tool component.
*/
class Underline extends Underline_base {
}
const Strikethrough_base: React.ComponentClass<InlineFormatToolProps, any>;
/**
* The Strikethrough tool component.
*/
class Strikethrough extends Strikethrough_base {
}
const Subscript_base: React.ComponentClass<InlineFormatToolProps, any>;
/**
* The Subscript tool component.
*/
class Subscript extends Subscript_base {
}
const Superscript_base: React.ComponentClass<InlineFormatToolProps, any>;
/**
* The Superscript tool component.
*/
class Superscript extends Superscript_base {
}
/**
* The props for the InsertImage tool component of the Editor.
*/
interface InsertImageProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
}
/**
* Creates the InsertImage tool component of the Editor.
*
* @param {ImageSettings} settings
* @returns {React.ComponentClass<InsertImageProps>} - The InsertImage tool component of the Editor.
*/
function createInsertImageTool(settings: EditorToolsSettings.ImageSettings): React.ComponentClass<InsertImageProps>;
const InsertImage_base: React.ComponentClass<InsertImageProps, any>;
/**
* The InsertImage tool component.
*/
class InsertImage extends InsertImage_base {
}
/**
* The props for the Link tool component of the Editor.
*/
interface LinkProps extends LinkToolNS.LinkProps {
}
/**
* Creates the Link tool component of the Editor.
*
* @param {LinkSettings} settings
* @returns {React.ComponentClass<LinkProps>} - The Link tool component of the Editor.
*/
function createLinkTool(settings: EditorToolsSettings.LinkSettings): React.ComponentClass<LinkProps>;
const Link_base: React.ComponentClass<LinkProps, any>;
/**
* The Link tool component.
*/
class Link extends Link_base {
}
const InsertFile_base: React.ComponentClass<LinkProps, any>;
/**
* The InsertFile tool component.
*/
class InsertFile extends InsertFile_base {
}
/**
* The base interface of `OrderedListProps` and `UnorderedListProps`.
*/
interface ListToolProps extends ListToolNS.ListToolProps {
}
/**
* The props for the OrderedList tool component of the Editor.
*/
interface OrderedListProps extends ListToolNS.OrderedListProps {
}
/**
* The props for the UnorderedList tool component of the Editor.
*/
interface UnorderedListProps extends ListToolNS.UnorderedListProps {
}
/**
* Creates the List tool component of the Editor.
*
* @param {ToolSettings} settings
* @returns {React.ComponentClass<ListToolProps>} - The List tool component of the Editor.
*/
function createListTool(settings: EditorToolsSettings.ListSettings): React.ComponentClass<ListToolProps, React.ComponentState>;
const OrderedList_base: React.ComponentClass<ListToolProps, any>;
/**
* The OrderedList tool component.
*/
class OrderedList extends OrderedList_base {
}
const UnorderedList_base: React.ComponentClass<ListToolProps, any>;
/**
* The UnorderedList tool component.
*/
class UnorderedList extends UnorderedList_base {
}
/**
* The props for the Outdent tool component of the Editor.
*/
interface OutdentProps extends IndentToolNS.IndentProps {
}
/**
* Creates the Outdent tool component of the Editor.
*
* @param {IndentationSettings} settings
* @returns {React.ComponentClass<OutdentProps>} - The Outdent tool component of the Editor.
*/
function createOutdentTool(settings: EditorToolsSettings.IndentationSettings): React.ComponentClass<OutdentProps, React.ComponentState>;
const Outdent_base: React.ComponentClass<OutdentProps, any>;
/**
* The Outdent tool component.
*/
class Outdent extends Outdent_base {
}
/**
* The props for the Print tool component of the Editor.
*/
interface PrintProps extends PrintToolProps {
}
/**
* The Print tool component.
* Designed to work only if Editor's defaultEditMode prop is set to 'iframe'.
*/
const Print: React.FunctionComponent<PrintProps>;
/**
* The props for the Export to PDF tool component of the Editor.
*/
interface PdfProps extends PdfToolProps {
}
/**
* The Export to PDF tool component.
*
* To modify the default PDF export options, see the following example:
*
* @example
* ```tsx-no-run
* import { Editor, EditorTools } from '@progress/kendo-react-editor';
* const { Bold, Italic, Pdf } = EditorTools;
*
* const PdfTool = (props: EditorTools.PdfProps) => (
* <Pdf
* {...props}
* // https://www.telerik.com/kendo-react-ui/components/pdfprocessing/api/PDFExportProps/
* savePdfOptions={{
* fileName: 'editor-export.pdf',
* paperSize: 'A5',
* margin: '1cm'
* }}
* />
* );
*
* class App extends React.Component<any, any> {
* render() {
* return (
* <Editor
* tools={[[ Bold, Italic, PdfTool ]]}
* contentStyle={{ height: 100 }}
* defaultContent="<p>text</p>"
* />
* );
* }
* }
* ```
*/
const Pdf: React.FunctionComponent<PdfProps>;
/**
* The props for the SelectAll tool component of the Editor.
*/
interface SelectAllProps extends SelectAllToolProps {
}
/**
* The SelectAll tool component.
*/
const SelectAll: React.FunctionComponent<SelectAllProps>;
/**
* The props for the CleanFormatting tool component of the Editor.
*/
interface CleanFormattingProps extends CleanFormattingToolProps {
}
/**
* The CleanFormatting tool component.
*/
const CleanFormatting: React.FunctionComponent<CleanFormattingProps>;
/**
* The props for the AddRowBefore tool component of the Editor.
*/
interface AddRowBeforeProps extends TableEditNS.AddRowBeforeProps {
}
/**
* The props for the AddRowAfter tool component of the Editor.
*/
interface AddRowAfterProps extends TableEditNS.AddRowAfterProps {
}
/**
* The props for the AddColumnBefore tool component of the Editor.
*/
interface AddColumnBeforeProps extends TableEditNS.AddColumnBeforeProps {
}
/**
* The props for the AddColumnAfter tool component of the Editor.
*/
interface AddColumnAfterProps extends TableEditNS.AddColumnAfterProps {
}
/**
* The props for the DeleteRow tool component of the Editor.
*/
interface DeleteRowProps extends TableEditNS.DeleteRowProps {
}
/**
* The props for the DeleteColumn tool component of the Editor.
*/
interface DeleteColumnProps extends TableEditNS.DeleteColumnProps {
}
/**
* The props for the DeleteTable tool component of the Editor.
*/
interface DeleteTableProps extends TableEditNS.DeleteTableProps {
}
/**
* The props for the MergeCells tool component of the Editor.
*/
interface MergeCellsProps extends TableEditNS.MergeCellsProps {
}
/**
* The props for the SplitCell tool component of the Editor.
*/
interface SplitCellProps extends TableEditNS.SplitCellProps {
}
/**
* Creates the AddRowBefore tool component of the Editor.
*
* @param {ToolSettings} - The settings of the AddRowBefore tool.
* @returns {React.ComponentClass<AddRowBeforeProps>} - The AddRowBefore tool component of the Editor.
*/
function createAddRowBeforeTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
/**
* Creates the AddRowAfter tool component of the Editor.
*
* @param {ToolSettings} - The settings of the AddRowAfter tool.
* @returns {React.ComponentClass<AddRowAfterProps>} - The AddRowAfter tool component of the Editor.
*/
function createAddRowAfterTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
/**
* Creates the AddColumnBefore tool component of the Editor.
*
* @param {ToolSettings} - The settings of the AddColumnBefore tool.
* @returns {React.ComponentClass<AddColumnBeforeProps>} - The AddColumnBefore tool component of the Editor.
*/
function createAddColumnBeforeTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
/**
* Creates the AddColumnAfter tool component of the Editor.
*
* @param {ToolSettings} - The settings of the AddColumnAfter tool.
* @returns {React.ComponentClass<AddColumnAfterProps>} - The AddColumnAfter tool component of the Editor.
*/
function createAddColumnAfterTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
/**
* Creates the DeleteRow tool component of the Editor.
*
* @param {ToolSettings} - The settings of the DeleteRow tool.
* @returns {React.ComponentClass<DeleteRowProps>} - The DeleteRow tool component of the Editor.
*/
function createDeleteRowTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
/**
* Creates the DeleteColumn tool component of the Editor.
*
* @param {ToolSettings} - The settings of the DeleteColumn tool.
* @returns {React.ComponentClass<DeleteColumnProps>} - The DeleteColumn tool component of the Editor.
*/
function createDeleteColumnTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
/**
* Creates the DeleteTable tool component of the Editor.
*
* @param {ToolSettings} - The settings of the DeleteTable tool.
* @returns {React.ComponentClass<DeleteTableProps>} - The DeleteTable tool component of the Editor.
*/
function createDeleteTableTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
/**
* Creates the MergeCells tool component of the Editor.
*
* @param {ToolSettings} - The settings of the MergeCells tool
* @returns {React.ComponentClass<MergeCellsProps>} - The MergeCells tool component of the Editor.
*/
function createMergeCellsTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
/**
* Creates the SplitCell tool component of the Editor.
*
* @param {ToolSettings} - The settings of the SplitCell tool.
* @returns {React.ComponentClass<SplitCellProps>} - The SplitCell tool component of the Editor.
*/
function createSplitCellTool(settings: EditorToolsSettings.ToolSettings): React.ComponentClass<ToolProps, React.ComponentState>;
const AddRowBefore_base: React.ComponentClass<ToolProps, any>;
/**
* The AddRowBefore tool component.
*/
class AddRowBefore extends AddRowBefore_base {
}
const AddRowAfter_base: React.ComponentClass<ToolProps, any>;
/**
* The AddRowAfter tool component.
*/
class AddRowAfter extends AddRowAfter_base {
}
const AddColumnBefore_base: React.ComponentClass<ToolProps, any>;
/**
* The AddColumnBefore tool component.
*/
class AddColumnBefore extends AddColumnBefore_base {
}
const AddColumnAfter_base: React.ComponentClass<ToolProps, any>;
/**
* The AddColumnAfter tool component.
*/
class AddColumnAfter extends AddColumnAfter_base {
}
const DeleteRow_base: React.ComponentClass<ToolProps, any>;
/**
* The DeleteRow tool component.
*/
class DeleteRow extends DeleteRow_base {
}
const DeleteColumn_base: React.ComponentClass<ToolProps, any>;
/**
* The DeleteColumn tool component.
*/
class DeleteColumn extends DeleteColumn_base {
}
const DeleteTable_base: React.ComponentClass<ToolProps, any>;
/**
* The DeleteTable tool component.
*/
class DeleteTable extends DeleteTable_base {
}
const MergeCells_base: React.ComponentClass<ToolProps, any>;
/**
* The MergeCells tool component.
*/
class MergeCells extends MergeCells_base {
}
const SplitCell_base: React.ComponentClass<ToolProps, any>;
/**
* The SplitCell tool component.
*/
class SplitCell extends SplitCell_base {
}
/**
* The props for the Unlink tool component of the Editor.
*/
interface UnlinkProps extends UnlinkToolNS.UnlinkProps {
}
/**
* Creates the Unlink tool component of the Editor.
*
* @param {UnlinkSettings} settings
* @returns {React.ComponentClass<UnlinkProps>} - The Unlink tool component of the Editor.
*/
function createUnlinkTool(settings: EditorToolsSettings.UnlinkSettings): React.ComponentClass<UnlinkProps, React.ComponentState>;
const Unlink_base: React.ComponentClass<UnlinkProps, any>;
/**
* The Unlink tool component.
*/
class Unlink extends Unlink_base {
}
/**
* The props for the ViewHtml tool component of the Editor.
*/
interface ViewHtmlProps extends ViewHtmlToolNS.ViewHtmlProps {
}
/**
* Creates the ViewHtml tool component of the Editor.
*
* @param {ViewHtmlSettings} settings
* @returns {React.ComponentClass<ViewHtmlProps>} - The ViewHtml tool component of the Editor.
*/
function createViewHtmlTool(settings: EditorToolsSettings.ViewHtmlSettings): React.ComponentClass<ViewHtmlProps>;
const ViewHtml_base: React.ComponentClass<ViewHtmlProps, any>;
/**
* The ViewHtml tool component.
*/
class ViewHtml extends ViewHtml_base {
}
/**
* The FindAndReplace tool component.
*/
class FindAndReplace extends FindAndReplaceTool {
}
/**
* The props for the FindAndReplace tool component of the Editor.
*/
interface FindAndReplaceProps extends FindAndReplaceToolProps {
}
}