mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
apply ignorePreviewPointerEvents
This commit is contained in:
@@ -56,6 +56,8 @@ class MarkdownSplitEditor extends React.Component {
|
||||
const { config, storageKey } = this.props
|
||||
const { value } = this.state
|
||||
const storage = findStorage(storageKey)
|
||||
const previewStyle = {}
|
||||
if (this.props.ignorePreviewPointerEvents) previewStyle.pointerEvents = 'none'
|
||||
return (
|
||||
<div styleName='root'>
|
||||
<CodeEditor
|
||||
@@ -72,6 +74,7 @@ class MarkdownSplitEditor extends React.Component {
|
||||
onChange={e => this.handleOnChange(e)}
|
||||
/>
|
||||
<MarkdownPreview
|
||||
style={previewStyle}
|
||||
styleName='preview'
|
||||
theme={config.ui.theme}
|
||||
keyMap={config.editor.keyMap}
|
||||
|
||||
@@ -283,6 +283,7 @@ class MarkdownNoteDetail extends React.Component {
|
||||
value={note.content}
|
||||
storageKey={note.storage}
|
||||
onChange={(e) => this.handleChange(e)}
|
||||
ignorePreviewPointerEvents={ignorePreviewPointerEvents}
|
||||
/>
|
||||
} else {
|
||||
return <MarkdownEditor
|
||||
|
||||
Reference in New Issue
Block a user