Is there a way to use macro in HTML format

Is there a way to use macro in HTML format?
I need to deploy HTML files to xwiki, while convert to xwiki 2.1, will be added Heading 2 to the page.
If not convert the format, can keep composition of the page

Hello,

I find it difficult to understand what you need to achieve.

How many HTML files do you need to import into XWiki?

Where do you take the from, is it another online platform and if so which one?

Can you explain what it is you have, and what it is you want it to become, with one step per line you write, for example?

And what do you need a macro for? At which stage of your import process?

There are dozens of HTML contents from Microsoft SharePoint need to be uploaded to XWiki.

The macro I need is the TOC, table of contents, at final stage, to generate table.

There is a page of information related to the TOC macro here : https://forum.xwiki.org

I would not know what the shape of MS Sharepoint HTML files exported would look like. However, there is a complete page of documentation here : SharePoint to XWiki: structured documents migration - XWiki. It might help you get started.

The link to the doc was incorrect:
https://extensions.xwiki.org/xwiki/bin/view/Extension/TOC+Macro
and
https://www.xwiki.org/xwiki/bin/view/Help/Macros/ToC/


If you’re using a HTML macro, you need to allow wiki syntax in your HTML macro in order to use other macros inside.

See the wiki parameter on https://extensions.xwiki.org/xwiki/bin/view/Extension/HTML%20Macro#HUsage :slight_smile:

Lucas C.

Yes, sorry for the wrong link, I appearantly had the wrong link in the clipboard and didn’t notice!

If I set the page syntax to HTML 5.0, could the macro be used in the page?
Or only XWIKI 2.1 support the macro?

The XWiki macro syntax and all Xwiki macros are specific to the XWiki syntax :slight_smile:

Lucas C.

This is not fully correct actually. A lot of syntax parsers/renderers support the xwiki/2.0+ syntax for macros.

1 Like

Note that the Annotated XML syntaxes also support macros using special comments to express them.

It seems we’re lacking an exo page for (Annotated) (X)HTML syntax modules… (and there’s no link to them at https://rendering.xwiki.org/xwiki/bin/view/Main/WebHome#HSupportedSyntaxes ).

1 Like