Paste From Google Doc

Filter to paste from Google Doc and keep style (bold, italic, underline).

My frst time posting a plugin.

I'm posting my solution in case it is useful to someone. I had this issue with pasting from googleDocs. And I found someone made a branch of CKEditor in github (13877) which corrects this.

But I needed it to work with my version of CKEditor which I cannot change bacause it is integrated with Prcocesswire CMS.

So I wrote this plugin.

The code is originally from Frederico Knabben, written in ckeditor-dev-t-13877 branch (https://github.com/cksource/ckeditor-dev/tree/t/13877) has been adapted in a plugin.

This filter detects all style that is already in the toolbar. So if underline is missing for example you must add it to the toolbar.
Instruction for Processwire : 

For processwire, you must edit the field that has CKEditor and make sure that :

  • copy the plugin folder in site/modules/InputfieldCKEditor/plugins
  • ACF is On
  • pasteFromGoogleDoc plugin is enabled
  • CKEditor toolbar configuration contains Bold, Italic and Underline
    • e.g : Format, Styles, -, Bold, Italic, Underline, -, RemoveFormat
    • if Underline is not in the toolbar for example, it will be bypassed by the filter. 

 

 

pasteFromGoogleDoc

30,736 downloads (view stats)

Releases

Plugin versions CKEditor versions
4.25 4.24 4.23

Version: 1.0

DownloadRelease notes

First release

Twitter Facebook Facebook Instagram Medium Linkedin GitHub Arrow down Phone Menu Close icon Check