HTML property

Sets or returns the contents of a rich text field in HTML format.

Syntax


C++

HRESULT get_HTML(BSTR* pHTML)

HRESULT put_HTML(BSTR myHTML)

Scripting languages

String = Object.HTML

Object.HTML = String

Remarks


Supported Tags

eRoom supports the following subset of HTML tags:

  • a (anchor)

  • b (bold)

  • br (break)

  • div (divide)

  • span (span)

  • i (italics)

  • font (font)

  • p (paragraph)

  • u (underline)

  • ul (unordered list)

  • li (list item)

  • img (image)

How eRoom Handles HTML

HTML must be well-formed or it will rejected by eRoom.  If you set a property with an HTML-formatted string, unsupported HTML tags are filtered out, and some tags are translated to other tags.

eRoom's HTML format encloses content in <div class="user"></div> tags.  Any <div></div> or <p></p> tags are automatically converted to <div class="user"></div> tags. Fonts and other text styles are specified with <span></span> tags.  This means that <font></font> tags are automatically converted to <span></span> tags.

When an HTML property is retrieved from the eRoom server, images are referenced in <img> tags with a file:// URL. That URL identifies the server file that contains the image. When setting HTML properties with values that contain images, eRoom will copy the images referenced by the file:// URLs to the eRoom server. eRoom preserves images in the HTML whose URLs remain unchanged between retrieving the property and setting the property.

Example

The following example illustrates how to use eRoom-supported HTML tags while setting an HTML property that contains an image and rich text formatting:

myhtml="<div class=""user""><a href=""http://www.eroom.com"" >Link</a><b>, Bold Text,<span style=""font-family: Times New Roman; color: #ff0000; font-size: 18pt;"">Text in different <u>Font</u> and <u>Color</u></span>, Back to Bold </b>&nbsp;&nbsp;and an image<img src= ""file://C:/ServerData/_Graphics/First/0_240f/DescriptionGraphic0001v1.gif"" width=""13""></div>"

obj.Description=myhtml    'Set html

 

When displayed, the above example HTML appears as follows:

Link, Bold Text,Text in different Font and Color, Back to Bold and an image

Home

Applies to

IERURichText


See also

Text Property