1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-14 02:06:29 +00:00

fixed width of custom markdown editor

This commit is contained in:
Nguyễn Việt Hưng
2018-06-02 11:30:12 +07:00
parent fc88a49acc
commit 2e3f6e39f6

View File

@@ -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, '300px') this.customCSSCM.getCodeMirror().setSize(null, '250px')
this.handleSettingDone = () => { this.handleSettingDone = () => {
this.setState({UiAlert: { this.setState({UiAlert: {
type: 'success', type: 'success',
@@ -589,7 +589,9 @@ class UiTab extends React.Component {
{i18n.__('Custom CSS')} {i18n.__('Custom CSS')}
</div> </div>
<div styleName='group-section-control'> <div styleName='group-section-control'>
<ReactCodeMirror onChange={e => this.handleUIChange(e)} ref={e => (this.customCSSCM = e)} value={config.preview.customCSS} options={{ lineNumbers: true, mode: 'css', theme: codemirrorTheme }} /> <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 }} />
</div>
</div> </div>
</div> </div>