Class Index | File Index

Classes


Class ops.OpMergeParagraph


Defined in: OpMergeParagraph.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Merges two adjacent paragraphs together into the first paragraph.
Method Summary
Method Attributes Method Name and Description
 
execute(document)
<inner>  
getParagraphAtStep(odtDocument, steps)
 
init(data)
<inner>  
mergeParagraphs(destination, source)
Merges the source paragraph into the destination paragraph.
<inner>  
Remove all the text nodes within the supplied range.
 
spec()
<inner>  
trimInsignificantWhitespace(stepIterator, paragraphElement)
Remove all insignificant whitespace between the paragraph node boundaries and the first and last step within the paragraph.
Class Detail
ops.OpMergeParagraph()
Merges two adjacent paragraphs together into the first paragraph. The destination paragraph is expected to always be the first paragraph in DOM order. No content (other than editinfo elements) are removed as part of this operation. Once all child nodes have been shifted from the source paragraph, the source paragraph and any collapsible parents will be cleaned up.
Method Detail
execute(document)
Parameters:
{!ops.Document} document

<inner> {!Element} getParagraphAtStep(odtDocument, steps)
Parameters:
{!ops.OdtDocument} odtDocument
{!number} steps
Returns:
{!Element}

init(data)
Parameters:
{!ops.OpMergeParagraph.InitSpec} data

<inner> {undefined} mergeParagraphs(destination, source)
Merges the source paragraph into the destination paragraph.
Parameters:
{!Element} destination
Paragraph to merge content into
{!Element} source
Paragraph to merge content from
Returns:
{undefined}

<inner> {undefined} removeTextNodes(range)
Remove all the text nodes within the supplied range. These are expected to be insignificant whitespace only. Assertions will be thrown if this is not the case.
Parameters:
{!Range} range
Returns:
{undefined}

{!ops.OpMergeParagraph.Spec} spec()
Returns:
{!ops.OpMergeParagraph.Spec}

<inner> {undefined} trimInsignificantWhitespace(stepIterator, paragraphElement)
Remove all insignificant whitespace between the paragraph node boundaries and the first and last step within the paragraph. This prevents this insignificant whitespace accidentally becoming significant whitespace during the merge.
Parameters:
{!core.StepIterator} stepIterator
{!Element} paragraphElement
Returns:
{undefined}

Documentation generated by JsDoc Toolkit 2.4.0 on Thu Jul 17 2014 23:45:41 GMT+0200 (MESZ)