-
Notifications
You must be signed in to change notification settings - Fork 2
Browser (EN)
A simplified API is provided for browsers, which does not support modifying the syntax tree. In general, it is recommended to use the various extensions listed below rather than direct use.
If you are using WikiParser-Node through extensions, skip this section.
You can download the code through CDN, such as:
<script src="//cdn.jsdelivr.net/npm/wikiparser-node@browser"></script>
or
<script src="//unpkg.com/wikiparser-node@browser"></script>
This script will add a global variable Parser
.
This is the base extension, and is also a dependency of other extensions. You can download the code through CDN (it is recommended to use jsDelivr to combine multiple extensions), such as:
<script src="//cdn.jsdelivr.net/npm/wikiparser-node@browser/extensions/dist/base.min.js"></script>
or
<script src="//unpkg.com/wikiparser-node@browser/extensions/dist/base.js"></script>
This script will add a global variable wikiparse
, and its methods are documented here.
This extension adds a highlight
method to the global variable wikiparse
, which can be used to highlight static code. You can test the effect here. You can download the code through CDN:
<script src="//cdn.jsdelivr.net/combine/npm/wikiparser-node@browser/extensions/dist/base.min.js,npm/wikiparser-node@browser/extensions/dist/highlight.min.js"></script>
This extension adds an edit
method to the global variable wikiparse
, which can be used to highlight text boxes. You can download the code through CDN:
<script src="//cdn.jsdelivr.net/combine/npm/wikiparser-node@browser/extensions/dist/base.min.js,npm/wikiparser-node@browser/extensions/dist/editor.min.js"></script>
This extension adds a Linter
constructor to the global variable wikiparse
, which can be used to report grammar errors. You can test the effect here. You can download the code through CDN:
<script src="//cdn.jsdelivr.net/combine/npm/wikiparser-node@browser/extensions/dist/base.min.js,npm/wikiparser-node@browser/extensions/dist/lint.min.js"></script>
This extension adds an codejar
property to the global variable wikiparse
, which can be used to highlight text boxes. You can test the effect here. You can download the code through CDN:
<script src="//cdn.jsdelivr.net/combine/npm/wikiparser-node@browser/extensions/dist/base.min.js,npm/wikiparser-node@browser/extensions/dist/codejar.min.js"></script>
对维基文本批量执行语法检查的命令行工具
用于维基文本的 ESLint 插件
A command-line tool that performs linting on Wikitext in bulk
ESLint plugin for Wikitext