Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editor disappears after pasting large inputs [Android] #335

Open
Sen-442b opened this issue Sep 13, 2023 · 2 comments
Open

Editor disappears after pasting large inputs [Android] #335

Sen-442b opened this issue Sep 13, 2023 · 2 comments

Comments

@Sen-442b
Copy link

The rich text editor I am using disappears when I keep adding content to it. The default behavior I want is for it to display a scrollbar when the content overflows the intended height, which is the full screen.

screen-20230914-001552.mp4

Do let me know what changes I need to make to achieve the intended behavior

const Component = () => {
  return (
   <SafeAreaView style={styles.container}>
      <ScrollView>
        <KeyboardAvoidingView
          behavior={Platform.OS === "ios" ? "padding" : "height"}
          style={{ flex: 1 }}
        >
          <RichEditor
            onChange={handleEditorChange}
            androidHardwareAccelerationDisabled={true}
            ref={richText}
            editorStyle={styles.pad}
   
            placeholder="Rich Text Editor"
            pasteAsPlainText={true}
          />
        </KeyboardAvoidingView>
      </ScrollView>

      <Text>Page: {pageLength}</Text>
      <RichToolbar
        editor={richText}
        actions={[
          actions.setBold,
          actions.setItalic,
          actions.insertBulletsList,
          actions.insertOrderedList,
          actions.setUnderline,
        ]}
      />
    </SafeAreaView>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    paddingTop: Platform.OS === "android" ? StatusBar.currentHeight : 0,
    paddingLeft: 10,
  },
  pad: {
    backgroundColor: "red",
  },
});



@Dmytraw
Copy link

Dmytraw commented Sep 27, 2023

Same issue.

@pratheekgv19
Copy link

still same issue, it goes blank when we copy paste large text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants