Class HtmlTransformator
Transforms the received Html in html that can be displayed and maintained in the modern client side text part
Inherited Members
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<ILog
|
Methods
CleanHtmlNodes(IHtmlDocument)
Declaration
protected virtual void CleanHtmlNodes(IHtmlDocument document)
Parameters
IHtml
|
CleanStyles(IHtmlDocument)
Declaration
protected virtual void CleanStyles(IHtmlDocument document)
Parameters
IHtml
|
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. Used color number |
Returns
System. 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. Used color number |
Returns
System. RTE color string |
DropBRs(IHtmlDocument)
Declaration
protected virtual void DropBRs(IHtmlDocument document)
Parameters
IHtml
|
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. Wiki font size code |
Returns
System. RTE font size name |
ImageIFramePlaceHolders(IHtmlDocument)
Declaration
protected virtual void ImageIFramePlaceHolders(IHtmlDocument document)
Parameters
IHtml
|
IsEmptyParagraph(String)
Returns true is the passed html is "empty"
Declaration
public bool IsEmptyParagraph(string text)
Parameters
System. Html to verify |
Returns
System. 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. Code used for the wiki table style |
Returns
System. 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. Theme color code |
Returns
System. 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. Html to be transformed |
System. Insert placeholders for images and iframe tags |
Returns
System. Html that can be used and edited via the client side text part |
Implements
TransformBlockQuotes(IHtmlCollection<IElement>, IHtmlDocument)
Declaration
protected virtual void TransformBlockQuotes(IHtmlCollection<IElement> blockQuotes, IHtmlDocument document)
Parameters
IHtml
|
IHtml
|
TransformElements(IHtmlCollection<IElement>, IHtmlDocument)
Declaration
protected virtual void TransformElements(IHtmlCollection<IElement> elementsToTransform, IHtmlDocument document)
Parameters
IHtml
|
IHtml
|
TransformHeadings(IHtmlDocument, Int32, Int32)
Declaration
protected virtual void TransformHeadings(IHtmlDocument document, int from, int to)
Parameters
IHtml
|
System.
|
System.
|
TransformTables(IHtmlCollection<IElement>, IHtmlDocument)
Declaration
protected virtual void TransformTables(IHtmlCollection<IElement> tables, IHtmlDocument document)
Parameters
IHtml
|
IHtml
|