This is an automated email from the ASF dual-hosted git repository.

robin0716 pushed a commit to branch refactor/editor
in repository https://gitbox.apache.org/repos/asf/incubator-answer.git


The following commit(s) were added to refs/heads/refactor/editor by this push:
     new 8497f6b6 refactor(ui): Refactor editor theme and add line wrapping 
functionality
8497f6b6 is described below

commit 8497f6b65e80d8d160a2c7473312da727d25e643
Author: robin <[email protected]>
AuthorDate: Tue Apr 16 15:48:30 2024 +0800

    refactor(ui): Refactor editor theme and add line wrapping functionality
---
 ui/src/components/Editor/utils/index.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ui/src/components/Editor/utils/index.ts 
b/ui/src/components/Editor/utils/index.ts
index bf273dd4..e39e3e91 100644
--- a/ui/src/components/Editor/utils/index.ts
+++ b/ui/src/components/Editor/utils/index.ts
@@ -83,7 +83,6 @@ export const useEditor = ({
     const theme = EditorView.theme(
       {
         '&': {
-          width: '100%',
           height: '100%',
         },
         '&.cm-focused': {
@@ -111,6 +110,7 @@ export const useEditor = ({
         }),
         theme,
         placeholder(placeholderText),
+        EditorView.lineWrapping,
       ],
     });
 

Reply via email to