66
Views
1
Comments
[CKEditor.Reactive] CKEditor losing/changing formatting when content pasted from Microsoft Word
ckeditor-reactive
Reactive icon
Forge asset by Fábio Fantato

I realise this is a very common issue on the web, where pasting content from Microsoft Word into any Rich Text Editor creates some styling issues and it doesn't look quite the same. But I am hoping that someone on this community has had some luck in closing the gap between these two editors or has some work arounds? I know there used to be a paste from Word option that now no longer works; is there a way to get this functionality back, even as a client action? Not sure what this option used to actually do and if there is a way to clone that logic into a client action?

The context is that I am copying content from Word into the CKEditor, and then using Docmosis to take the HTML generated by the CKEditor to populate another Word document dynamically. Unfrotunately, I have noticed the following formatting issues when copying from Word into the CK Editor and then sending via Docmosis to Word again:

1. Font can be set in Rich Text Editor to be what is desired, but if copied and pasted in from Word, it sometimes does not keep the correct source font. E.g. pastes Calibri from Word as Calibri;sans-serif in Rich Text editor which looks different.

2. Rich Text Editor sometimes adds a bigger space when creating blank lines, unless using shift+enter, but when copying from Word it sometimes creates bigger blank lines. I noticed the same when pasting into a Text Area and then putting that through Docmosis. It seems this depends on the Word formatting of the text that was copied - if the formatting is such that there are small spaces, then it makes them big, but sometimes Word also has big spaces to begin with and then nothing changes.

3. Tables don't keep full width when copied into Rich Text Editor. This can be changed in Rich Text Editor but it's not as intuitive as Word, and doesn't always keep the full styling changes when sent to Docmosis (such as width). When Table created in Rich Text Editor, it also does not automatically fill the width like it does in Word.

4. Table cell borders are double lined when created directly in Rich Text Editor, but will copy with single line formatting when coming from Word. I'd like the tables to default to single line.

5. Tables spanning multiple pages are missing the top border line of the table on each new page when coming from the Rich Text Editor via Docmosis.

2025-03-11 05-02-41
Ragu Vasu

Hi Nicholas Campbell,

Good Morning,

Instead of using default past plugin in CK Editor, use the new plugin called enhanced paste from Office and it will resolve some issues, Kindly refer this link for more details paste-from-office-enhanced

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.