Closed kawad852 closed 1 month ago
I have run into this before #2073 I assume you are importing/pasting text from a source that is providing HTML. In my cases, the paste process converted \
to the code block attribute that appears as your white box.Since I don't use HTML and the status of pasting HTML is being deprecated, I have not pursued this further. @CatHood0 knows more about this than I do. Can you confirm that this is what you are doing?
Can you confirm that this is what you are doing?
Yeah. <pre>
tag is taken as a block of code and it is parsed like any of the available tags to a Delta
with its own attributes
I'll first add a new version for flutter_quill_delta_from_html
to allow plain paste from html nodes and then we will need to add a new configuration for this in the editor. Give me some time to make this.
@CatHood0 @AtlasAutocode
This is the html i'm trying to display inside the editor:
"This is the HTML
section of the email body."
and this is how i convert it:
_quillCtrl = QuillController(
document: Document.fromDelta(HtmlToDelta().convert("This is the <code>HTML</code> section of the email body.")),
selection: const TextSelection.collapsed(offset: 0),
);
This is the
HTML
section of the email body.
tag and you should not have a problem. It seems that the Quill editor is working correctly and showing the \ tag as a code-block (block attribute).
tag to an inline code-block (inline attribute). It is confusing that there are 2 attributes for code blocks and they have very different properties.
@AtlasAutocode
Yes i want to remove the white box. i was just confused of this box because i've been using this package for a while now, and it's the first time i see this box (for the same html content). i guess they made some changes recently, Anyway, Thank you for your help, I appreciate it.
Is there an existing issue for this?
The question
How do i hide the white block inside the editor (This is TheHTML) ? i managed to hide from the toolBar by setting showCodeBlock: false, but did figure out how to hide it from the editor.
this is my code:
Column( children: [ QuillSimpleToolbar( controller: controller, configurations: const QuillSimpleToolbarConfigurations( showCodeBlock: false, ), ), const SizedBox(height: 10), QuillEditor.basic( controller: controller, configurations: const QuillEditorConfigurations(minHeight: 300), ), ], )