From aa711787b2a7f3ea7b594b57b600b87c654120eb Mon Sep 17 00:00:00 2001 From: Diego Garcia Weber Date: Mon, 7 Mar 2022 10:58:09 -0500 Subject: [PATCH] clarified readme description of parameter, removed extra parantheses from type --- README.md | 2 +- types/easymde.d.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a93009b..dfb6c9a 100644 --- a/README.md +++ b/README.md @@ -144,7 +144,7 @@ easyMDE.value('New input for **EasyMDE**'); - **indentWithTabs**: If set to `false`, indent using spaces instead of tabs. Defaults to `true`. - **initialValue**: If set, will customize the initial value of the editor. - **previewImagesInEditor**: - EasyMDE will show preview of images, `false` by default, preview for images will appear only for images on separate lines. -- **imagesPreviewHandler**: - A custom function for handling the preview of images. Takes the parsed string from the image markdown `![](string)` as argument and returns a string that serves as the `src` attribute of the `` tag in the preview (for ex. as base64). Enables dynamic previewing of images in the frontend without having to upload them to a server. +- **imagesPreviewHandler**: - A custom function for handling the preview of images. Takes the parsed string between the parantheses of the image markdown `![]( )` as argument and returns a string that serves as the `src` attribute of the `` tag in the preview. Enables dynamic previewing of images in the frontend without having to upload them to a server, allows copy-pasting of images to the editor with preview. - **insertTexts**: Customize how certain buttons that insert text behave. Takes an array with two elements. The first element will be the text inserted before the cursor or highlight, and the second element will be inserted after. For example, this is the default link value: `["[", "](http://)"]`. - horizontalRule - image diff --git a/types/easymde.d.ts b/types/easymde.d.ts index 3cf165c..927c4b8 100644 --- a/types/easymde.d.ts +++ b/types/easymde.d.ts @@ -195,7 +195,7 @@ declare namespace EasyMDE { placeholder?: string; previewClass?: string | ReadonlyArray; previewImagesInEditor?: boolean; - imagesPreviewHandler?: ((src: string) => string), + imagesPreviewHandler?: (src: string) => string, previewRender?: (markdownPlaintext: string, previewElement: HTMLElement) => string; promptURLs?: boolean; renderingConfig?: RenderingOptions;