Repository navigation
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"></script>or
<script src="//unpkg.com/wikiparser-node/bundle/bundle-lsp.min.js"></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/extensions/dist/base.min.js"></script>or
<script src="//unpkg.com/wikiparser-node/extensions/dist/base.js"></script>This script will add a global variable wikiparse, and its methods are documented here.
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:
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/wikiparser-node/extensions/ui.css">
<script src="//cdn.jsdelivr.net/combine/npm/wikiparser-node/extensions/dist/base.min.js,npm/wikiparser-node/extensions/dist/codejar.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:
<link rel="stylesheet" href="//cdn.jsdelivr.net/combine/npm/wikiparser-node/extensions/ui.css,npm/wikiparser-node/extensions/editor.min.css">
<script src="//cdn.jsdelivr.net/combine/npm/wikiparser-node/extensions/dist/base.min.js,npm/wikiparser-node/extensions/dist/editor.min.js"></script>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:
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/wikiparser-node/extensions/ui.css">
<script src="//cdn.jsdelivr.net/combine/npm/wikiparser-node/extensions/dist/base.min.js,npm/wikiparser-node/extensions/dist/highlight.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/extensions/dist/base.min.js,npm/wikiparser-node/extensions/dist/lint.min.js"></script>This extension adds a LanguageService constructor to the global variable wikiparse, which can be used as a language server. You can download the code through CDN:
<script src="//cdn.jsdelivr.net/combine/npm/wikiparser-node/extensions/dist/base.min.js,npm/wikiparser-node/extensions/dist/lsp.min.js"></script>This extension adds a parse method to the global variable wikiparse, which can be used to parse wikitext into a navigable tree. You can download the code through CDN:
<script src="//cdn.jsdelivr.net/combine/npm/wikiparser-node/extensions/dist/base.min.js,npm/wikiparser-node/extensions/dist/parse.min.js"></script>对维基文本批量执行语法检查的命令行工具
轻量级的维基模板解析器
维基文本语言服务器协议实现
用于维基文本的 VS Code 扩展
A command-line tool that performs linting on Wikitext in bulk
A lightweight Wikitext template parser
An implementation of the Language Server Protocol for Wikitext
VS Code extension for Wikitext