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

How Display Quill Content Without Extra Line or Space at the End #436

Open
Abolfazlnezami2000 opened this issue Nov 4, 2024 · 0 comments

Comments

@Abolfazlnezami2000
Copy link

I am encountering an issue where the Quill editor always shows an extra line or space at the end. When I save the editor content and try to display it, I receive an output with {"insert": "\n"} at the end.
If I attempt to remove this, I encounter the error: "Invalid document delta. Document delta must always end with a line-break."

How can I display the Quill editor content without this extra spacing at the end?

image

Steps to Reproduce

code :

@override
Widget build(BuildContext context) {
  final controller = FleatherController();
  final document = json.decode(data.descriptionField!.getLocalizedStr(App.appLocale)) as List<dynamic>;
  controller.compose(ParchmentDocument.fromJson(document).toDelta());
  return FleatherEditor(
    controller: controller,
    readOnly: true,
    showCursor: false,
  );
}

Environment

  • Flutter version : 3.24.3
  • Fleather version 1.19.0

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.24.3, on macOS 15.1 24B83 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 16.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2024.2)
[✓] VS Code (version 1.95.1)
[✓] Connected device (5 available)
[✓] Network resources

• No issues found!

Logs

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

1 participant