AppFlowy-IO / AppFlowy-IO/appflowy-editor

[Bug] Editor Does not Display Html Email Template

Đang mở
#492 6 bình luận 0 reaction 0 người được giao Xem trên GitHub
p1
Ngôn ngữ chính
Dart
Star
684
Fork
329
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

### 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](https://pub.dev/packages/flutter_widget_from_html) from the pub and it worked.

### How to Reproduce

Try to render this HTML Email template using `htmlToDocument`

```






Welcome to Odoo


${object.name}


${object.company_id.name}














Dear ${object.name},


You have been invited by ${object.create_uid.name} of ${object.company_id.name} to connect on Odoo.


Accept invitation


% set website_url = object.env['ir.config_parameter'].sudo().get_param('web.base.url')
Your Odoo domain is: ${website_url}

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














${object.company_id.name}


${object.company_id.phone}
% if object.company_id.email
| ${object.company_id.email}
% endif
% if object.company_id.website
|
${object.company_id.website}

% endif





Powered by Odoo

```

### Same Template with Dummy Data

```






Welcome to Odoo


John Doe


Company ABC













Dear John Doe,


You have been invited by Jane Smith of Company ABC to connect on Odoo.


Accept invitation



Your Odoo domain is: https://www.example.com

Your sign in email is: johndoe@example.com


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 Company ABC Team














Company ABC


+123-456-7890 | info@example.com

|
https://www.example.com







Powered by Odoo

```

### Expected Behavior

I expect this to render the email template, like this preview






Welcome to Odoo


${object.name}


${object.company_id.name}














Dear ${object.name},


You have been invited by ${object.create_uid.name} of ${object.company_id.name} to connect on Odoo.


Accept invitation


% set website_url = object.env['ir.config_parameter'].sudo().get_param('web.base.url')
Your Odoo domain is: ${website_url}

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














${object.company_id.name}


${object.company_id.phone}
% if object.company_id.email
| ${object.company_id.email}
% endif
% if object.company_id.website
|
${object.company_id.website}

% endif





Powered by Odoo

### Operating System

IOS

### AppFlowy Editor Version(s)

appflowy_editor: ^1.3.0

### Screenshots

Email template rendered by [flutter_widget_from_html](https://pub.dev/packages/flutter_widget_from_html)

![CleanShot 2023-09-21 at 11 58 44](https://github.com/AppFlowy-IO/appflowy-editor/assets/37589169/138ce491-8bf2-4115-bc28-178b91c80a84)

### Additional Context

_No response_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.