$setFormatFromDOM
functionReads the `style` and CSS `textAlign` property from a DOM element and set format to the given ElementNode via ElementNode.setFormat when it is a valid alignment value ElementFormatType Other values, including missing or empty, leave the node unchanged. Useful inside `importDOM` converters to preserve explicit alignment from imported HTML.
Import
import { $setFormatFromDOM } from '@modular/sdk/editor';Notes
- returns
- The node, with its align format set when the source `style.textAlign` was valid.