Fix to work without errors in Nuxt Universal (#723)

by @patarapolw 

* allow manual init and destroy for use with Nuxt

* fix onDestroy-related methods

* avoid global scope, and use function scope instead

* add createInstance function to window.REMARK42

* 1. allow DOMNode to be put in remark_config 2. check remark_config before try to attach node

* move createInstance function outside

* update embed.ts

* avoid ?.

* 📚 Docs: doc on how to make it work with SPAs

* 📚 Docs: fix spa.md to be more flexible

*  Feat: add REMARK42::ready event

* remove nuxt-specific terminologies

* tell MutationObserver to disconnect on destroy

* update docs/spa.md
This commit is contained in:
Pacharapol Withayasakpunt
2020-07-31 12:21:00 -05:00
committed by GitHub
parent d1268bbe8c
commit 5d6729ddd5
7 changed files with 197 additions and 77 deletions
+1
View File
@@ -2,6 +2,7 @@
- [How to configure remark42 with nginx reverse proxy](nginx-proxy.md)
- [How to configure remark42 without a subdomain](subdomain.md) with Nginx or Caddy
- [How to configure remark42 for Single Page Apps (SPA)](spa.md)
- [Telegram notifications](telegram.md)
- [Setup email authentication and\or email notifications](email.md)
- [How to add new translation to remark42](translation.md)