Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions build/ctct-word-content-handler-changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
- **BUGFIX**: Word Content Handler
Replace Word specific <o:p/> tags with <br/> tags.
Unwrap paragraph tags so that the visual double space does not appear
8 changes: 8 additions & 0 deletions src/plugins/common/contenthandler/lib/wordcontenthandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ define([
// Because footnotes for example are wrapped in divs and should
// be unwrap.
$node.contents().unwrap();
} else if ('o:p' === nodeName) { // Word specific character
// Remove the <o:p> tags. It seems to stand for a new line
$node.replaceWith('<br>');
} else if ('p' === nodeName) {

// Unwrap the paragraph tags so that the visual double space
// does not appear
$node.contents().unwrap();
} else if ('td' !== nodeName && isEmpty($node)) {

// Because any empty element (like spaces wrapped in spans) are
Expand Down