Open asadamatic opened 1 year ago
@asadamatic We don't support parsing the table html content yet. By the way, that's a helpful hint flutter_widget_from_html.
Is there a section in docs that lists HTML tags unsupported for parsing? It will be helpful!
the HTML tags supported for now are here.
class HTMLTags {
static const h1 = 'h1';
static const h2 = 'h2';
static const h3 = 'h3';
static const orderedList = 'ol';
static const unorderedList = 'ul';
static const list = 'li';
static const paragraph = 'p';
static const image = 'img';
static const anchor = 'a';
static const italic = 'i';
static const em = 'em';
static const bold = 'b';
static const underline = 'u';
static const strikethrough = 's';
static const del = 'del';
static const strong = 'strong';
static const checkbox = 'input';
static const span = 'span';
static const code = 'code';
static const blockQuote = 'blockquote';
static const div = 'div';
static const divider = 'hr';
static const section = 'section';
static const font = 'font';
static const mark = 'mark';
static List<String> formattingElements = [
HTMLTags.anchor,
HTMLTags.italic,
HTMLTags.em,
HTMLTags.bold,
HTMLTags.underline,
HTMLTags.del,
HTMLTags.strong,
HTMLTags.span,
HTMLTags.code,
HTMLTags.strikethrough,
HTMLTags.font,
HTMLTags.mark,
];
static List<String> specialElements = [
HTMLTags.h1,
HTMLTags.h2,
HTMLTags.h3,
HTMLTags.unorderedList,
HTMLTags.orderedList,
HTMLTags.div,
HTMLTags.list,
HTMLTags.paragraph,
HTMLTags.blockQuote,
HTMLTags.checkbox,
HTMLTags.image,
HTMLTags.section,
];
static bool isTopLevel(String tag) {
return tag == h1 ||
tag == h2 ||
tag == h3 ||
tag == checkbox ||
tag == paragraph ||
tag == div ||
tag == blockQuote;
}
}
Hi @asadamatic , we're eager to gather valuable feedback from our users to better plan for 2024. Participants who complete this survey will gain priority access to our new launches. We appreciate your insights: https://tally.so/r/nW8qAQ.
Bug Description
I'm having a hard time figuring out why the following HTML template is not rendered by the editor.
Initially, I thought that there was some problem in this template that was causing the issue, but I tried to render it using an HTML Renderer from the pub and it worked.
How to Reproduce
Try to render this HTML Email template using
htmlToDocument
Same Template with Dummy Data
Expected Behavior
I expect this to render the email template, like this preview
${object.name}
You have been invited by ${object.create_uid.name} of ${object.company_id.name} to connect on Odoo.
Your sign in email is: ${object.email}
Never heard of Odoo? It’s an all-in-one business software loved by 3+ million users. It will considerably improve your experience at work and increase your productivity.
Have a look at the Odoo Tour to discover the tool.
Enjoy Odoo!
--
The ${object.company_id.name} Team
Operating System
IOS
AppFlowy Editor Version(s)
appflowy_editor: ^1.3.0
Screenshots
Email template rendered by flutter_widget_from_html
Additional Context
No response