mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
make splitMode Default
This commit is contained in:
@@ -276,9 +276,10 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
renderEditor () {
|
renderEditor () {
|
||||||
const { config, ignorePreviewPointerEvents } = this.props
|
const { config, ignorePreviewPointerEvents } = this.props
|
||||||
const { note } = this.state
|
const { note } = this.state
|
||||||
if (this.state.editorType === 'SPLIT') {
|
if (this.state.editorType === 'EDITOR_PREVIEW') {
|
||||||
return <MarkdownSplitEditor
|
return <MarkdownEditor
|
||||||
ref='content'
|
ref='content'
|
||||||
|
styleName='body-noteEditor'
|
||||||
config={config}
|
config={config}
|
||||||
value={note.content}
|
value={note.content}
|
||||||
storageKey={note.storage}
|
storageKey={note.storage}
|
||||||
@@ -286,9 +287,8 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
ignorePreviewPointerEvents={ignorePreviewPointerEvents}
|
ignorePreviewPointerEvents={ignorePreviewPointerEvents}
|
||||||
/>
|
/>
|
||||||
} else {
|
} else {
|
||||||
return <MarkdownEditor
|
return <MarkdownSplitEditor
|
||||||
ref='content'
|
ref='content'
|
||||||
styleName='body-noteEditor'
|
|
||||||
config={config}
|
config={config}
|
||||||
value={note.content}
|
value={note.content}
|
||||||
storageKey={note.storage}
|
storageKey={note.storage}
|
||||||
@@ -359,7 +359,7 @@ class MarkdownNoteDetail extends React.Component {
|
|||||||
<div styleName={editorType === 'SPLIT' ? 'active' : 'non-active'} onClick={() => this.handleSwitchMode('SPLIT')}>
|
<div styleName={editorType === 'SPLIT' ? 'active' : 'non-active'} onClick={() => this.handleSwitchMode('SPLIT')}>
|
||||||
<img styleName='item-star' src='../resources/icon/icon-mode-split-on.svg' />
|
<img styleName='item-star' src='../resources/icon/icon-mode-split-on.svg' />
|
||||||
</div>
|
</div>
|
||||||
<div styleName={editorType === 'DEFAULT' ? 'active' : 'non-active'} onClick={() => this.handleSwitchMode('DEFAULT')}>
|
<div styleName={editorType === 'EDITOR_PREVIEW' ? 'active' : 'non-active'} onClick={() => this.handleSwitchMode('EDITOR_PREVIEW')}>
|
||||||
<img styleName='item-star' src='../resources/icon/icon-mode-markdown-off.svg' />
|
<img styleName='item-star' src='../resources/icon/icon-mode-markdown-off.svg' />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ export const DEFAULT_CONFIG = {
|
|||||||
indentSize: '2',
|
indentSize: '2',
|
||||||
switchPreview: 'BLUR', // Available value: RIGHTCLICK, BLUR
|
switchPreview: 'BLUR', // Available value: RIGHTCLICK, BLUR
|
||||||
scrollPastEnd: false,
|
scrollPastEnd: false,
|
||||||
type: 'default'
|
type: 'SPLIT'
|
||||||
},
|
},
|
||||||
preview: {
|
preview: {
|
||||||
fontSize: '14',
|
fontSize: '14',
|
||||||
|
|||||||
Reference in New Issue
Block a user