2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-22 17:34:37 -06:00

Updated readme and easymde.d.ts to reflect escapePrompURLs option

This commit is contained in:
Zignature 2022-01-15 23:56:27 +01:00
parent c174b6f149
commit 47f1e4f892
2 changed files with 3 additions and 1 deletions

View File

@ -165,6 +165,7 @@ easyMDE.value('New input for **EasyMDE**');
- **previewClass**: A string or array of strings that will be applied to the preview screen when activated. Defaults to `"editor-preview"`.
- **previewRender**: Custom function for parsing the plaintext Markdown and returning HTML. Used when user previews.
- **promptURLs**: If set to `true`, a JS alert window appears asking for the link or image URL. Defaults to `false`.
- **escapePromptURLs**: If set to `true`, urlencodes and escapes links entered via the JS prompt to prevent malformed Markdown rendered links. Only works when `promptURLs` is set to `true`. Defaults to `false`.
- **promptTexts**: Customize the text used to prompt for URLs.
- **image**: The text to use when prompting for an image's URL. Defaults to `URL of the image:`.
- **link**: The text to use when prompting for a link's URL. Defaults to `URL for the link:`.
@ -276,6 +277,7 @@ const editor = new EasyMDE({
return "Loading...";
},
promptURLs: true,
escapePromptURLs: true,
promptTexts: {
image: "Custom prompt for URL:",
link: "Custom prompt for URL:",

2
types/easymde.d.ts vendored
View File

@ -197,7 +197,7 @@ declare namespace EasyMDE {
previewImagesInEditor?: boolean;
previewRender?: (markdownPlaintext: string, previewElement: HTMLElement) => string;
promptURLs?: boolean;
escapeURLs?: boolean;
escapePromptURLs?: boolean;
renderingConfig?: RenderingOptions;
shortcuts?: Shortcuts;
showIcons?: ReadonlyArray<ToolbarButton>;