1
0
mirror of https://github.com/BoostIo/Boostnote synced 2026-01-04 04:29:19 +00:00

Merge pull request #1887 from o-3/master

Add configuration to render newlines as <br> or not
This commit is contained in:
Junyoung Choi (Sai)
2018-05-17 01:08:52 +09:00
committed by GitHub
10 changed files with 50 additions and 6 deletions

View File

@@ -56,6 +56,7 @@ export const DEFAULT_CONFIG = {
plantUMLServerAddress: 'http://www.plantuml.com/plantuml',
scrollPastEnd: false,
smartQuotes: true,
breaks: true,
sanitize: 'STRICT' // 'STRICT', 'ALLOW_STYLES', 'NONE'
},
blog: {

View File

@@ -97,6 +97,7 @@ class UiTab extends React.Component {
plantUMLServerAddress: this.refs.previewPlantUMLServerAddress.value,
scrollPastEnd: this.refs.previewScrollPastEnd.checked,
smartQuotes: this.refs.previewSmartQuotes.checked,
breaks: this.refs.previewBreaks.checked,
sanitize: this.refs.previewSanitize.value
}
}
@@ -476,6 +477,16 @@ class UiTab extends React.Component {
Enable smart quotes
</label>
</div>
<div styleName='group-checkBoxSection'>
<label>
<input onChange={(e) => this.handleUIChange(e)}
checked={this.state.config.preview.breaks}
ref='previewBreaks'
type='checkbox'
/>&nbsp;
Render newlines in Markdown paragraphs as &lt;br&gt;
</label>
</div>
<div styleName='group-section'>
<div styleName='group-section-label'>