CodeMirror 6 plugin (alpha)

Hi TiddlyWikians,

in a hurry I’ve created a plugin that adds the CodeMirror 6 editor to TiddlyWiki

The reason is, that within the Muuri Storyview the default editor and the CodeMirror 5 editor have some problems

The plugin is in very raw alpha state and it’s not supposed to be used reliably

You can find the page for testing here

Note that some things don’t work like dropping stuff into the editor

The editor toolbar buttons should work but I haven’t tested them yet

If they work, they work with multiple selections, too

Also, the editing on mobile devices should be better

Please comment if you think this is a useful plugin and should see further development

Also, if you find bugs / quirks / issues, please let me know

Thank you so far and best wishes from Southtyrol,


I am not an expert in using codemirror. I have used codemirror before and have it installed in my wikis. But this looks way better than the previous version of codemirror and is easy to use. I like the highlighting of similar word on text selection. Search and replace was working in my testing.

Will definitely report any bugs I encounter here.
When will this plug in be added to the official TW plug ins replacing the old codemirror 5 version

1 Like

Good start BTC. I like it!
The toolbar buttons work for me!
The shortcuts (like ctrl+B for bold, etc.) do not work.

1 Like

Wow, I love the ctrl+F and the new search and replace in tiddler!

The size of CodeMirror 6 is ~1.38MB. Does Uglify support compressing this plugin?
I gave a try! and it seems to work! but like to have your answer!

This is really cool, I always think improving the editor experience is an important thing


I see CodeMirror 6 supports bidrectional text. This is amazing for Persian/Hebrew/Arabic/Urdu users! Does the currect plugin support BiDi?

1 Like

codemirror.js is already a compressed file. It is too big and it feels unlikely to enter the official plugin (but if the experience is good enough, I can completely ignore its size problem)

Hi @Mohammad,

I haven’t tried that yet. How much could you cut down its size?

Yes, I know that it supports bidirectional text, too
I haven’t looked into it yet but it shouldn’t be too difficult
I’ll give it a shot later this day

1 Like

Hi @oeyoews ,

yes, I think so, too

Is keymap supported now? I saw this GitHub - replit/codemirror-vim: Vim keybindings for CM6

Maybe it can be made into an addon


keyMap is not supported yet

It still loads the default keyMap with basicSetup

I’ll take a look at the code and try to support it

1 Like

Using the current Uglify plugin: Wizard Page

  • Demo: 3.93 MB
  • Compressed demo: 2.63MB
  • CodeMirror 6 plugin: 1.35MB
  • Compressed CodeMirror 6 plugin: 1.08 MB
1 Like


You can now toggle rtl text

1 Like

Thank you! It works :wink:

I dunno. If it seems to work, it probably works? Never heard of the CodeMirror plugin before.

Uglify tries to be conservative when it comes to compressing and not break stuff, but thanks to “\define”, it’ll never be the case that it can do so flawlessly. But since it only effects the plugin, it’s easy to roll back if it messes up somehow.

1 Like

JS auto-completion is cool, but if you set the js type for this tiddler, copying will trigger tiddlywiki’s paste text event

Hi @oeyoews

What do you mean?

The JS auto-completion doesn’t work yet, I’m working on that