Hi @ChongJingHong ,
I had a look at your version of the repo and confirmed that the mermaid js resources are no longer being loaded. This is because of the change to comment out the web resource context and change it to the editor context:
<!-- <context>mermaid-plugin</context> -->
Given that the macro preview is in a iframe it has a separate context to the editor. Also by changing it to the editor context you are limiting the macro from being able to display on the view page/blog. You should definitely revert that change and go back to requiring the context everywhere that the macro is rendered.
Just as an FYI, an alternative to loading via context is to load the web resource directly
Screenshot below showing that the macro works after reverting back to loading the mermaid resources. The parameter is stored as a string in the macro xml and thus the macro also displays once the page is published.