Overtype as an MD Editor!

EDIT:

I got a proof of concept using Overtype as an editor here:


Hello tiddlers,

Today while browser around I stumbled upon:

Since it has zero dependencies and tiddlywiki has a decent amount of Markdown support via plugins I thought it might make a cool editor for markdown tiddlers.

I’m still relatively new to TiddlyWiki, I tried having a go at adding it as a plugin but I couldn’t get it working correctly.

Do you think this is feasible? Just let me know, thanks!

-Tyler

No needing these editor framework. If we want a WYSIWYG editor, we will need to build our own, like https://github.com/TiddlyWiki/TiddlyWiki5/pull/8991 or old https://github.com/tiddly-gittly/slate-write

Because we need to support widget / macro / procedure / function that is not only available in Wikitext, but also in markdown inside tiddlywiki.

For my use case I’m not as concerned with the wikification, plus overtext is more of “fancy markdown syntax highlighting” since it doesn’t remove any of the ‘control characters’

I basically just want overtext as syntax highlighting when editing pure markdown tiddlers as an alternative to the existing code mirror plugins.

Just a quick note to say that you seem to have linked to a fork of the still-active project https://github.com/panphora/overtype. I haven’t dug in to see if there are significant reasons for the fork, but if not, it’s probably better to stick to the original.

2 Likes

Thanks again that was a mistake lol.

I’ve been mangling my links here.

Ok I got a WIP working that even works with the comptext plugin.

The comptext dropdown is wildly misplaced at the moment (type [[ or /) but other than that overtype seems to work pretty well as an MD editor for Streams.

-Xyvir

This is a very similar idea to https://unieditor.tiddlyhost.com/

1 Like

Hadn’t seen that one yet, pretty neat.

Did you write the plugin?

Yes I did. It will work with any type that is supported by the hightlight.js plugin or the prism.js plugin

1 Like

the repository is here GitHub - buggyj/unieditor

1 Like

Thanks for the link!

I have used unieditor on various sites, and it’s a nice compact alternative to codemirror, which was a bit too fiddly for me…

I just ran across an incompatibility, though.

I haven’t yet had time to troubleshoot, but you may be faster at recognizing the conflict than I am.

I’ll see what I can do to narrow the problem down, but in case you (@buggyj) want to take a look… I’ll edit here if I get clearer on the source of the problem.

UPDATE: RSOD with unieditor upon attempt to edit under 5.3.8 — see this newborn wiki demo

UPDATE: AHA! The RSOD only happens if TiddlyPrism is not also installed! So there’s an effective dependency. Don’t install unieditor without TiddlyPrism …

1 Like

Yes I believe the readme mentions that unieditor gets it’s syntax highlighting (styling) via prism

Currently there’s no such warning on the tin:

Of course that dependency makes complete sense.

Still… failure of dependency should ideally fail gracefully rather than with RSOD.

yer, thats no good! I will fix it when I have time. The editor will also work with standard tw highlighter, but there is no wikitext support with it. I used prism.js as It was much easier (but no easy) to understand how to create the wikitext highlighting.

2 Likes

To enable editing of markdown put uni in the tiddler $:/config/EditorTypeMappings/text/markdown

1 Like

Thanks I’m gonna try out unieditor later today for markdown editing.

Is markdown one of the built-in language highlighting or is that fetched via prism?

it is fetched by prism, only css html javascript and wikitext are baked-in

https://prismjs.com/download.html?themes#themes=prism-funky&languages=markup+css+clike+javascript&plugins=autoloader

1 Like

unieditor is really neat!

would you happen to know if there is any way to get it to play nice with snowgoons comptext plugin?

Edit-CompText Demo — a demo of the Edit-CompText plugin for TiddlyWiki5

Just let me know, thanks!

-Xyvir

It doesn’t look like they would work together.

1 Like