Where to find the example code for New : Auto HTML formatter for TAdvMemo

Hi,
You mention in the latest blog: New : Auto HTML formatter for TAdvMemo.
Is the example anywhere to find?

Here is a sample that demonstrates this.
All you need to do is set AdvMemoHTMLStyler.AutoFormat = true and call AdvMemo.Format

AdvMemo.zip (14.0 KB)

How about an autostyler for json?

And it would be great if the styler added "Expand/Collapse branch" regions automatically.

TAdvJSONMemoStyler also has AutoFormat property
Normally if you set AdvMemo.CodeFolding.Enabled = true, it should apply the expand/collaps nodes

Great! I'll try that out...

Just an FYI for others. The order in which to set the properties matter. This is the order that made it work in my setup:

Memo.SyntaxStyles:=Styler;
Memo.Lines.Text:=TXT;
Memo.CodeFolding.Enabled:=Styler.IsKindOf(TAdvJSONMemoStyler) OR Styler.IsKindOf(TAdvXMLMemoStyler);

(IsKindOf is an exception-protected IS)

I don't see an AutoFormat property on XML Styler. Is it possible to auto-detect code folding regions for an XML document?

At this moment, this capability is unfortunately not built-in in TAdvXMLMemoStyler