Class TextFormat
- Namespace
- CSharpToJavaScript.APIs.JS
- Assembly
- CSharpToJavaScript.dll
NOTE
ExperimentalTextFormat interface represents specific formatting that should be applied to a range of text in an editable text region that's attached to an EditContext instance. The text formatting is requested by the {{glossary("Input Method Editor")}} (IME) window that the user is composing text with.
[Value("TextFormat")]
public class TextFormat
- Inheritance
-
TextFormat
- Inherited Members
Remarks
When using one of the default editable regions of the web, such as a <textarea> element, IME composition is handled by the browser and operating system for you. For example, when using Japanese IME in a textarea, on Windows, the following text formats can be applied:
When creating your own custom editable region by using the {{domxref("EditContext API", "", "", "nocode")}}, you need to handle IME composition yourself. You should listen for the EditContexttextformatupdate event, which gives you the list of text formats that the IME window wants to apply to the text being composed. You should then update the formatting of the text displayed in your editable region accordingly.
Constructors
TextFormat()
public TextFormat()
TextFormat(TextFormatInit)
public TextFormat(TextFormatInit options = null)
Parameters
optionsTextFormatInit
Remarks
-The TextFormat interface it belongs to.
Properties
RangeEnd
NOTE
ExperimentalrangeEnd property of the TextFormat interface indicates the end position of the text range that needs to be formatted with the given text format.
[Value("rangeEnd")]
public ulong RangeEnd { get; }
Property Value
Remarks
-The TextFormat interface it belongs to.
RangeStart
NOTE
ExperimentalrangeStart property of the TextFormat interface indicates the start position of the text range that needs to be formatted with the given text format.
[Value("rangeStart")]
public ulong RangeStart { get; }
Property Value
Remarks
-The TextFormat interface it belongs to.
UnderlineStyle
NOTE
ExperimentalunderlineStyle property of the TextFormat interface indicates the style of the underline that needs to be applied to the text range that is being formatted.
[Value("underlineStyle")]
public UnderlineStyle UnderlineStyle { get; }
Property Value
- UnderlineStyle
A String that is one of the following values:
Remarks
-The TextFormat interface it belongs to.
UnderlineThickness
NOTE
ExperimentalunderlineThickness property of the TextFormat interface indicates the thickness of the underline that needs to be applied to the text range that is being formatted.
[Value("underlineThickness")]
public UnderlineThickness UnderlineThickness { get; }
Property Value
- UnderlineThickness
A String that is one of the following values:
Remarks
-The TextFormat interface it belongs to.