1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

make splitMode Default

This commit is contained in:
Sosuke Suzuki
2017-12-20 18:11:01 +09:00
parent d86935acaa
commit df13ca3c92
2 changed files with 6 additions and 6 deletions

View File

@@ -276,9 +276,10 @@ class MarkdownNoteDetail extends React.Component {
renderEditor () {
const { config, ignorePreviewPointerEvents } = this.props
const { note } = this.state
if (this.state.editorType === 'SPLIT') {
return <MarkdownSplitEditor
if (this.state.editorType === 'EDITOR_PREVIEW') {
return <MarkdownEditor
ref='content'
styleName='body-noteEditor'
config={config}
value={note.content}
storageKey={note.storage}
@@ -286,9 +287,8 @@ class MarkdownNoteDetail extends React.Component {
ignorePreviewPointerEvents={ignorePreviewPointerEvents}
/>
} else {
return <MarkdownEditor
return <MarkdownSplitEditor
ref='content'
styleName='body-noteEditor'
config={config}
value={note.content}
storageKey={note.storage}
@@ -359,7 +359,7 @@ class MarkdownNoteDetail extends React.Component {
<div styleName={editorType === 'SPLIT' ? 'active' : 'non-active'} onClick={() => this.handleSwitchMode('SPLIT')}>
<img styleName='item-star' src='../resources/icon/icon-mode-split-on.svg' />
</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' />
</div>
</div>

View File

@@ -36,7 +36,7 @@ export const DEFAULT_CONFIG = {
indentSize: '2',
switchPreview: 'BLUR', // Available value: RIGHTCLICK, BLUR
scrollPastEnd: false,
type: 'default'
type: 'SPLIT'
},
preview: {
fontSize: '14',