Type Parameters

  • T

Hierarchy

  • IUploaderOptions

Properties

buildData?: ((this: T, formData: any) => BuildDataResult)

Type declaration

contentType: ((this: T, requestData: any) => string | false)

Type declaration

    • (this: T, requestData: any): string | false
    • Parameters

      • this: T
      • requestData: any

      Returns string | false

data: null | object
defaultHandlerError: HandlerError
defaultHandlerSuccess: HandlerSuccess
error: ((this: T, e: Error) => void)

Type declaration

    • (this: T, e: Error): void
    • Parameters

      Returns void

filesVariableName: ((i: number) => string)

Type declaration

    • (i: number): string
    • Parameters

      • i: number

      Returns string

format: string
getMessage: ((this: T, resp: IUploaderAnswer) => string)

Type declaration

headers?: null | IDictionary<string, string> | ((this: IAjax<any>) => CanPromise<null | IDictionary<string, string>>)
imagesExtensions: string[]

List of extensions for images

Default

['jpg', 'png', 'jpeg', 'gif']

Example

Jodit.make('#editor', {
uploader: {
imagesExtensions: ['jpg', 'png', 'jpeg', 'gif', 'svg', 'webp']
}
});
insertImageAsBase64URI: boolean
isSuccess: ((this: T, resp: IUploaderAnswer) => boolean)

Type declaration

method: string
pathVariableName: string
prepareData: ((this: T, formData: FormData) => any)

Type declaration

    • (this: T, formData: FormData): any
    • Parameters

      • this: T
      • formData: FormData

      Returns any

process: ((this: T, resp: IUploaderAnswer) => IUploaderData)

Type declaration

queryBuild?: ((obj: string | FormData | IDictionary<string | object, string>, prefix?: string) => string | FormData)

Type declaration

    • (obj: string | FormData | IDictionary<string | object, string>, prefix?: string): string | FormData
    • Parameters

      • obj: string | FormData | IDictionary<string | object, string>
      • Optional prefix: string

      Returns string | FormData

url: string | ((request: string | IDictionary<string, string> | FormData) => string)
withCredentials: boolean

Methods

  • The method can be used to change the displayed name of the uploaded file

    Jodit.make('#editor', {
    uploader: {
    url: 'https://sitename.net/jodit/connector/index.php?action=fileUpload',
    getDisplayName: (_, name) => 'File:' + name
    }
    });

    Parameters

    • this: T
    • baseurl: string
    • filename: string

    Returns string

  • The method can be used to change the name of the uploaded file This is the name the file will have when it is sent to the server

    Jodit.make('#editor', {
    uploader: {
    url: 'some-connector.php',
    processFileName: (key, file, name) => {
    return [key, file, 'some-prefix_' + name];
    }
    }
    });

    Parameters

    • this: T
    • key: string
    • file: File
    • name: string

    Returns [string, File, string]

Jodit PRO

If you like Jodit - try Jodit PRO