Skip to content

Commit

Permalink
Merge pull request #10566 from ckeditor/ck/10422
Browse files Browse the repository at this point in the history
Fix (source-editing): Improve source editing textarea field size and scrolling behaviour. Closes #10422.
  • Loading branch information
Reinmar authored Oct 4, 2021
2 parents e0ff106 + 4b88459 commit 3decb16
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
}

.ck-source-editing-area {
overflow: scroll;
max-height: 700px;
border-bottom: 1px solid var(--ck-color-base-border);
}

.live-snippet .ck-source-editing-area textarea {
width: 100%;
overflow: auto;
}
9 changes: 6 additions & 3 deletions packages/ckeditor5-source-editing/theme/sourceediting.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
@import "@ckeditor/ckeditor5-theme-lark/theme/mixins/_shadow.css";

.ck-source-editing-area {
display: inline-grid;
width: 100%;
position: relative;
}

.ck-source-editing-area::after,
.ck-source-editing-area textarea {
grid-area: 1/1;
padding: var(--ck-spacing-large);
margin: 0;
border: 1px solid transparent;
Expand All @@ -27,12 +25,17 @@
.ck-source-editing-area::after {
content: attr(data-value) " ";
visibility: hidden;
display: block;
}

.ck-source-editing-area textarea {
position: absolute;
width: 100%;
height: 100%;
resize: none;
outline: none;
overflow: hidden;
box-sizing: border-box;

border-color: var(--ck-color-base-border);

Expand Down

0 comments on commit 3decb16

Please sign in to comment.