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 { config, storageKey } = this.props
|
||||||
const { value } = this.state
|
const { value } = this.state
|
||||||
const storage = findStorage(storageKey)
|
const storage = findStorage(storageKey)
|
||||||
|
const previewStyle = {}
|
||||||
|
if (this.props.ignorePreviewPointerEvents) previewStyle.pointerEvents = 'none'
|
||||||
return (
|
return (
|
||||||
<div styleName='root'>
|
<div styleName='root'>
|
||||||
<CodeEditor
|
<CodeEditor
|
||||||
@@ -72,6 +74,7 @@ class MarkdownSplitEditor extends React.Component {
|
|||||||
onChange={e => this.handleOnChange(e)}
|
onChange={e => this.handleOnChange(e)}
|
||||||
/>
|
/>
|
||||||
<MarkdownPreview
|
<MarkdownPreview
|
||||||
|
style={previewStyle}
|
||||||
styleName='preview'
|
styleName='preview'
|
||||||
theme={config.ui.theme}
|
theme={config.ui.theme}
|
||||||
keyMap={config.editor.keyMap}
|
keyMap={config.editor.keyMap}
|
||||||
|
|||||||
@@ -283,6 +283,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
value={note.content}
|
value={note.content}
|
||||||
storageKey={note.storage}
|
storageKey={note.storage}
|
||||||
onChange={(e) => this.handleChange(e)}
|
onChange={(e) => this.handleChange(e)}
|
||||||
|
ignorePreviewPointerEvents={ignorePreviewPointerEvents}
|
||||||
/>
|
/>
|
||||||
} else {
|
} else {
|
||||||
return <MarkdownEditor
|
return <MarkdownEditor
|
||||||
|
|||||||
Reference in New Issue
Block a user