magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.36k stars 9.28k forks source link

Legacy HTML content is imported to Page Builder as HTML code, not a Text element #38844

Open adamlavery opened 1 week ago

adamlavery commented 1 week ago

Summary

Prior to Page Builder, all rich content was managed with the TinyMCE editor. Essentially it is stored as constrained raw HTML and presented for visual editing. If we enable Page Builder then all legacy content is imported as HTML code. Given legacy content is just HTML that could be edited in TinyMCE, what has it not been imported as a Text element? What was the rationale behind this?

That way legacy content could continue to be managed as the single text block it was previously. Only if enhanced layout is required would it need to be extended in Page Builder. As it stands, we cannot enable Page Builder for existing sites because then all rich content would have to be reimplemented in Page Builder for non-developer end-users to work on it.

Examples

Enable Page Builder on an existing site that hasn't used it before. All rich content is now HTML code and effectively non-editable by end users.

Proposed solution

Import legacy content as a single Text element, allowing it be managed as previously.

Release note

Better support for switching from legacy TinyMCE to Page Builder.

Triage and priority

m2-assistant[bot] commented 1 week ago

Hi @adamlavery. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 1 week ago

Hi @engcom-Hotel. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Hotel commented 1 week ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 1 week ago

Hi @engcom-Hotel. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 1 week ago

Hi @engcom-Hotel, here is your Magento Instance: https://d017ff7aeaf154b429472f1f89ca9955.instances-prod.magento-community.engineering Admin access: https://d017ff7aeaf154b429472f1f89ca9955.instances-prod.magento-community.engineering/admin_246f Login: 529d5b63 Password: 17c1526a0049

engcom-Hotel commented 1 week ago

Hello @adamlavery,

Thanks for the report and collaboration!

We have tried to reproduce the issue in the latest development branch i.e. 2.4-develop but it seems the issue is not reproducible for us. We have followed the below steps to reproduce the issue:

  1. Create a rich content page in the TinyMCE editor, the page looks like the below: image

  2. Check the page at the front end.

  3. Enable PageBuilder from admin panel.

  4. Again try to edit the same page from the admin panel. This time we can see the pagebuilder instead of TinyMCE. Please refer to the below screenshot: image

  5. When clicking on the Edit with PageBuilder button, we can see the HTML to edit the page. Please refer to the below screencast for the same:

https://github.com/magento/magento2/assets/51681618/e92bff1b-2c68-4155-bb43-e0e8d1d1dc89

Let us know if we have missed anything.

Thanks

adamlavery commented 1 week ago

Exactly - you have demonstrated the issue. Legacy content is imported as an HTML Code element not as a Text element. End users are typically not HTML literate - they want a visual editor for their content, as they had before. Sure they can change it, add a Text element, copy the HTML Code into it to be able to edit it as they did before, then remove the code element. That's a lot of effort for every bit of rich content.

It makes a great deal more sense to import legacy content as a Text element, which comes with a WYSIWYG editor, so end users can manage their rich content immediately as they did before Page Builder. If they want to enhance the content using the features of Page Builder they can. But mostly they will be happy with the single text element they had before, at least to start with.

If there are tags that were allowed in TinyMCE but are not allowed in a PB Text element then use HTML code, otherwise if it's just simple HTML use the Text element.

Note there is another bug report still outstanding on tag validation - it still doesn't allow media inserts. https://github.com/magento/magento2/issues/36457

engcom-Hotel commented 1 week ago

Thanks @adamlavery, that makes sense to me now. Confirming the issue.

Thanks.

github-jira-sync-bot commented 1 week ago

:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12282 is successfully created for this GitHub issue.

m2-assistant[bot] commented 1 week ago

:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.