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

Only value received is '"[{insert: \n}]"' #1579

Closed
1 task done
matboy82 opened this issue Dec 8, 2023 · 5 comments
Closed
1 task done

Only value received is '"[{insert: \n}]"' #1579

matboy82 opened this issue Dec 8, 2023 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@matboy82
Copy link

matboy82 commented Dec 8, 2023

Is there an existing issue for this?

The question

I'm a noob at flutter so maybe I'm just all screwed up, but when I call _controller.document.toDelta() to get what I typed in, I only ever get the insert key, I've tried toPlainText() and even converting via toHtml (that returned

<br/

).

My widget:

import 'package:flutter/material.dart';
import 'package:flutter_quill/flutter_quill.dart';
import 'package:quill_html_converter/quill_html_converter.dart';

class RichTextEditor extends StatelessWidget {
  RichTextEditor({super.key});

  final QuillController _controller = QuillController.basic();
 
  @override
  Widget build(BuildContext context) {
    return QuillProvider(
      configurations: QuillConfigurations(
        controller: _controller,
        sharedConfigurations: const QuillSharedConfigurations(
          locale: Locale('en', 'US'),
        ),
      ),
      child: ListView(
      shrinkWrap: true,
      children: [
        const QuillToolbar(),
        
        QuillEditor.basic(
            configurations: const QuillEditorConfigurations(
              readOnly: false,
              minHeight: 200,
              maxHeight: 500,
              showCursor: true,
              )
            ),
      ],
    ),
    );
  }

String getJsonDocument() {
  var delta = _controller.document.toDelta().toHtml();
  return delta;
}

  void dispose() {
    _controller.dispose();
  }
}
@matboy82 matboy82 added the help wanted Extra attention is needed label Dec 8, 2023
@singerdmx
Copy link
Owner

Hello there, on behalf the Flutter Quill Team I would like to thank you for opening your first issue. Your inputs and insights are valuable in shaping a stable and reliable version for all our users. Thank you for being part of the open-source community!

@EchoEllet
Copy link
Collaborator

Hi, thank you for the report, can you explain what you mean by only insert key?? can you send us the result and input? some images will help us understand the question

@matboy82
Copy link
Author

matboy82 commented Dec 8, 2023

Thank you for responding fast! I made the change, but still getting just the insert.

debug

@matboy82
Copy link
Author

matboy82 commented Dec 9, 2023

Invite sent, thank you!

@CatHood0
Copy link
Collaborator

I will close because was no updated since 2023. Reopen this issue if still persisting

Repository owner deleted a comment from matboy82 Sep 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants