Pasting text from Word - cleaning code
http://dev.ascintranet.osu.edu/basic-page-testing-eva
I pasted text three different ways on this page.
- Plain Text that came from a text editor.
- From Word with a few words bolded and italicized and said 'OK' to have it cleaned.
- From Word with a few words bolded and italicized and said 'Cancel' to have it cleaned.
There are a lot of spans being added to the two versions of the text coming from Word.
Comments:
- This is what the source code looks like for the text that pasted from Word and not cleaned. (Eva Dale - Dec 14, 2017)
- This appears to be resolved with the addition of the Paste from Word button to the text editor (Brian Canini - Dec 14, 2017)
- When I use past from Word it still brings in spans and formatting (font, size, etc) from Word. http://dev.ascintranet.osu.edu/test/test-basic-page-eva
Our paste from Word in Drupal 7 does not bring in the spans. (Eva Dale - Dec 21, 2017)
- checked "limit allowed HTML tags" checkbox on Full HTML CKEditor
- Configuration > Content authoring > Text formats and editors This resolved the issue and spans and other Word formatting are now being removed (Brian Canini - Jan 4, 2018)
- This adjustment broke the code in the OSU navbar block
- created a new text editor format to use for custom blocks that doesn't have the "limit allowed HTML tags" checkbox checked (Brian Canini - Jan 4, 2018)