Merge pull request #394 from netlify/text-editor-scroll

prevent rte scroll, improve code display
This commit is contained in:
Shawn Erquhart 2017-05-03 17:10:24 -04:00 committed by GitHub
commit d0ee10a681
3 changed files with 20 additions and 2 deletions

View File

@ -24,3 +24,8 @@
display: block;
pointer-events: none;
}
.textarea {
overflow: hidden;
resize: none;
}

View File

@ -339,6 +339,7 @@ export default class RawEditor extends React.Component {
</Sticky>
<TextareaAutosize
inputRef={this.handleRef}
className={styles.textarea}
value={this.props.value || ''}
onKeyDown={this.handleKey}
onChange={this.handleChange}

View File

@ -27,6 +27,7 @@
font-size: 1.8rem;
}
& p {
margin-top: 20px;
margin-bottom: 20px;
}
& hr {
@ -69,11 +70,22 @@
background-color: var(--controlBGColor);
padding: 12px;
border-radius: 0 0 var(--borderRadius) var(--borderRadius);
overflow-x: auto;
overflow: hidden;
& ul {
& ul,
& ol {
padding-left: 20px;
}
& pre > code {
display: block;
width: 100%;
overflow-y: auto;
background-color: #000;
color: #ccc;
border-radius: var(--borderRadius);
padding: 10px;
}
}
& .ProseMirror-content {