mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2139 from omnivore-app/fix/web-notebook-handling
Better handling of the tab keypress in notebooks
This commit is contained in:
commit
b92a053f1b
1 changed files with 6 additions and 1 deletions
|
|
@ -11,7 +11,7 @@ import { formattedShortTime } from '../../lib/dateFormatting'
|
|||
import { HStack, SpanBox, VStack } from '../elements/LayoutPrimitives'
|
||||
|
||||
import MarkdownIt from 'markdown-it'
|
||||
import MdEditor from 'react-markdown-editor-lite'
|
||||
import MdEditor, { Plugins } from 'react-markdown-editor-lite'
|
||||
import 'react-markdown-editor-lite/lib/index.css'
|
||||
import ReactMarkdown from 'react-markdown'
|
||||
import throttle from 'lodash/throttle'
|
||||
|
|
@ -29,6 +29,10 @@ import remarkGfm from 'remark-gfm'
|
|||
|
||||
const mdParser = new MarkdownIt()
|
||||
|
||||
MdEditor.use(Plugins.TabInsert, {
|
||||
tabMapValue: 1, // note that 1 means a '\t' instead of ' '.
|
||||
})
|
||||
|
||||
type NoteSectionProps = {
|
||||
placeHolder: string
|
||||
mode: 'edit' | 'preview'
|
||||
|
|
@ -212,6 +216,7 @@ export function MarkdownNote(props: MarkdownNote): JSX.Element {
|
|||
hideMenu: false,
|
||||
}}
|
||||
plugins={[
|
||||
'tab-insert',
|
||||
'header',
|
||||
'font-bold',
|
||||
'font-italic',
|
||||
|
|
|
|||
Loading…
Reference in a new issue