AppFlowy-IO / AppFlowy-IO/appflowy-editor

[Bug] Editor Does not Display Html Email Template

Abierto
#492 6 comentarios 0 reacciones 0 asignados Ver en GitHub
p1
Lenguaje dominante
Dart
Estrellas
684
Forks
329
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

### 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_

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.