You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+30-9Lines changed: 30 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -67,20 +67,24 @@ simplemde.value("This text will appear in the editor");
67
67
68
68
## Configuration
69
69
70
-
-**autoDownloadFontAwesome**: If set to `true`, force downloads Font Awesome (used for icons). If set to false, prevents downloading. Defaults to `undefined`, which will intelligently check whether Font Awesome has already been included, then download accordingly.
70
+
-**autoDownloadFontAwesome**: If set to `true`, force downloads Font Awesome (used for icons). If set to `false`, prevents downloading. Defaults to `undefined`, which will intelligently check whether Font Awesome has already been included, then download accordingly.
71
71
-**autofocus**: If set to `true`, autofocuses the editor. Defaults to `false`.
72
72
-**autosave**: *Saves the text that's being written and will load it back in the future. It will forget the text when the form it's contained in is submitted.*
73
73
-**enabled**: If set to `true`, autosave the text. Defaults to `false`.
74
74
-**delay**: Delay between saves, in milliseconds. Defaults to `10000` (10s).
75
-
-**unique_id**: You must set a unique string identifier so that SimpleMDE can autosave. Something that separates this from other instances of SimpleMDE elsewhere on your website.
75
+
-**uniqueId**: You must set a unique string identifier so that SimpleMDE can autosave. Something that separates this from other instances of SimpleMDE elsewhere on your website.
76
+
-**blockStyles**: Customize how certain buttons that style blocks of text behave.
77
+
-**bold** Can be set to `**` or `__`. Defaults to `**`.
78
+
-**italic** Can be set to `*` or `_`. Defaults to `*`.
76
79
-**element**: The DOM element for the textarea to use. Defaults to the first textarea on the page.
77
-
-**hideIcons**: An array of icon names to hide. Can be used to hide specific icons without completely customizing the toolbar.
80
+
-**hideIcons**: An array of icon names to hide. Can be used to hide specific icons shown by default without completely customizing the toolbar.
78
81
-**indentWithTabs**: If set to `false`, indent using spaces instead of tabs. Defaults to `true`.
79
82
-**initialValue**: If set, will customize the initial value of the editor.
80
83
-**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
84
- horizontalRule
82
85
- image
83
86
- link
87
+
- table
84
88
-**lineWrapping**: If set to `false`, disable line wrapping. Defaults to `true`.
85
89
-**parsingConfig**: Adjust settings for parsing the Markdown during editing (not previewing).
86
90
-**allowAtxHeaderWithoutSpace**: If set to `true`, will render headers without a space after the `#`. Defaults to `false`.
@@ -90,6 +94,7 @@ simplemde.value("This text will appear in the editor");
90
94
-**renderingConfig**: Adjust settings for parsing the Markdown during previewing (not editing).
91
95
-**singleLineBreaks**: If set to `false`, disable parsing GFM single line breaks. Defaults to `true`.
92
96
-**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. For example, include the script and the CSS files like:<br>`<script src="https://cdn.jsdelivr.net/highlight.js/latest/highlight.min.js"></script>`<br>`<link rel="stylesheet" href="https://cdn.jsdelivr.net/highlight.js/latest/styles/github.min.css">`
97
+
-**showIcons**: An array of icon names to show. Can be used to show specific icons hidden by default without completely customizing the toolbar.
93
98
-**spellChecker**: If set to `false`, disable the spell checker. Defaults to `true`.
94
99
-**status**: If set to `false`, hide the status bar. Defaults to `true`.
95
100
- Optionally, you can set an array of status bar elements to include, and in what order.
@@ -103,9 +108,13 @@ var simplemde = new SimpleMDE({
103
108
autofocus:true,
104
109
autosave: {
105
110
enabled:true,
106
-
unique_id:"MyUniqueID",
111
+
uniqueId:"MyUniqueID",
107
112
delay:1000,
108
113
},
114
+
blockStyles: {
115
+
bold:"__",
116
+
italic:"_"
117
+
},
109
118
element:document.getElementById("MyID"),
110
119
hideIcons: ["guide", "heading"],
111
120
indentWithTabs:false,
@@ -114,6 +123,7 @@ var simplemde = new SimpleMDE({
114
123
horizontalRule: ["", "\n\n-----\n\n"],
115
124
image: [""],
116
125
link: ["[", "](http://)"],
126
+
table: ["", "\n\n| Column 1 | Column 2 | Column 3 |\n| -------- | -------- | -------- |\n| Text | Text | Text |\n\n"],
117
127
},
118
128
lineWrapping:false,
119
129
parsingConfig: {
@@ -135,6 +145,7 @@ var simplemde = new SimpleMDE({
0 commit comments