mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2025-04-24 14:47:13 -04:00
parent
63059ea39d
commit
462daee934
2 changed files with 9 additions and 2 deletions
|
@ -96,6 +96,7 @@ class _DocumentPageState extends State<DocumentPage> {
|
|||
|
||||
Widget _renderAppFlowyEditor(EditorState editorState) {
|
||||
final theme = Theme.of(context);
|
||||
final editorMaxWidth = MediaQuery.of(context).size.width * 0.6;
|
||||
final editor = AppFlowyEditor(
|
||||
editorState: editorState,
|
||||
autoFocus: editorState.document.isEmpty,
|
||||
|
@ -112,8 +113,13 @@ class _DocumentPageState extends State<DocumentPage> {
|
|||
]),
|
||||
);
|
||||
return Expanded(
|
||||
child: SizedBox.expand(
|
||||
child: editor,
|
||||
child: Center(
|
||||
child: Container(
|
||||
constraints: BoxConstraints(
|
||||
maxWidth: editorMaxWidth,
|
||||
),
|
||||
child: editor,
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ EditorStyle customEditorTheme(BuildContext context) {
|
|||
? EditorStyle.dark
|
||||
: EditorStyle.light;
|
||||
editorStyle = editorStyle.copyWith(
|
||||
padding: const EdgeInsets.all(0),
|
||||
textStyle: editorStyle.textStyle?.copyWith(
|
||||
fontFamily: 'poppins',
|
||||
fontSize: _baseFontSize,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue