Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for pasting content from Google Docs #2516

Closed
Reinmar opened this issue Oct 1, 2018 · 10 comments
Closed

Support for pasting content from Google Docs #2516

Reinmar opened this issue Oct 1, 2018 · 10 comments
Labels
package:paste-from-office type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Milestone

Comments

@Reinmar
Copy link
Member

Reinmar commented Oct 1, 2018

Is this a bug report or feature request?

馃啎 Feature request

馃捇 Version of CKEditor

CKEditor v5 @ 12.3.1

馃搵 Steps to reproduce

Like MS Word, Google Docs also produces some non-semantical markup which needs to be normalized before being inserted into CKEditor 5.

With this feature we want to introduce infrastructure to support Google Docs pasting (normalizers API) and a handful of converters, such as:

  • basic text formatting (underline, strikethrough, superscripts, subscript - except bold which is extracted to ckeditor/ckeditor5-paste-from-office#74)
  • font color, background color
  • links
  • images
  • tables
  • text alignment

If you'd like to see this feature implemented, add 馃憤 to this post.

@f1ames
Copy link
Contributor

f1ames commented Nov 7, 2018

I have rechecked (validated some time ago in #1184 (comment)) how pasting from GDocs works with the document formatted like:

image

There are basically 3 things broken (comparing to what is supported when pasting from Word):

  1. Entire content is bolded (as entire content is wrapped in special <b> tag interpreted by editor as bold). Broken on Chrome and Safari, works on Firefox (no <b> wrapper).
  2. List are broken due to ul > li > p markup.
  3. Images in tables are not pasted correctly but AFAIR this is not supported by the editor itself.

So to align it with what is supported now when pasting from Word, solving 1 and 2 should do the job.

@f1ames
Copy link
Contributor

f1ames commented Nov 7, 2018

The issue with block content inside lists is more general one, related to any pasted or set content inside editor - #1318.

@jodator
Copy link
Contributor

jodator commented Nov 7, 2018

Images in tables are not pasted correctly but AFAIR this is not supported by the editor itself.

As for now no images in table.

@Reinmar
Copy link
Member Author

Reinmar commented Nov 7, 2018

So to align it with what is supported now when pasting from Word, solving 1 and 2 should do the job.

Fixing 1. and 2. would be cool.

@f1ames f1ames changed the title Support from Google Docs Support for pasting content from Google Docs Nov 19, 2018
@msamsel msamsel self-assigned this Jul 10, 2019
@msamsel
Copy link
Contributor

msamsel commented Jul 23, 2019

@jodator as we discussed I create a discussion topic for the normalizers:
#2497.

@mlewand mlewand assigned mlewand and unassigned msamsel Aug 7, 2019
@Reinmar
Copy link
Member Author

Reinmar commented Aug 12, 2019

Could we have a list here of things which work fine already and a list of tickets for things which don't work yet? Because it'd be good to close this ticket with some sort of summary.

@atullasrado
Copy link

List are broken due to ul > li > p markup.

I came across something similar while pasting indented lists from Gmail. The indented content is not pasted at all. Would that come under the scope of this issue or does it require a new one?

@jodator
Copy link
Contributor

jodator commented Aug 13, 2019

@atullasrado - this will be probably fixed by: https://github.com/ckeditor/ckeditor5-list/issues/115. We're hoping to finish this in the current iteration by it might get delayed.

I'll check the Gmail case there.

@msamsel
Copy link
Contributor

msamsel commented Aug 13, 2019

Those are my findings. I used this document for testing purpose.
@Mgsy if you found something else during your testing of PfGD, then please add it to the list.

Sum up of paste from Google Docs support with features which I was able to match with CKE5 features:

Available features, which might have some small issues:

  1. Regular text is pasted
  2. Headings are pasted. However <h1> and <h2> are recognized as Heading1. More details [PFGD] Add support for pasting headers聽#2503
  3. Basic styles are working fine except bold which is not upcasted. More details and temporary workaround: Bold is not pasted from Google Docs聽#2495.
  4. Links are working fine
  5. Font color and font background color are working. However, there is a transparent color on the document colors list. It might be useful to remove it during paste.
  6. Tables are working with features available in the editor. So nested tables or table styles are not preserved.
  7. Images are working (however there remains link to google docs)
  8. Alignment feature is working fine as well

Broken feature:

  1. Font family and font size.
  2. Indentation

Worth mention issues:

  1. Paste from Google Docs is not recognized for some specific content in Safari browser Paste from google docs doesn't work with Safari in edge cases聽#2501.

@mlewand
Copy link
Contributor

mlewand commented Aug 21, 2019

All right, I have updated this issue to list all the basic features that we wanted to include in this release. Now the most important remaining thing is bold support, which has been extracted to ckeditor/ckeditor5-paste-from-office#74 and will be fixed in future release.

@mlewand mlewand closed this as completed Aug 21, 2019
@mlewand mlewand removed their assignment Aug 21, 2019
@mlewand mlewand transferred this issue from ckeditor/ckeditor5-paste-from-office Oct 9, 2019
@mlewand mlewand added this to the iteration 26 milestone Oct 9, 2019
@mlewand mlewand added status:confirmed type:feature This issue reports a feature request (an idea for a new functionality or a missing option). package:paste-from-office labels Oct 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:paste-from-office type:feature This issue reports a feature request (an idea for a new functionality or a missing option).
Projects
None yet
Development

No branches or pull requests

6 participants