Wikidot Monaco

Chrome / Firefox 扩展Extension for Chrome and Firefox

用 VS Code 的编辑器
编写 Wikidot 页面
Write Wikidot pages
in the editor of VS Code

把 wikidot 的源码编辑框换成 Monaco 编辑器,带 wikidot 语法高亮、标签与模块补全、悬停说明和带高亮的版本比较。装好即用,不改变原有的编辑流程。 Replaces the wikidot source box with the Monaco editor: wikidot syntax highlighting, completion for tags and modules, hover docs and highlighted revision diffs. Works as soon as it is installed, without changing how you edit.

  • MIT 许可MIT licensed
  • 不依赖 CDNNo CDN
  • 中文 / EnglishEnglish / 中文
  1. + Welcome
  2. [[div class="notice"]]
  3.   **Hello**, see [[[main|home]]].
  4. [[/div]]
  5. [[module ListPages category="news" limit="5"]]
  6. * %%title_linked%% — %%created_at%%
  7. [[/module]]
  8. [[co

特性Features

页面编辑、论坛发帖、查看源代码和页面历史,都换成同一个编辑器。 Page editing, forum posts, page source and page history all use the same editor.

语法高亮Syntax highlighting

标题、标签、属性、链接、ListPages 变量各有颜色;[[module CSS]] 和 [[html]] 块内按 CSS / HTML 高亮。 Headings, tags, attributes, links and ListPages variables in their own colors; CSS and HTML highlighting inside [[module CSS]] and [[html]].

自动补全Autocomplete

补全标签、属性、模块和 ListPages 变量,补全 [[div]] 时自动加上 [[/div]]。 Completes tags, attributes, modules and ListPages variables, and adds [[/div]] when completing [[div]].

悬停说明Hover docs

鼠标停在标签、模块、属性或变量上,就能看到它的用法。 Rest the pointer on a tag, module, attribute or variable to see how it is used.

页面跳转Page links

按住 Ctrl 点击 [[include ...]]、[[[页面]]] 中的页面名,在新标签页打开。 Ctrl+click the page in [[include ...]] or [[[page]]] to open it in a new tab.

版本比较Revision diffs

页面历史的「源代码变更」以带高亮的左右对比显示,未改动部分自动折叠;手机上可改为内联。 Source changes in page history are shown side by side with highlighting, unchanged parts folded; switch to inline on phones.

保存超时Save timeout

网络不好时,保存不再一直卡在「Saving page...」:超时后提示失败,可以直接再存一次。 On a bad connection saving no longer hangs on “Saving page...”: after a timeout you get an error and can save again.

兼容原有工具Keeps your tools working

原文本框仍在页面中,读写都转给编辑器;wikidot 的编辑工具栏和社区插件照常工作。 The original textarea stays on the page and reads and writes the editor, so the wikidot toolbar and community scripts keep working.

随时切换回去Switch back anytime

右键菜单「切换到纯文本框」,再点 −/+ 旁的「Monaco」即可切回,内容与选区都保留。 “Switch to Plain Textarea” in the context menu; the “Monaco” button next to −/+ brings the editor back, with text and selection kept.

离线、按需加载Offline, on demand

Monaco 完整打包在扩展内,不请求任何 CDN;页面上出现编辑框时才加载。 Monaco is bundled in the extension with no CDN requests, and loads only when an edit box appears.

按自己的习惯调整Make it yours

主题、字号、行高、换行、行号、缩略图、补全方式……设置在各设备间同步,改完立即生效。也可以在编辑器里右键打开设置页。 Theme, font size, line height, word wrap, line numbers, minimap, how suggestions show up… Settings sync across devices and apply right away. Right-click in the editor to open them.

  • 浅色、深色或跟随系统Light, dark, or follow the system
  • 输入时补全、仅 Ctrl+Space 或关闭Suggest while typing, on Ctrl+Space only, or never
  • 标签内回车自动闭合并缩进Enter in tags closes them and indents
  • 一键关闭,恢复原本的文本框One switch to go back to the plain text box
启用Enable
编辑页面、发帖和查看源代码时,使用带语法高亮的编辑器代替原本的文本框。Use an editor with syntax highlighting instead of the plain text box when editing pages, posting, and viewing source.
保存超时(秒)Save timeout (seconds)

保存页面或发帖超过这个时间没有响应时,提示失败,可以重新保存。0 表示一直等待。If saving a page or a post gets no response in this time, show an error so you can save again. 0 waits forever.

30
主题Theme
跟随系统Follow system
字号Font size
14
行高Line height

字号的倍数。A multiple of the font size.

1.5
自动换行Word wrap
长行折到下一行显示,不会改动源码。Show long lines on several lines. The source text is not changed.
行号Line numbers
在编辑器左侧显示行号。Show line numbers on the left side of the editor.
缩略图Minimap
在编辑器右侧显示全文缩略图。Show an overview of the whole text on the right side of the editor.
显示补全Show suggestions
输入时While typing
自动闭合标签Close tags
补全 [[div]] 时自动加上 [[/div]]。Add [[/div]] when completing [[div]].
标签内回车Enter in tags
在 [[div]] 后回车时自动加上 [[/div]],并缩进中间的一行;在未写完的标签中回车会先补全标签。Enter after [[div]] adds [[/div]] and indents the line between; Enter in an unfinished tag finishes it.
源代码变更Revision changes

在页面历史中比较版本时,改动的显示方式。How changes are shown when comparing revisions in the page history.

左右对比Side by side

安装Install

按浏览器选择安装方式。装好后打开任意 wikidot 站点的编辑页即可。Pick your browser. Once installed, open the editor on any wikidot site.

Firefox

需要 Firefox 128 或更新版本Requires Firefox 128 or later

已上架 Firefox 附加组件商店,安装后会自动更新。Available on Firefox Add-ons, with automatic updates.

从 Firefox 附加组件商店安装Get it on Firefox Add-ons
手动安装Install manually
  1. 在 GitHub Releases 下载经 Mozilla 签名的 .xpiDownload the .xpi signed by Mozilla from GitHub Releases
  2. 把文件拖进 Firefox 窗口,或在 about:addons 中「从文件安装附加组件」Drop it on a Firefox window, or use “Install Add-on From File” in about:addons
  3. 确认添加Confirm the install

Chrome / Edge

需要 Chrome 111 或更新版本Requires Chrome 111 or later

  1. 在 GitHub Releases 下载 .zip 并解压Download the .zip from GitHub Releases and unpack it
  2. 打开 chrome://extensions,开启「开发者模式」Open chrome://extensions and turn on Developer mode
  3. 点「加载已解压的扩展程序」,选择解压后的文件夹Click “Load unpacked” and choose the unpacked folder
前往 GitHub ReleasesGo to GitHub Releases

从源码构建Build from source

用 TypeScript 和 Vite 构建。build/ 可直接作为已解压的扩展加载到 Chrome,Firefox 版输出到 build-firefox/。 Built with TypeScript and Vite. Load build/ in Chrome as an unpacked extension; the Firefox build goes to build-firefox/.

$ git clone https://github.com/rHanbowChic/wikidot-monaco
$ cd wikidot-monaco
$ npm install
$ npm run build          # Chrome → build/
$ npm run build:firefox  # Firefox → build-firefox/