Search Results for

    Show / Hide Table of Contents

    Class PlainTextMapper

    Extracts a string of plain text from an IContainerNode, and creates mappings between the plain text offsets and Framework nodes. The mappings can be used to get an IRange of a plain text substring. One use is to obtain an IRange for incorrectly spelt words, so they can be marked up with squiggly error lines.

    Inheritance
    System.Object
    PlainTextMapper
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Sdl.DesktopEditor.EditorApi.Implementation
    Assembly: Sdl.DesktopEditor.EditorApi.dll
    Syntax
    public class PlainTextMapper

    Constructors

    PlainTextMapper()

    constructor

    Declaration
    public PlainTextMapper()

    Properties

    IgnoreDeletedRevisonContent

    When Set To: 'true', Indicates This Class Will Ignore Any Content In An 'IRevisionMarkerContainerNode' That Has Been Marked As Deleted, And Will Not Include It In The Resulting 'PlainText' Property.

    Declaration
    public bool IgnoreDeletedRevisonContent { get; set; }
    Property Value
    Type Description
    System.Boolean

    PlainText

    The plain text extracted from the IContainerNode supplied to the BuildMappings method

    Declaration
    public string PlainText { get; }
    Property Value
    Type Description
    System.String

    Methods

    BuildMappings(IAbstractContainerNode)

    Visits all the contained nodes, extracting text and building mappings

    Declaration
    public void BuildMappings(IAbstractContainerNode container)
    Parameters
    Type Name Description
    IAbstractContainerNode container

    CheckIfShouldRecurseContainer(IAbstractContainerNode)

    Asks The Question Should We Recurse Into Revision Marker Containers? If We're Actively Wishing To Exclude Deleted Content (eg for: SpellChecking)

    Declaration
    protected bool CheckIfShouldRecurseContainer(IAbstractContainerNode nodeContainer)
    Parameters
    Type Name Description
    IAbstractContainerNode nodeContainer
    Returns
    Type Description
    System.Boolean

    GetRangeFromPlainTextOffsets(Int32, Int32)

    Returns the range corresponding to the portion of the plain text string given by startIndex and endIndex. Returns null if there is no valid mapping for the startIndex.

    Declaration
    public ContentRange GetRangeFromPlainTextOffsets(int startIndex, int endIndex)
    Parameters
    Type Name Description
    System.Int32 startIndex
    System.Int32 endIndex
    Returns
    Type Description
    ContentRange

    Extension Methods

    WindowsControlUtils.ForWindowFromFrameworkElement(Object, Action<Window>)

    On this page

    • Constructors
      • PlainTextMapper()
    • Properties
      • IgnoreDeletedRevisonContent
      • PlainText
    • Methods
      • BuildMappings(IAbstractContainerNode)
      • CheckIfShouldRecurseContainer(IAbstractContainerNode)
      • GetRangeFromPlainTextOffsets(Int32, Int32)
    • Extension Methods
    Back to top Generated by DocFX