Search Results for

    Show / Hide Table of Contents

    Interface ITextContainer

    Represents a container for text elements.

    Namespace: IronWord.Models.Abstract.Interfaces
    Assembly: IronWord.dll
    Syntax
    public interface ITextContainer

    Methods

    AddText(TextContent)

    Adds a pre-existing Run to the text container.

    Declaration
    TextContent AddText(TextContent Run)
    Parameters
    Type Name Description
    TextContent Run

    The Run to be added.

    Returns
    Type Description
    TextContent

    The added Run.

    AddText(String)

    Adds a Run with the specified text to the text container.

    Declaration
    TextContent AddText(string text)
    Parameters
    Type Name Description
    System.String text

    The text content of the Run to be added.

    Returns
    Type Description
    TextContent

    The added Run.

    ExtractText()

    Extract all text from the container

    Declaration
    string ExtractText()
    Returns
    Type Description
    System.String

    Extracted text

    FindText(String)

    Find the first text element which contains the specified text

    Declaration
    TextContent FindText(string find)
    Parameters
    Type Name Description
    System.String find

    Text to find

    Returns
    Type Description
    TextContent

    Text element containing the specified text

    Remove(TextContent)

    Remove the specified text element

    Declaration
    bool Remove(TextContent element)
    Parameters
    Type Name Description
    TextContent element

    Text element to remove

    Returns
    Type Description
    System.Boolean

    True if the element was found and removed, False otherwise

    ReplaceText(String, String)

    Replace all instances of the specified text

    Declaration
    void ReplaceText(string find, string replace)
    Parameters
    Type Name Description
    System.String find

    Text to replace

    System.String replace

    Replacement text

    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    Want to deploy IronWord to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronWord free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.