mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 17:56:25 +00:00
show editor first if markdown article has empty content
This commit is contained in:
@@ -102,7 +102,7 @@ export default class ArticleDetail extends React.Component {
|
||||
openShareDropdown: false
|
||||
}
|
||||
|
||||
if (props.activeArticle != null && props.activeArticle.mode === 'markdown') this.state.previewMode = true
|
||||
if (props.activeArticle != null && props.activeArticle.content.trim().length > 0 && props.activeArticle.mode === 'markdown') this.state.previewMode = true
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
@@ -127,7 +127,7 @@ export default class ArticleDetail extends React.Component {
|
||||
previewMode: false
|
||||
}
|
||||
|
||||
if (article.mode === 'markdown') {
|
||||
if (article.content.trim().length > 0 && article.mode === 'markdown') {
|
||||
nextState.previewMode = true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user