mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 10:16:26 +00:00
moved custom markdown checkbox & fixed codemirror size
This commit is contained in:
@@ -29,7 +29,7 @@ class UiTab extends React.Component {
|
|||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
CodeMirror.autoLoadMode(this.codeMirrorInstance.getCodeMirror(), 'javascript')
|
CodeMirror.autoLoadMode(this.codeMirrorInstance.getCodeMirror(), 'javascript')
|
||||||
CodeMirror.autoLoadMode(this.customCSSCM.getCodeMirror(), 'css')
|
CodeMirror.autoLoadMode(this.customCSSCM.getCodeMirror(), 'css')
|
||||||
this.customCSSCM.getCodeMirror().setSize(null, '250px')
|
this.customCSSCM.getCodeMirror().setSize('400px', '400px')
|
||||||
this.handleSettingDone = () => {
|
this.handleSettingDone = () => {
|
||||||
this.setState({UiAlert: {
|
this.setState({UiAlert: {
|
||||||
type: 'success',
|
type: 'success',
|
||||||
@@ -574,26 +574,20 @@ class UiTab extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div styleName='group-checkBoxSection'>
|
<div styleName='group-section'>
|
||||||
<label>
|
<div styleName='group-section-label'>
|
||||||
|
{i18n.__('Custom CSS')}
|
||||||
|
</div>
|
||||||
|
<div styleName='group-section-control'>
|
||||||
<input onChange={(e) => this.handleUIChange(e)}
|
<input onChange={(e) => this.handleUIChange(e)}
|
||||||
checked={config.preview.allowCustomCSS}
|
checked={config.preview.allowCustomCSS}
|
||||||
ref='previewAllowCustomCSS'
|
ref='previewAllowCustomCSS'
|
||||||
type='checkbox'
|
type='checkbox'
|
||||||
/>
|
/>
|
||||||
{i18n.__('Allow custom CSS for preview')}
|
{i18n.__('Allow custom CSS for preview')}
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section'>
|
|
||||||
<div styleName='group-section-label'>
|
|
||||||
{i18n.__('Custom CSS')}
|
|
||||||
</div>
|
|
||||||
<div styleName='group-section-control'>
|
|
||||||
<div styleName='code-mirror'>
|
|
||||||
<ReactCodeMirror onChange={e => this.handleUIChange(e)} ref={e => (this.customCSSCM = e)} value={config.preview.customCSS} options={{ lineNumbers: true, mode: 'css', theme: codemirrorTheme }} />
|
<ReactCodeMirror onChange={e => this.handleUIChange(e)} ref={e => (this.customCSSCM = e)} value={config.preview.customCSS} options={{ lineNumbers: true, mode: 'css', theme: codemirrorTheme }} />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div styleName='group-control'>
|
<div styleName='group-control'>
|
||||||
<button styleName='group-control-rightButton'
|
<button styleName='group-control-rightButton'
|
||||||
|
|||||||
Reference in New Issue
Block a user