Update readme, implement PR feedback

MAILPOET-6256
This commit is contained in:
Oluwaseun Olorunsola
2024-12-03 08:44:15 +01:00
committed by Rostislav Wolný
parent 8c2ede4ff9
commit cd184c373c
3 changed files with 33 additions and 36 deletions

View File

@@ -1,10 +1,29 @@
# MailPoet plugin Email Editor Integration
# MailPoet Plugin Email Editor Integration
This folder contains the code for the MailPoet plugin Email Editor integration.
This folder contains the code for the MailPoet Plugin Email Editor Integration.
**MailPoet** specific code and features should be placed here.
Documentation for the core email editor packages can be located here:
- Email editor PHP package: [docs](../../../packages/php/email-editor/README.md)
- Email editor JS package: [docs](../../../packages/js/email-editor/README.md)
- Email Editor PHP Package: [docs-->packages/php/email-editor/README.md](../../../packages/php/email-editor/README.md)
- Email Editor JS Package: [docs-->packages/js/email-editor/README.md](../../../packages/js/email-editor/README.md)
### Integrations
- PHP Integration can be found [here-->mailpoet/lib/EmailEditor/Integrations/MailPoet](Integrations/MailPoet)
- JS Integration is subdivided.
- Custom Gutenberg blocks should be [here-->mailpoet/assets/js/src/mailpoet-custom-email-editor-blocks](../../assets/js/src/mailpoet-custom-email-editor-blocks)
- MailPoet extended integration (i.e., using MailPoet components within the email editor) should be [here-->mailpoet/assets/js/src/mailpoet-email-editor-integration](../../assets/js/src/mailpoet-email-editor-integration)
## FAQ
1. How can I activate the new email editor?
- You need to active it as an experimental feature on the URL {your-website}/wp-admin/admin.php?page=mailpoet-experimental
- Afterward, you can see a dropdown button when you want to create a new email.
2. Are emails from the old editor compatible?
- No. Unfortunately, email editors are not compatible at this moment, and there is no tool which would allow you to migrate old emails yet.
3. Which WP versions are supported?
- The new email editor supports only the latest WP version.
4. Can I use the latest Gutenberg version?
- You can use the latest version by installing the Gutenberg plugin, but there is a high chance that the editor will not work properly.

View File

@@ -41,18 +41,6 @@ pnpm run format # runs prettier on files. This uses
* **.sccs files** we dont write much CSS. We load styles for the post editor (this is done in page controller) but sometimes we need some adjustments of have a custom ui
* **Custom blocks** - MailPoet custom blocks should be built in [mailpoet-custom-email-editor-blocks folder](https://github.com/mailpoet/mailpoet/tree/13bf305aeb29bbadd0695ee02a3735e62cc4f21f/mailpoet/assets/js/src/mailpoet-custom-email-editor-blocks)
### Theme
Basically theme.json and ThemeController. We dont use theme.json from the sites theme. Not every site is using a block theme.
Our current approach is that for email, we have our own theme and we want to handpick settings from the sites theme to achieve a similar design as the site. Currently, we pick only the color palette.
### Templates
There is no official API for plugins to add templates (there will be in WP6.7). For now, we use low level hooks to add email templates, so they can be available for consumption in the email editor (via Rest API) and for the renderer.
This is done in Templates.php.
### Patterns
Similar to templates but for patterns. Currently, we have one email pattern with initial email content.
## Email clients
### WEB CLIENTS

View File

@@ -25,7 +25,7 @@ composer run integration-test -- tests/integration/Engine/Theme_Controller_Test.
## Development
Both **PHP** **and** JS codes are divided into `engine` and `integrations` subdirectories.
The **PHP** package is divided into `engine` and `integrations` subdirectories.
Engine consist of code for the editor core and integrations are for extending the functionality.
Anything **MailPoet** specific should be in the `mailpoet/lib/EmailEditor/Integrations` folder.
@@ -40,19 +40,12 @@ Please avoid using MailPoet-specific services and modules in the Email editor pa
* Takes the rendered content html and places it into email HTML template template-canvas.php (We have too many items we call “template” I know 🙁)
### Integrations
Please locate integrations [here](https://github.com/mailpoet/mailpoet/tree/13bf305aeb29bbadd0695ee02a3735e62cc4f21f/mailpoet/lib/EmailEditor/Integrations/MailPoet)
Please locate MailPoet PHP integrations [here](https://github.com/mailpoet/mailpoet/tree/13bf305aeb29bbadd0695ee02a3735e62cc4f21f/mailpoet/lib/EmailEditor/Integrations/MailPoet)
## Known rendering issues
- In some (not all) Outlook versions the width of columns is not respected. The columns will be rendered with the full width.
- The editor may not start if the URL starts with `wp-admin/post-new.php?post_type=mailpoet_email`.
- Most of the email editor logic heavily depends on the `mailpoet_email` post-type. This is a known issue and we are working to fix it.
- We use `mailpoet_data` in some section of the codebase. This will be updated.
- Native email editor implementation for `preview_url`
- Fix the use of MailPoet vendor packages in the Email editor. We currently use `Emogrifier` and `Html2Text`.
- Fix the Send button (button to send email) or redirect it elsewhere. It is currently pointing to the `mailpoet-newsletter` page.
- We currently support post editing context (a post has to be created before we can use the editor). We need to add support for creation context.
## Actions and Filters
@@ -80,14 +73,11 @@ We may add, update and delete any of them.
| `mailpoet_is_email_editor_page` | `boolean` $isEditorPage | `boolean` | Check current page is the email editor page |
| `mailpoet_email_editor_send_preview_email` | `Array` $postData | `boolean` Result of processing. Was email sent successfully? | Allows override of the send preview mail function. Folks may choose to use custom implementation |
## FAQ
1. How can I activate the new email editor?
* You need to active it as an experimental feature on the URL {your-website}/wp-admin/admin.php?page=mailpoet-experimental
* After that, you can see a dropdown button when you want to create a new email.
2. Are emails from the old editor compatible?
* No. Unfortunately, email editors are not compatible at this moment, and there is no tool which would allow you to migrate old emails yet.
3. Which WP versions are supported?
* The new email editor supports only the latest WP version. The last supported version was 6.6.
4. Can I use the latest Gutenberg version?
* You can use the latest version by installing the Gutenberg plugin, but there is a high chance that the editor will not work properly.
## TODO
- The editor may not start if the URL starts with just `wp-admin/post-new.php?post_type=mailpoet_email` without the post id.
- Most of the email editor logic heavily depends on the `mailpoet_email` post-type. This is a known issue and we are working to fix it.
- We use `mailpoet_data` in some section of the codebase. This will be updated.
- Native email editor implementation for the `preview_url`.
- Fix the use of MailPoet vendor packages in the Email editor. We currently use `Emogrifier` and `Html2Text`.
- Fix the Send button (button to send email) or redirect it elsewhere. It is currently pointing to the `mailpoet-newsletter` page.
- We currently support post editing context (a post has to be created before we can use the editor). We need to add support for creation context.