Class HTMLText

java.lang.Object
com.ptc.core.richtext._HTMLText
com.ptc.core.richtext.HTMLText
All Implemented Interfaces:
com.ptc.core.richtext._RichText, com.ptc.core.richtext.RichText, Externalizable, Serializable, Comparable, wt.fc._NetFactor, wt.fc._ObjectMappable, NetFactor, ObjectMappable

This class is an XHTML implementation of RichText that can be assigned as a data type to modeled and soft object attributes. Implementers should be aware of the limitations and performance impact of this data type.

Only a subset of XHTML tags and tag attributes may be included in HTMLText values.


Use the newHTMLText static factory method(s), not the HTMLText constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
  • Method Details

    • newHTMLText

      public static HTMLText newHTMLText(String rawText) throws WTPropertyVetoException
      Creates a new instance with the given text. The input rawText is expected to be encoded in UTF-8 and will be converted to the Windchill XHTML format by the HTMLTextFilter before being set as the text for this instance.

      Supported API: true
      Parameters:
      rawText -
      Returns:
      HTMLText
      Throws:
      WTPropertyVetoException
    • getPlainText

      public String getPlainText() throws WTException
      Returns plain text of HTML text.

      Supported API: true
      Returns:
      String
      Throws:
      WTException