Only value received is '"[{insert: \n}]"'
Is there an existing issue for this?
- [X] I have searched the existing issues
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();
}
}
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!
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
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
It looks like a json key, debug output from the call is [{insert:
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
It looks like a json key, debug output from the call is
[{insert:![]()
![]()
You should use jsonEncode instead of toString
Thank you for responding fast! I made the change, but still getting just the insert.
Thank you for responding fast! I made the change, but still getting just the insert.
Can you send me the GitHub repo so we can investigate it further?
Invite sent, thank you!