Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-128690

Text copy/pasted from Google Doc into either Web Content HTML field, or Paragraph Fragment is always formatted as Bold

    Details

    • Type: Bug
    • Status: Verified
    • Resolution: Unresolved
    • Affects Version/s: 7.3.10 DXP GA1, Master
    • Fix Version/s: None
    • Component/s: CKEditor
    • Labels:
      None
    • Fix Priority:
      3

      Description

      When copy/pasting text from a Google Document into either an HTML field of a Web Content Article, or into the Paragraph Fragment, the incoming text is always formatted bold even when the source text is not in bold.

      Expected behaviour:

      Incoming text retains the formatting applied in the Google Document

      Observed behaviour:

      Incoming text is always formatted in Bold

      Furthermore, this formatting is difficult to remove, requiring a different workaround for HTML fields and Paragraph fragments:

      • With the HTML field, you cannot click the "B" icon to remove the bold formatting - this seems to be because the text is in a <b> tag with the "id" attribute set to a Google GUID.  To remove the formatting you must switch to source mode and either manually change the <b> tag to something else or remove it entirely.  It's also possible to remove the "id" attribute, in which case it becomes possible to toggle bold off/on with the "B" icon. Changing styles (from Normal to H1 and back) does not remove the formatting.
      • With the Paragraph Fragment there is no source mode, so it is not possible to remove the formatting as described above.  From viewing the published HTML the issue is the same - the text is in a <b> tag with an "id" attribute.  However, with this fragment it is possible to switch the style to (for example) H1, and then switch it to "Normal".  Doing so removes the <b> tag entirely.

      Steps to reproduce for Web Content:

      1. Create a new Google Doc
      2. Add some text, do not apply any formatting
      3. Copy the text to the clipboard
      4. Create a new Web Content article (Basic Web Content is fine)
      5. Paste the text into the HTML field
      6. Observe that it is in Bold, that Bold cannot be removed using the Toolbar
      7. Switch to Source mode, remove the "id" attribute and switch back to text mode
      8. Note that Bold can now be removed using the Toolbar

      Steps to reproduce for Paragraph Fragment:

      1. Create a new Google Doc
      2. Add some text, do not apply any formatting
      3. Copy the text to the clipboard
      4. Add a Paragraph Fragment to a page
      5. Edit the Paragraph fragment and paste the text
      6. Observer that it is in Bold, and that Bold cannot be removed using the pop-up toolbar
      7. Select the text and change the style to "Heading 1"
      8. Change the style to "Normal"
      9. Note that Bold can now be removed using the Toolbar

        Attachments

          Activity

            People

            Assignee:
            support-lep@liferay.com SE Support
            Reporter:
            benjamin.turner Benjamin Turner
            Participants of an Issue:
            Recent user:
            John Co
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Days since last comment:
              1 year, 7 weeks, 2 days ago

                Packages

                Version Package