Page layout with full body editor #4661
ansyk
started this conversation in
Show and tell
Replies: 2 comments
-
Similar to #4660 (comment) I thought we could calculate the height of the editor via CSS. But, unfortunately, the editor's "height" props don't seem to support ui.context.client.content.classes('p-0')
ui.editor(value='<br>'.join(f'Line {i}' for i in range(100))) \
.classes('w-full h-[calc(100vh-6rem)]').props('height="100%"')
with ui.header().classes('h-12'):
ui.label('HEADER')
with ui.left_drawer(top_corner=True, bottom_corner=True, bordered=True):
ui.label('LEFT DRAWER')
with ui.right_drawer(bordered=True):
ui.label('RIGHT DRAWER')
with ui.footer().classes('h-12'):
ui.label('FOOTER') Custom CSS to the rescue! ui.add_css('.q-editor__content { height: calc(100% - 2rem); }') You need to remove |
Beta Was this translation helpful? Give feedback.
0 replies
-
Check #4660 (reply in thread) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Following #4660 relating to moving the vertical scrollbar to the left of the right drawer, I wanted an ui.editor, which fills out the complete body of the standard page layout. Here, I ran into the problem that the header of the editor was scrolled out of sight, when I used a scrollarea. This is problematic, when the content of the editor window is rather long.
My solution is
Here it took me long to find out that there are the not documented props min-height and max-height of the quasar editor, which set the height of the content area of the editor. It would be interesting, whether there is a solution without JavaScript.
It is also interesting to note that the scrollbar of the editor is not the nice one of the quasar framework but the standard one of the browser. This seems to be a problem in the quasar framework.
Beta Was this translation helpful? Give feedback.
All reactions