mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 09:46:22 +00:00
Fix for #535:
- hide/show code editor based on markdown editor state (could be CODE or PREVIEW); - changed styles for code editor;
This commit is contained in:
@@ -221,7 +221,10 @@ class MarkdownEditor extends React.Component {
|
||||
onKeyDown={(e) => this.handleKeyDown(e)}
|
||||
onKeyUp={(e) => this.handleKeyUp(e)}
|
||||
>
|
||||
<CodeEditor styleName='codeEditor'
|
||||
<CodeEditor styleName={this.state.status === 'CODE'
|
||||
? 'codeEditor'
|
||||
: 'codeEditor--hide'
|
||||
}
|
||||
ref='code'
|
||||
mode='GitHub Flavored Markdown'
|
||||
value={value}
|
||||
|
||||
@@ -4,8 +4,14 @@
|
||||
.codeEditor
|
||||
absolute top bottom left right
|
||||
|
||||
.hide
|
||||
z-index 0
|
||||
opacity 0
|
||||
pointer-events none
|
||||
|
||||
.codeEditor--hide
|
||||
@extend .codeEditor
|
||||
@extend .hide
|
||||
|
||||
.preview
|
||||
display block
|
||||
@@ -17,7 +23,5 @@
|
||||
|
||||
.preview--hide
|
||||
@extend .preview
|
||||
z-index 0
|
||||
opacity 0
|
||||
pointer-events none
|
||||
@extend .hide
|
||||
|
||||
|
||||
Reference in New Issue
Block a user