Code Mirror 6 Wikitext Highlighting

Hey there,
I tried a lot but I don’t get it. I imported $:/plugins/BTC/tiddlywiki-codemirror-6 into a singlefile wiki. The editor changed, which is great but I don’t get highlighting as expected. So I tried to import $:/plugins/BurningTreeC/tiddlywiki-codemirror/plugins/lang-tiddlywiki. After saving I get

Internal JavaScript Error

Well, this is embarrassing. It is recommended that you restart TiddlyWiki by refreshing your browser

uncaught exception: Cannot find module named ‘$:/plugins/BurningTreeC/tiddlywiki-codemirror/lib/core.js’ required by module ‘$:/plugins/BurningTreeC/tiddlywiki-codemirror/plugins/lang-tiddlywiki/register.js’, resolved to $:/plugins/BurningTreeC/tiddlywiki-codemirror/lib/core.js

I just dragged it in the wiki, obviously that was wrong. How do I install it correctly?

Thanks for your help,
Ben

Hi @Ben

first of all, you’re mixing up two different plugins here.
The first one is an old codemirror-6 version.
The second one is the new version, but an outdated state.

Yes, there’s a bit of a mess with my CodeMirror 6 plugin versions.
I’ll point you shortly to the right page where to get the plugin.

Best wishes,
Simon

1 Like

Curious, is there a particular code block you use to test your Wikitext syntax handling? Like a “test suite” kinda thing? Ive been exploring alternative methods of wikitext highlighting, but familiar enough with wikitext to recognize a good test candidate

Hi @BurningTreeC,
thanks for your reply. Do you have the current link already?
Best wishes,
Ben

Here is the most recent demo site link I believe.

This demo site is the actual Pull Request build that adds the plugins to TiddlyWiki
I’ve removed the plugins from the preview since we’re close to the 5.4.0 TiddlyWiki release and the plugins should not be included in the TiddlyWiki website.

I currently don’t know how I should provide you the plugins.

If they get included for the 5.4.0 release we should wait for it to be ready.
If not, I should build them under my namespace and create a website for it where you can download them.

In the pull request Jeremy mentioned I should make the plugins a single plugin that includes them all, which would make its footprint heavier (download, install size).

I’m currently not settled how I should handle all this

If you wanted I could prove an unofficial, temporary “mirror” demo TW site on GitHub you could direct people towards until the plugins are merged into TW. I have a nice CI/CD workflow I use for Lithic where it would be trivial for me to update the site to the latest version of the plugins, and it would have a static URL as well that always would go to the most recent version.