Type Parameters

  • T

Hierarchy

  • IUploaderOptions

Properties

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

Type declaration

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

Type declaration

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

      • this: T
      • requestData: any

      Returns string | false

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

Type declaration

    • (this, e): void
    • Parameters

      Returns void

filesVariableName: ((i) => string)

Type declaration

    • (i): string
    • Parameters

      • i: number

      Returns string

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

Type declaration

    • (this, resp): string
    • Parameters

      Returns string

headers?: null | IDictionary<string> | ((this) => CanPromise<null | IDictionary<string>>)

Type declaration

imagesExtensions: string[]

List of extensions for images

Default

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

Example

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

Type declaration

    • (this, resp): boolean
    • Parameters

      Returns boolean

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

Type declaration

    • (this, formData): any
    • Parameters

      Returns any

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

Type declaration

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

Type declaration

url: string | ((request) => string)

Type declaration

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