Search Results for

    Show / Hide Table of Contents

    Class HtmlTransformator

    Transforms the received Html in html that can be displayed and maintained in the modern client side text part

    Inheritance
    System.Object
    BaseTransform
    HtmlTransformator
    Inherited Members
    BaseTransform.RegisteredLogObservers
    BaseTransform.RegisterObserver(ILogObserver)
    BaseTransform.FlushObservers()
    BaseTransform.FlushSpecificObserver<T>()
    BaseTransform.LogError(String, String, Exception, Boolean, Boolean)
    BaseTransform.LogInfo(String, String, LogEntrySignificance)
    BaseTransform.LogWarning(String, String)
    BaseTransform.LogDebug(String, String)
    BaseTransform.Log(LogEntry, LogLevel)
    BaseTransform.SetPageId(String)
    BaseTransform.GetExactVersion(ClientRuntimeContext)
    BaseTransform.GetVersion(ClientRuntimeContext)
    Namespace: PnP.Framework.Modernization.Transform
    Assembly: PnP.Framework.dll
    Syntax
    public class HtmlTransformator : BaseTransform, IHtmlTransformator

    Constructors

    HtmlTransformator(IList<ILogObserver>)

    Default constructor

    Declaration
    public HtmlTransformator(IList<ILogObserver> logObservers = null)
    Parameters
    IList<ILogObserver> logObservers

    Methods

    CleanHtmlNodes(IHtmlDocument)

    Declaration
    protected virtual void CleanHtmlNodes(IHtmlDocument document)
    Parameters
    IHtmlDocument document

    CleanStyles(IHtmlDocument)

    Declaration
    protected virtual void CleanStyles(IHtmlDocument document)
    Parameters
    IHtmlDocument document

    ColorCodeToBackgroundColorName(Int32)

    Translated SharePoint Wiki background color number (ms-rtebackcolor-5 means number 5 is used) to RTE compatible color name

    Declaration
    public static string ColorCodeToBackgroundColorName(int colorCode)
    Parameters
    System.Int32 colorCode

    Used color number

    Returns
    System.String

    RTE color string

    ColorCodeToForegroundColorName(Int32)

    Translated SharePoint Wiki foreground color number (ms-rteforecolor-2 means number 2 is used) to RTE compatible color name

    Declaration
    public static string ColorCodeToForegroundColorName(int colorCode)
    Parameters
    System.Int32 colorCode

    Used color number

    Returns
    System.String

    RTE color string

    DropBRs(IHtmlDocument)

    Declaration
    protected virtual void DropBRs(IHtmlDocument document)
    Parameters
    IHtmlDocument document

    FontCodeToName(Int32)

    Translates SharePoint wiki font size (e.g. ms-rtefontsize-3 means font size 3) to RTE font size name

    Declaration
    public static string FontCodeToName(int fontCode)
    Parameters
    System.Int32 fontCode

    Wiki font size code

    Returns
    System.String

    RTE font size name

    ImageIFramePlaceHolders(IHtmlDocument)

    Declaration
    protected virtual void ImageIFramePlaceHolders(IHtmlDocument document)
    Parameters
    IHtmlDocument document

    IsEmptyParagraph(String)

    Returns true is the passed html is "empty"

    Declaration
    public bool IsEmptyParagraph(string text)
    Parameters
    System.String text

    Html to verify

    Returns
    System.Boolean

    True if considered empty, false otherwise

    TableStyleCodeToName(Int32)

    Map wiki table style to a RTE compatible style

    Declaration
    public static string TableStyleCodeToName(int tableStyleCode)
    Parameters
    System.Int32 tableStyleCode

    Code used for the wiki table style

    Returns
    System.String

    RTE compatible table style

    ThemeCodeToForegroundColorName(Int32)

    Translated SharePoint Wiki foreground theme color number (e.g. ms-rteThemeForeColor-6-1) to RTE compatible color name

    Declaration
    public static string ThemeCodeToForegroundColorName(int themeCode)
    Parameters
    System.Int32 themeCode

    Theme color code

    Returns
    System.String

    RTE color string

    Transform(String, Boolean)

    Transforms the passed html to be usable by the client side text part

    Declaration
    public string Transform(string text, bool usePlaceHolder)
    Parameters
    System.String text

    Html to be transformed

    System.Boolean usePlaceHolder

    Insert placeholders for images and iframe tags

    Returns
    System.String

    Html that can be used and edited via the client side text part

    Implements
    IHtmlTransformator.Transform(String, Boolean)

    TransformBlockQuotes(IHtmlCollection<IElement>, IHtmlDocument)

    Declaration
    protected virtual void TransformBlockQuotes(IHtmlCollection<IElement> blockQuotes, IHtmlDocument document)
    Parameters
    IHtmlCollection<IElement> blockQuotes

    IHtmlDocument document

    TransformElements(IHtmlCollection<IElement>, IHtmlDocument)

    Declaration
    protected virtual void TransformElements(IHtmlCollection<IElement> elementsToTransform, IHtmlDocument document)
    Parameters
    IHtmlCollection<IElement> elementsToTransform

    IHtmlDocument document

    TransformHeadings(IHtmlDocument, Int32, Int32)

    Declaration
    protected virtual void TransformHeadings(IHtmlDocument document, int from, int to)
    Parameters
    IHtmlDocument document

    System.Int32 from

    System.Int32 to

    TransformTables(IHtmlCollection<IElement>, IHtmlDocument)

    Declaration
    protected virtual void TransformTables(IHtmlCollection<IElement> tables, IHtmlDocument document)
    Parameters
    IHtmlCollection<IElement> tables

    IHtmlDocument document

    Extension Methods

    ValidationExtensions.ValidateNotNullOrEmpty<T>(T, String)
    ObjectExtensions.Set<TObject, T>(TObject, Expression<Func<TObject, T>>, T, Boolean, Boolean)
    ObjectExtensions.GetPublicInstancePropertyValue(Object, String)
    ObjectExtensions.GetPublicInstanceProperty(Object, String)
    ObjectExtensions.SetPublicInstancePropertyValue(Object, String, Object)
    Extensions.ToByteArray(Object)
    Back to top PnP Framework
    Generated by DocFX with Material UI
    spacer