Description
Is there an existing issue for this?
- I have searched the existing issues
Flutter Quill version
9.4.1
Steps to reproduce
1, I'm getting html text from an API:
\n <span style="font-size: small;">\n SDS Attached? Pics Attached?\n
\n
\n Air? Ocean?\n
\n
\n Qty:\n
\n
\n Battery Installed?\n
\n
\n
\n <span style="color:#B22222; font-size: 12px;">* FAVOR NO RESPONDER A ESTE CORREO\n
\n \n
2.I'm parsing this text width Document.fromHtml(htmlText), the text shows rightly but not the red color for last line.
3. I'm sending the text to the API to send and email parsing with quillController.document.toDelta().toHtml() using quill_html_converter.dart, the html text is right but it doesn't has the color tag.
Expected results
want to see and send the last line in red color
Actual results
currently the color shown is black
Code sample
Code sample
var html = widget.emailBody?.mailBody ??
"<p>\n <span style=\"font-size: small;\">\n SDS Attached? Pics Attached?\n <br/>\n <br/>\n Air? Ocean?\n <br/>\n <br/>\n Qty:\n <br/>\n <br/>\n Battery Installed?\n <br/>\n <br/>\n <br/>\n <span style=\"color:#B22222; font-size: 12px;\">* FAVOR NO RESPONDER A ESTE CORREO</span>\n <br/>\n </span>\n</p>\n";
quillController2.document = Document.fromHtml(html);
// Quill Editor
Column(
children: [
QuillToolbar.simple(
configurations: QuillSimpleToolbarConfigurations(
controller: quillController2)),
SingleChildScrollView(
child: Container(
height: 380,
width: 550,
decoration: const BoxDecoration(color: Colors.white),
child: QuillEditor.basic(
configurations: QuillEditorConfigurations(
controller: quillController2))),
),
],
)
// Send mail button
CustomSaveButton(
text: 'Send Email',
active: true,
onPressed: () async {
String htmlContent =
quillController2.document.toDelta().toHtml();
context.pop();
ref
.read(whTabControllerProvider.notifier)
.sendComplianceEMail(
emailParams: ComplianceMailModel(
from: '[email protected]',
to: controllers[0].text,
cc: controllers[1].text,
bcc: controllers[2].text,
subject: controllers[3].text,
msg: htmlContent,
attachmentPaths: ref
.watch(whTabControllerProvider)
.attachmentList));
},
)
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
[Paste your logs here]