diff options
author | Sébastien Dailly <sebastien@dailly.me> | 2021-12-09 08:53:30 +0100 |
---|---|---|
committer | Sébastien Dailly <sebastien@dailly.me> | 2022-02-07 16:43:33 +0100 |
commit | 62c21c450065c4f5e7b594f32f06d8cd39d2ec55 (patch) | |
tree | d68f381536a19d61ab8063f99f60fb013d2036d2 /editor | |
parent | e20974010f6a6e928ab594167ea677d31a2a6463 (diff) |
Set the html element fit in one pageeditor
Diffstat (limited to 'editor')
-rwxr-xr-x | editor/editor.css | 4 | ||||
-rwxr-xr-x | editor/index.html | 12 |
2 files changed, 10 insertions, 6 deletions
diff --git a/editor/editor.css b/editor/editor.css index c156768..1f3f1a4 100755 --- a/editor/editor.css +++ b/editor/editor.css @@ -302,8 +302,8 @@ li.ProseMirror-selectednode:after { color: black; background-clip: padding-box; border-radius: 4px; - border: 2px solid rgba(0, 0, 0, 0.2); - padding: 5px 0; + border: 1px solid rgba(0, 0, 0, 0.2); + padding-top: 5px 0; margin-bottom: 23px; } diff --git a/editor/index.html b/editor/index.html index da0d39d..226c87a 100755 --- a/editor/index.html +++ b/editor/index.html @@ -21,11 +21,15 @@ <title>Chimrod – Editor</title> <style> + + main { + overflow: hidden; + } + #text-container { - height: 350px; } - .ProseMirror { height: 330px; overflow-y: auto; box-sizing: border-box; -moz-box-sizing: border-box } - textarea { width: 100%; height: 400px; border: 1px solid silver; box-sizing: border-box; padding: 3px 10px; border: none; outline: none } + .ProseMirror { height: calc(100vh - 13ex); overflow-y: auto; box-sizing: border-box; -moz-box-sizing: border-box } + textarea { width: 100%; border: 1px solid silver; box-sizing: border-box; padding: 3px 10px; border: none; outline: none } </style> </head> <body class="light-theme"> @@ -59,7 +63,7 @@ <input type="text" id="title" value="Titre" /> </header> <div> - <div id="text_editor" class="editor" style="margin-bottom: 23px; height: 350px;"></div> + <div id="text_editor" class="editor" style="margin-bottom: 23px; /*height: 350px;*/"></div> <div style="display: none" id="content"> <h3>Hello ProseMirror</h3> |