Rostislav Wolny
9f0e015f44
Load core editor setting as the base settings for the email editor
...
[MAILPOET-5660]
2023-10-26 10:43:00 +02:00
Rostislav Wolny
399ed61503
Introduce SettingsController for managing editor settings
...
[MAILPOET-5637]
2023-10-17 16:06:06 +02:00
Rostislav Wolny
e9a5658be5
Cleanup post editor approach code
...
[MAILPOET-5637]
2023-10-17 16:06:06 +02:00
Jan Lysý
eace314009
Use wpLocalizeScript instead of wpAddInlineScript in Email editor
...
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
5fce014a60
Fix email dataSchema in EmailApiController
...
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
e5e04e63e2
Add sending email after click on button
...
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
de66b3fea1
Add JS variables for email editor
...
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
226317f55c
Fix creating newsletter in EmailEditor
...
After removing temporary fix a hash was missing for newsletter created via EmailEditor.php
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Jan Lysý
65b6a129ae
Add email preview URL to EmailApiController response
...
[MAILPOET-5563]
2023-10-11 11:26:22 +02:00
Rostislav Wolny
ca40766c2f
Allow null for WP_Block_Editor_Context in email editor callbacks
...
There are cases when the second parameter is null.
[MAILPOET-5624]
2023-10-09 11:33:11 +02:00
Jan Jakes
49dd627a76
Update references to renamed files
...
[MAILPOET-4938]
2023-10-02 13:05:20 +02:00
Jan Lysý
51223ac3c2
Add saving and getting subject and preheader to EmailApiController
...
[MAILPOET-5562]
2023-10-02 10:28:26 +02:00
Rostislav Wolny
398a313d54
Pass styles controller into block renders
...
When rendering blocks, we need to access global styles settings.
This will be done via the StylesController
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
46d8cb38a0
Apply layout styles defined in StylesController and also to editor
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
fd96b4afad
Add email background and width into StylesController and apply in redering
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
77eab47357
Refactor email styles from constant to service and move to core
...
I envision the StylesController as the source of information about
styles settings in both the editor and renderer.
We will add email styles settings and these will be accessed in PHP via this service.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
3835a91163
Fix columns rendering after testing in Litmus
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
7233a9cb2b
Remove unnecessary service in email renderer
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
6fe71e2298
Update mail template layout to match MJML and add default content
...
padding
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
d594bb4739
Add simple columns rendering
...
Add rendering of columns with fixed width computed by number of columns.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
968ff6754e
Add blocks preprocessor
...
Currently, we need to wrap top-level non-column blocks into a single
column. This is done in the preprocessor.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
69a87e8146
Apply editor content styles in the email renderer
...
Add proof of concept for applying additional CSS in renderer
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
3c7a9f0a48
Strip theme CSS from the editor and add custom basic styles
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
36e83f81ec
Temporarily hardcode background color for body and content
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
bd539e386b
Add initialization for core blocks renderers
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
f34c479bb6
Add simple renderers for columns, paragraphs, and heading blocks
...
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
a1869249e0
Add code handling block rendering
...
The idea is that anyone can register specialized renderers for
blocks.
The render will skip unknown blocks.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
46a481ec24
Add email renderer and template to the renderer engine
...
In this commit, I copied the code for processing the rendering of emails
from the current renderer.
This will allow us to use different base templates and styles.
Ideally, we should be able to add hooks and reuse the renderer from the engine namespace in
the current renderer.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
b70ad064c7
Refactor initialization of the email editor
...
This changes how the editor is initialized. The integration initialization class
doesn't get the engine class anymore, but integration is initialized via
mailpoet_email_editor_initialized action triggered from the engine.
This allows multiple integrations to hook into the engine.
[MAILPOET-5540]
2023-09-21 14:20:35 +02:00
Rostislav Wolny
dcdd1c8cdb
Fix checking hooks registered using a class name in assets cleaner
...
The code was not expecting that the filter callback could be defined with a class name as a string.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
6b0b8f3b98
Add README.md for email editor
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
19d1bb4146
Add description to EmailEditor::registerEmailPostTypes
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
68e833f80c
Refactor email editor PHP and JS code to follow automations namespacing
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
3f166ac3a4
Refactor assets cleanup to an extra class
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
cb4c904cda
Temporarily disable patterns
...
We will reintroduce block patterns post MVP.
We may want to filter or add patterns.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
2739c53e56
Add hook for modifying editor settings
...
We will need to disable/change various editor settings.
This will be done in this method or via filter in the integration code.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
e260fb71e8
Add cleanup for registered block editor assets
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
fc2bbda9a2
Add dummy email body renderer for new editor
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
d9cce538a0
Add CSS for hiding publish button and enqueue CSS file for loading
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
fabdf6f4c5
Add EmailApiController that adds MailPoet specific data to post api
...
When loading an email post in the editor we need to attach MailPoet
specific data like associated newsletter entity id, email type etc.
This is done using register_rest_field function.
So far we only send the associated entity ID but there is also a method `saveEmailData` that will
be used to save MailPoet specific email data.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
b0d5083718
Setup JS assets entry point and build for the email editor
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
e6e20e3159
Save association to WP post with newsletter
...
This commit adds a simple implementation of ensuring the mailpoet_email post type
has associated NewsletterEntity.
In the future we will need to add support also for saving additional data for
newsletters (subject, sending settings).
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
6be97e665b
Restrict allowed blocks to paragraph, heading and columns
...
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00
Rostislav Wolny
c7f1ecfb5e
Add EmailEditor class with basic registration of CPT for emails
...
The idea is that there is a core class
Mailpoet\MailPoet\EmailEditor\Core\EmailEditor which will contain common email editor related stuff
that can be used and shared between projects.
Mailpoet\MailPoet\EmailEditor\Integration\EmailEditor which contains MailPoet specific settings and and extra modifications
specific for MailPoet.
[MAILPOET-5365]
2023-08-24 15:44:34 +02:00