Skip to content

Commit fdcd613

Browse files
author
Wes Cossick
committed
Document new option
1 parent b1505af commit fdcd613

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,14 @@ simplemde.value("This text will appear in the editor");
7777
- **hideIcons**: An array of icon names to hide. Can be used to hide specific icons without completely customizing the toolbar.
7878
- **indentWithTabs**: If set to `false`, indent using spaces instead of tabs. Defaults to `true`.
7979
- **initialValue**: If set, will customize the initial value of the editor.
80+
- **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://)"]`.
81+
- horizontalRule
82+
- image
83+
- link
8084
- **lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`.
8185
- **parsingConfig**: Adjust settings for parsing the Markdown during editing (not previewing).
82-
- **allowAtxHeaderWithoutSpace**: If set to `true`, will render headers without a space after the `#`. Defaults to `false`.
83-
- **strikethrough**: If set to `false`, will not process GFM strikethrough syntax. Defaults to `true`.
86+
- **allowAtxHeaderWithoutSpace**: If set to `true`, will render headers without a space after the `#`. Defaults to `false`.
87+
- **strikethrough**: If set to `false`, will not process GFM strikethrough syntax. Defaults to `true`.
8488
- **underscoresBreakWords**: If set to `true`, let underscores be a delimiter for separating words. Defaults to `false`.
8589
- **previewRender**: Custom function for parsing the plaintext Markdown and returning HTML. Used when user previews.
8690
- **renderingConfig**: Adjust settings for parsing the Markdown during previewing (not editing).
@@ -105,6 +109,11 @@ var simplemde = new SimpleMDE({
105109
hideIcons: ["guide", "heading"],
106110
indentWithTabs: false,
107111
initialValue: "Hello world!",
112+
insertTexts: {
113+
horizontalRule: ["", "\n\n-----\n\n"],
114+
image: ["![](http://", ")"],
115+
link: ["[", "](http://)"],
116+
},
108117
lineWrapping: false,
109118
parsingConfig: {
110119
allowAtxHeaderWithoutSpace: true,

0 commit comments

Comments
 (0)