TAbstractPanelFormatter is designed with no dependencies on the Desktop frameworks. This means that any formatter you design can be used with both document components and lightweight components (components not based on a TModel class). You should implement the formatter functions so that they manipulate TText data. Your formatter should not maintain a pointer to the text data after completing the formatting, as the text may move between calls to the formatter.