Click or drag to resize

IModelEditcss Property

Sets the CSS which should be used to render the document.

Namespace:  ModelText.ModelEditControl
Assembly:  ModelEditControl (in ModelEditControl.dll) Version: 1.3.6625.33902
Syntax
string css { set; }

Property Value

Type: String
Remarks
To be effective, this property must be set before the document is loaded and rendered, i.e. before you invoke the newDocument, openDocument(TextReader), or openDocumentFragment(String, TextReader) methods.

If you set this property to null, then the control will use its own built-in style sheet.

If you set this property to an empty string, then the control will use no style sheet, in other words it will use a 'reset' style sheet which is based on Appendix D of the CSS specification.

After you set this property, its value remains set for the lifetime of the control instance: the same CSS definition will be used for all the HTML that you load and reload into the control.

As well as or instead of using this property, you can also use:

  • The style= attribute on specific HTML tags (for example, <span style="display: inline-block">Foo Bar</span>).
  • The <style< elemement in the head of the document (for example, <style>span {display: inline-block}</style>).

See Also