roadkill
roadkill copied to clipboard
Full Wysiwyg
Since Roadkill is designed for Markup but can handle HTML. Has anyone tried using a stripped CKEditor or TinyMCE integration?
The next version will be markdown only, which should open up a lot of options for customising the editor (there will also be a new editor). Any OS markdown editor suggestions are welcome!
How about using https://github.com/GetmeUK/ContentTools for the editor?
FWIW, I've got TUI Editor working on a customized instance of the latest stable version. Works well overall but with some quirks when it comes to certain kinds of code blocks. I can work around that with a minor hack, but I bet there's a way to configure TUI so the problem gets solved at the source.
https://github.com/nhnent/tui.editor
TUI editor sounds interesting, I'll need to check the license but it might be good for v3
Right now I'm trying to get its wysiwyg code block editor to play nice with the syntaxhighlighting plugin. When in wysiwyg mode, square brackets, pipes, and hyphens automatically get backslash escaped, so I'm hacking it to remove the backslashes with a regex in jQuery when TUI's change event gets triggered, but there's gotta be a better way. Also, TUI represents code blocks with the "``` lang" style syntax. Would be nice if v3 respected that as well. That's another thing I'm regex replacing at the moment.
@yetanotherchris As a proof of concept, I've cobbled together roadkill and tui-editor in a forked repo. It needs a lot of cleanup, and I'm not adhering to CommonMark, but it's largely functional. The organization I work for has allowed me to make these modifications public, and I intend to keep refining as more of our internal users start adopting the roadkill instance I have set up. But the higher-ups do want a certain amount of interoperability with other tools such as Mattermost, which is why I'm supporting some GFM syntaxes like tables.
https://github.com/clone206/roadkill/tree/tui-editor
Looks interesting, I've been doing proof of concepts for v3 HTML generation and I think it'll still be server side so there's caching, but editor view should certainly be client side now.
Does Tui work well with React?
@yetanotherchris There is a wrapper for React mentioned on the Tui github page, but we're a .NET/angular shop here, and there's also an npm that provides an angular component for Tui, so I'll probably be exploring eventually moving our modified roadkill 2.0 instance to angular on the front end for the edit page. I'd love to be able to contribute back to your project. I finally got the green light to spend some real time on our roadkill instance, so I plan on doing a lot of cleanup on it in the near future.
My focus now is on V3 which is essentially a rewrite using React and .NET Core API backend. So if you are able to contribute to that or able to make it work for v2 and v3 that would be amazing.
@yetanotherchris Ok, I'll work on the jQuery v2 version for now and see if the higher-ups are ok with me working on a react project for v3, in which case I should be able to eventually contribute to v3. Probably not too tough of a sell, since we're already working on a mattermost plugin, and that's basically a shimmed react app. We do have some specific needs based on our environments (SQL Server, GFM), so I expect some of my work will diverge from what you're doing, unless you're open to incorporating those features into v3.
When I have the v2 tui editor version a bit more stable, I'll submit a pull request. Though even that version has currently strayed from Commonmark quite a bit.
@yetanotherchris I think I'm at the point where my forked repo's tui-editor
branch is viable. Do you want me to just submit a pull request and then you can decide how much of that branch you want to try to merge into master, or would you like me to try merging before submitting the pull request? Some of the differences between tui-editor
and master are stylistic in nature and deal with themes/syntax highligting, etc, so I imagine you might want to selectively merge.
@clone206 I am very interested by your work on TUI. I would like to integrate it into my version of Roadkill 🙂. Are you OK ?
@jolivem Sure, feel free! Though it may be worth waiting to see if @yetanotherchris wants to pull any of what I've done first.
All my work was in the tui-editor
branch at https://github.com/clone206/roadkill/tree/tui-editor
EDIT: Make sure to read the readme on that branch's page for some special instructions to get things working.
Could you create a PR @clone206 and I'll take a look? I'd like to make it a separate release binary if I can, or instructions on how to drop-it-in-place over an existing Roadkill v2 install.
Also it's worth noting version 3 uses Markdig, Jeff Atwood's Markdown parser has been removed. Markdig should be a lot more flexible to add customisations too though, and will support Github-flavoured Markdown by default.
@yetanotherchris Awesome, Markdig looks pretty impressive. I submitted the PR against master (tui-editor --> master).