Wikitext code editor

I am developing a new code editor plugin that adds an ‘edit overlay’ to an existing highlighter. I am also developing a highlighter plugin for wikitext using Prismjs. These two can be seen working together here https://unieditor.tiddlyhost.com/. The code is a pre-release, it has not been fully tested, and is for demonstration only.

Example screenshot:

10 Likes

This looks tasty, especially if it will be able to highlight building blocks in filter expressions with different colors.

This looks really interesting @buggyj Looking forward to further updates.

@buggyj This is immense – seriously.

Request: please support CSS @layer in the style/color mappings (or, don’t do anything to prevent it being used). I have a long-held need for exactly this solution where different types of content tiddlers (not just code tiddlers) could make great use of this.

Fabulous Christmas present. Thank you.

This is basically working. Given how complex wikitext is, there will be instances when the highlighting will not work. It needs more testing.

I don’t know about @layer in css. The css is given by prismjs and then I use some extra on top.

@buggyj

Is it possible to support editor autolist plug in ?

Also can there be a highlighting for list - both ordered and unordered

I don’t know which plugin will work with the unieditor, maybe the editor autolist will be one.

I have Included highlighting for what I felt were the most important bits of wikitext, it would be challenging to add more rules as they may interfere, also there could be too much coloring of the wikitext and it would become visually confusing.

@buggyj perhaps to support the colors used for different elements the editors button backgrounds could corospond eg AB for back ticks, H1… for headings etc…

  • Then the buttons act as a key to the color scheme

That’s a good idea but I have not be able to change the button (icon) color.

1 Like

I did not have a look at the code. But from my work with the palette manager edition I think there is only 1 colour available for editor buttons.

It will make palette handling even more complex as it is at the moment.

BTW Can your highlighter handle palette switches?

Also the yellow heading colour imo has not enough contrast and will be an accessibility problem. IMO it would be nice to have more contrast here.

1 Like

I have not decided what to do about colors, pismjs has it css for styling. I have used the colors/styles for html that it provides as a starting point. I guess the best approach would be to follow what happens with the tw official hightlighterjs plugin when palettes are switched?

Currently editor autolist is not working with unieditor. Can this be made to work together?

do you have example wiki?

here is the test wiki - https://unieditor-editor-autolist.tiddlyhost.com/

do you have an example of autolist working

Stroll has editor autolist pre installed …Stroll — A special kind of TiddlyWiki.

If this is not enough, i shall upload a demo wiki soon

that’s fine. I can add continuing bullet pointing when pressing return directly into unieditor.

here a demo
https://uneditordem.tiddlyhost.com/

Is this feature already in unieditor ?
I don’t see the editor autolist plug in in the demo wiki you shared