$headNode.ReplaceChild($titleNew, $titleNode) $titleNew = '' + $titleText + ' - SMART Technologies' | ConvertFrom-HTML This is an example modification from our script that appends “SMART Technologies” to the tag in our topics: $titleNode = $htmlDom.SelectSingleNode("//head/title") It is written in C# and supports plain XPath and XSLT. Html Agility Pack is an HTML parser that is ideally suited to modifying HTML output like that created by MadCap Flare. This module is a wrapper for Html Agility Pack in PowerShell. The developer we worked with used the PowerHTML module to handle several of the modifications in the script.
This developer created a set of PowerShell scripts on Linux that we then tested and used on Windows to modify our HTML5 outputs. Build events allow you to make changes to these files that you previously could do manually or not at all.Įarlier this year, the SMART technical communications team worked with Matthew Stobbs, a developer in our company’s dev ops group, to find a way to modify the HTML5 output we generated from MadCap Flare to work with the rest of our corporate website. Thanks for helping make community forums a great place.MadCap Flare’s build events feature is a useful tool for making changes to your MadCap Flare source and output files. We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
If you have anything else regarding C# grammar ,please feel free to let me know. TextRange.Save(rtfMemoryStream, DataFormats.Rtf) įor more details, you can refer to this from Microsoft dev Center:
TextRange.Load(xamlMemoryStream, DataFormats.Xaml) XamlMemoryStream.Seek(0, SeekOrigin.Begin) Using (var xamlStreamWriter = new StreamWriter(xamlMemoryStream)) Using (var xamlMemoryStream = new MemoryStream()) If (string.IsNullOrEmpty(xamlText)) return "" Private static string ConvertXamlToRtf(string xamlText)
Here is the code snippet about XAML to RTF : Using (var rtfStreamReader = new StreamReader(rtfMemoryStream)) TextRange.Save(rtfMemoryStream, DataFormats.Xaml) TextRange.Load(rtfMemoryStream, DataFormats.Rtf) RtfMemoryStream.Seek(0, SeekOrigin.Begin) Using (var rtfStreamWriter = new StreamWriter(rtfMemoryStream)) Using (var rtfMemoryStream = new MemoryStream()) If (string.IsNullOrEmpty(rtfText)) return "" RTF to XAML : private static string ConvertRtfToXaml(string rtfText) which can load RTF/XAML from a stream and save it as XAML/RTF. ġ.We could convert HTML to XAML from this code sample provided by MSDN : Ģ.We need to convert the XAML /RTF files to each other ,The key is to use Thus ,the transfer media between RTF and HTML would be XAML language. It is convenient to convert XAML language to HTML. As far as I know, C# language does covert HTML to RTF and convert RTF to HTML.