@@ -9,7 +9,7 @@ import TextShortcutsEditorSrc from '!!raw-loader!@site/src/examples/TextShortcut
99# Text shortcuts
1010
1111Text shortcuts let users format as they type, the way Markdown editors do -
12- typing ` # ` turns a line into a heading, wrapping a word in ` ** ` makes it bold.
12+ typing ` '# ' ` turns a line into a heading, wrapping a word in ` ** ` makes it bold.
1313You configure them with the ` textShortcuts ` prop, an array that maps a ` trigger `
1414string to a ` style ` :
1515
@@ -35,7 +35,7 @@ things:
3535- ** Paragraph shortcuts** (` h1 ` –` h6 ` , ` blockquote ` , ` codeblock ` ,
3636 ` unordered_list ` , ` ordered_list ` , ` checkbox_list ` ) fire at the ** start of a
3737 paragraph** . The trigger is the prefix you type before the line's content -
38- e.g. ` # ` for a heading, ` - ` for a bulleted list. Since a paragraph can only hold
38+ e.g. ` '# ' ` for a heading, ` '- ' ` for a bulleted list. Since a paragraph can only hold
3939 one paragraph style, these only fire on a ** plain** paragraph: if the line is
4040 already a heading or a list item, typing the prefix does nothing.
4141
@@ -68,8 +68,8 @@ array (`textShortcuts={[]}`) disables shortcuts altogether.
6868
6969## Try it out
7070
71- The editor below wires up one shortcut of each kind - a paragraph one (` # ` → H1)
72- and an inline one (` ** ` → bold). Start a line with ` # ` and watch it become a
71+ The editor below wires up one shortcut of each kind - a paragraph one (` '# ' ` → H1)
72+ and an inline one (` ** ` → bold). Start a line with ` '# ' ` and watch it become a
7373heading, then wrap a word in ` **stars** ` to bold it.
7474
7575<InteractiveExample src = { TextShortcutsEditorSrc } component = { TextShortcutsEditor } />
0 commit comments