Get to know MDN better
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Experimental: This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The TextFormat() constructor returns a new TextFormat object.
An optional object with the following properties:
rangeStartA number representing the start position of the text range that needs to be formatted.
rangeEndA number representing the end position of the text range that needs to be formatted.
underlineStyleA string representing the underline style of the text range that needs to be formatted.
underlineThicknessA string representing the underline thickness of the text range that needs to be formatted.
| EditContext API # dom-textformat-constructor |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Nov 22, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.