Skip to content

Commit f38790a

Browse files
Update settings.md
1 parent 0b77606 commit f38790a

File tree

1 file changed

+16
-9
lines changed
  • libraries/radwordsprocessing/formats-and-conversion/html

1 file changed

+16
-9
lines changed

libraries/radwordsprocessing/formats-and-conversion/html/settings.md

+16-9
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,14 @@ The property specifies the default style sheet that should be used. This is equi
3232
The default value, for example, specifies that "b" elements should be imported with "font-weight: bold".
3333

3434

35-
You can set the value of the property to any valid CSS document.
35+
You can set the value of the property to any valid CSS document. **Example 1** shows how you can add styling in addition to the default ones.
36+
37+
#### [C#] Example 1: Add CSS to the DefaultStyleSheet
38+
39+
{{region }}
40+
HtmlFormatProvider provider = new HtmlFormatProvider();
41+
provider.ImportSettings.DefaultStyleSheet = provider.ImportSettings.DefaultStyleSheet + @" p {color: #ff99ac;}";
42+
{{endregion}}
3643

3744

3845
### GenericFonts
@@ -50,10 +57,10 @@ The __LoadImageFromUri__ event uses the __LoadImageFromUriEventArgs__ object whi
5057
* __SetImageInfo__: Used to pass the image data and image format (extension).
5158

5259

53-
__Example 1__ Shows how you can use the __LoadImageFromUri__ event to download an image.
60+
__Example 2__ Shows how you can use the __LoadImageFromUri__ event to download an image.
5461

55-
#### __[C#] Example 1: Use the LoadImageFromUri__
56-
{{region cs-radwordsprocessing-formats-and-conversion-html-settings_0}}
62+
#### __[C#] Example 2: Use the LoadImageFromUri__
63+
{{region cs-radwordsprocessing-formats-and-conversion-html-settings_4}}
5764

5865
HtmlFormatProvider provider = new HtmlFormatProvider();
5966
HtmlImportSettings importSettings = new HtmlImportSettings();
@@ -78,9 +85,9 @@ The __LoadStyleSheetFromUri__ event uses the __LoadStyleSheetFromUriEventArgs__
7885
* __Uri__: The URI originally specified in the imported HTML file.
7986
* __SetStyleSheetContent__: Used to pass the styles as string.
8087

81-
__Example 2__ Shows how you can use the __LoadStyleSheetFromUri__ event.
88+
__Example 3__ Shows how you can use the __LoadStyleSheetFromUri__ event.
8289

83-
#### __[C#] Example 2: Use the LoadStyleSheetFromUri event__
90+
#### __[C#] Example 3: Use the LoadStyleSheetFromUri event__
8491
{{region cs-radwordsprocessing-formats-and-conversion-html-settings_0}}
8592

8693
HtmlFormatProvider provider = new HtmlFormatProvider();
@@ -113,7 +120,7 @@ When importing HTML, which contains images with URI source, the **HtmlFormatProv
113120

114121
The **UriImageSource** objects are always exported as images with URI as their source independently of the export settings. If you need to export this object as an embedded or external image, you could convert the **UriImageSource** to **ImageSource** object.
115122

116-
#### __[C#] Example 3: Convert UriImageSource to ImageSource__
123+
#### __[C#] Example 4: Convert UriImageSource to ImageSource__
117124

118125
{{region cs-radwordsprocessing-formats-and-conversion-html-settings_2}}
119126
UriImageSource uriImageSource = imageInline.Image.ImageSource as UriImageSource;
@@ -234,10 +241,10 @@ The event is only raised when the __StylesExportMode__ property is set to __Exte
234241
* __Reference__: The value that will be set to the "href" attribute of the "link" element tag. In general, this should be set to the absolute or relative path pointing to the file containing the CSS styles.
235242

236243

237-
__Example 3__ demonstrates how you can create export settings.
244+
__Example 5__ demonstrates how you can create export settings.
238245

239246

240-
#### __[C#] Example 4: Create HtmlExportSettings__
247+
#### __[C#] Example 5: Create HtmlExportSettings__
241248

242249
{{region cs-radwordsprocessing-formats-and-conversion-html-settings_1}}
243250
HtmlFormatProvider provider = new HtmlFormatProvider();

0 commit comments

Comments
 (0)