How do you get CodeMirror to format/highlight code?

82 views
Skip to first unread message

Shawn Therrien

unread,
Oct 17, 2019, 5:35:30 PM10/17/19
to TiddlyWiki
I must be missing something obvious. 

I want to create a TW page to hold my code snippets. 

I see that codemirror can format sql, but I don't see this feature being referenced anywhere. 

I've created a new tiddler and tried to add "text/x-mssql" as a tag or as the type, but nothing. It just looks like text.
I get line numbers and tabs, but can't figure this out. 

For some reason the only example in the documentation of a code editor is lorum ipsum text instead of code?

PMario

unread,
Oct 18, 2019, 6:32:14 AM10/18/19
to TiddlyWiki
Hi Shawn,

There is no SQL plugin for the TW codemirror implementation at the moment. We only did implement the default languages, that are needed for TW.

javascript, html, CSS, markdown, xml, tw-classic

-m

Shawn Therrien

unread,
Oct 18, 2019, 11:45:55 AM10/18/19
to TiddlyWiki
I appreciate the answer :)

Guess I'll have to look to another plugin or tool for a code/snipped repository

PMario

unread,
Oct 19, 2019, 4:26:47 AM10/19/19
to tiddl...@googlegroups.com
On Friday, October 18, 2019 at 5:45:55 PM UTC+2, Shawn Therrien wrote:
I appreciate the answer :)
Guess I'll have to look to another plugin or tool for a code/snipped repository

hmmm, ... The trick is, to convince someone from the group, that the SQL edit mode is the second best thing since the invention of <you name it>. .. So they implement it.

At the moment codemirror only supports highlighting in edit mode, since nobody implemented a view-mode highlighter plugin ... yet. I think, you would be more interested in the view-mode or both?

-mario
Reply all
Reply to author
Forward
0 new messages