Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25227

Impossible to save a content RichText after copy/paste

    Details

      Description

      At lot of the times when content is pasted into the rich text editor from an outside source, nothing happens when the "Publish" button (nor the Save button) is clicked. In the console, the following message appears:

      `Failed to set the 'innerHTML' property on 'Element': The provided markup is invalid XML, and therefore cannot be inserted into an XML document.`

      I have not isolated specifically what type of formatting the pasted content needs to have in order not to work, but I belive that a text containing links is among the culprits.

      The first step here should be to produce a meaningful error message when/if a content item can not be published due to formatting limitations of the Rich text editor. The second should be to improve support for pasted content in general

        Issue Links

          Activity

          Hide
          Damien Pobel (Inactive) added a comment -

          The XML invalid error should be gone with several changes made lately (EZP-25161 and EZP-25188 mostly). This should solve the "nothing happens when the "Publish" button (nor the Save button) is clicked" issue (this was due to a plain bug in the JavaScript code basically considering some HTML to be XML valid). But indeed, at the moment, nothing special is done when pasting something in editor so depending on the clipboard content you might end up with a content that can not be saved. So if you don't mind, I'll rename the issue to "Impossible to save a content RichText after copy/paste" and close it but feel free to open specific issues about copy/paste as we'll have to fix/implement code for that and I guess a good start would be to have real use cases.

          Show
          Damien Pobel (Inactive) added a comment - The XML invalid error should be gone with several changes made lately ( EZP-25161 and EZP-25188 mostly). This should solve the "nothing happens when the "Publish" button (nor the Save button) is clicked" issue (this was due to a plain bug in the JavaScript code basically considering some HTML to be XML valid). But indeed, at the moment, nothing special is done when pasting something in editor so depending on the clipboard content you might end up with a content that can not be saved. So if you don't mind, I'll rename the issue to "Impossible to save a content RichText after copy/paste" and close it but feel free to open specific issues about copy/paste as we'll have to fix/implement code for that and I guess a good start would be to have real use cases.
          Hide
          Eirik Alfstad Johansen added a comment -

          Sounds good!

          Show
          Eirik Alfstad Johansen added a comment - Sounds good!

            People

            • Assignee:
              Unassigned
              Reporter:
              Eirik Alfstad Johansen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: