1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-15 10:46:32 +00:00

add YAML front matter when exporting

This commit is contained in:
Baptiste Augrain
2018-11-15 22:48:14 +01:00
parent 168fe212f5
commit c796b3b30e
18 changed files with 639 additions and 382 deletions

View File

@@ -49,6 +49,8 @@ class MarkdownNoteDetail extends React.Component {
this.toggleLockButton = this.handleToggleLockButton.bind(this)
this.generateToc = () => this.handleGenerateToc()
this.getNote = this.getNote.bind(this)
}
focus () {
@@ -319,6 +321,10 @@ class MarkdownNoteDetail extends React.Component {
this.updateNote(note)
}
getNote () {
return this.state.note
}
renderEditor () {
const { config, ignorePreviewPointerEvents } = this.props
const { note } = this.state
@@ -333,6 +339,7 @@ class MarkdownNoteDetail extends React.Component {
noteKey={note.key}
onChange={this.handleUpdateContent.bind(this)}
ignorePreviewPointerEvents={ignorePreviewPointerEvents}
getNote={this.getNote}
/>
} else {
return <MarkdownSplitEditor
@@ -343,6 +350,7 @@ class MarkdownNoteDetail extends React.Component {
noteKey={note.key}
onChange={this.handleUpdateContent.bind(this)}
ignorePreviewPointerEvents={ignorePreviewPointerEvents}
getNote={this.getNote}
/>
}
}