Functions
-
Normalizes spacing in special Word spacerun spans
(<span style='mso-spacerun:yes'>\s+</span>
) by replacing
all spaces with
pairs. This prevents spaces from being removed during further DOM/View processing
(see especially _processDataFromDomText
).
Parameters
htmlDocument
:
Document
Native Document
object in which spacing should be normalized.
-
normalizeSpacing( htmlString ) → String
module:paste-from-office/filters/space~normalizeSpacing
Replaces last space preceding elements closing tag with
. Such operation prevents spaces from being removed
during further DOM/View processing (see especially _processDataFromDomText
).
This method also takes into account Word specific <o:p></o:p>
empty tags.
Additionally multiline sequences of spaces and new lines between tags are removed (see #39 and #40).
Parameters
htmlString
:
String
HTML string in which spacing should be normalized.
Returns
String
Input HTML with spaces normalized.
Every day, we work hard to keep our documentation complete. Have you spotted an outdated information? Is something missing?
Please report it via our issue tracker.