diff --git a/README.md b/README.md index d240400..3a7249d 100644 --- a/README.md +++ b/README.md @@ -166,9 +166,9 @@ easyMDE.value('New input for **EasyMDE**'); - **sizeUnits**: A comma-separated list of units used to display messages with human-readable file sizes. Defaults to `b,Kb,Mb`. - **errorMessages**: Errors displayed to the user, using the `errorCallback` option, where `#image_name#`, `#image_size#` and `#image_max_size#` will replaced by their respective values, that can be used for customization or internationalization: - **noFileGiven**: The server did not receive any file from the user. Defaults to `You must select a file.`. - - **imageTypeNotAllowed**: The user send a file type which doesn't match the `imageAccept` list, or the server returned this error code. Defaults to `This image type is not allowed.`. - - **imageTooLarge**: The size of the image being imported is bigger than the `imageMaxSize`, or if the server returned this error code. Defaults to `Image #image_name# is too big (#image_size#).\nMaximum file size is #image_max_size#.`. - - **imageImportError**: An unexpected error occurred when uploading the image. Defaults to `Something went wrong when uploading the image #image_name#.`. + - **typeNotAllowed**: The user send a file type which doesn't match the `imageAccept` list, or the server returned this error code. Defaults to `This image type is not allowed.`. + - **fileTooLarge**: The size of the image being imported is bigger than the `imageMaxSize`, or if the server returned this error code. Defaults to `Image #image_name# is too big (#image_size#).\nMaximum file size is #image_max_size#.`. + - **importError**: An unexpected error occurred when uploading the image. Defaults to `Something went wrong when uploading the image #image_name#.`. - **errorCallback**: A callback function used to define how to display an error message. Defaults to `function(errorMessage) {alert(errorMessage);};`. - **renderingConfig**: Adjust settings for parsing the Markdown during previewing (not editing). - **codeSyntaxHighlighting**: If set to `true`, will highlight using [highlight.js](https://github.com/isagalaev/highlight.js). Defaults to `false`. To use this feature you must include highlight.js on your page or pass in using the `hljs` option. For example, include the script and the CSS files like:
``
`` diff --git a/types/easymde-test.ts b/types/easymde-test.ts index b2fc8dc..12b0555 100644 --- a/types/easymde-test.ts +++ b/types/easymde-test.ts @@ -76,9 +76,9 @@ const editorImages = new EasyMDE({ }, errorMessages: { noFileGiven: 'Please select a file', - imageTypeNotAllowed: 'This file type is not allowed!', - imageTooLarge: 'Image too big', - imageImportError: 'Something went oops!', + typeNotAllowed: 'This file type is not allowed!', + fileTooLarge: 'Image too big', + importError: 'Something went oops!', }, errorCallback: (errorMessage) => { console.error(errorMessage); diff --git a/types/easymde.d.ts b/types/easymde.d.ts index 84ba65d..2a7db40 100644 --- a/types/easymde.d.ts +++ b/types/easymde.d.ts @@ -97,9 +97,9 @@ declare namespace EasyMDE { interface ImageErrorTextsOptions { noFileGiven?: string; - imageTypeNotAllowed?: string; - imageTooLarge?: string; - imageImportError?: string; + typeNotAllowed?: string; + fileTooLarge?: string; + importError?: string; } interface Options {