Markdown editor included by default

I was thinking to include a Markdown editor by default in Elive, of course the idea is that it should have a realtime previewer or some fancy feature to use the markdown power

Of course we have Vim and Scite, which are powerful options for the user, but could be nice something where the user can WRITE, write text (not code) which can look nice and can be used in different ways, and for that I think that Markdown a good one for this purpose, so from markdown you can convert it to html, epub, pdf, use in websites, etc...

of course this is a bit geeky-related, my mom will not use that on her computer, but stills nice to have an editor like this

By other side, I was originally thinking in something more like "I want to write a book, but i don't know how to do it", markdown can be a good choice, but seems like there's even a better language for that: asciidoc , and talking about it there's an editor that I found really good for this purpose: asciidocfx

Anways, back to the Markdown topic (asciidoc is similar but not exactly the same), I found ghostwriter in the repos and seems to be pretty light to include (only a few small dependencies), I saw @triantares using ghostwriter too on a video, now im reading @triantares suggesting typora, it looks like a very nice one! but unfortunately it looks more like a bloated app (those using an entire browser inside, well, it marks 150 extra MB in my ram when running it, that's not -too- much) and maybe is not opensource / cannot be included by default

Just to talk more about Asciidoc syntax, some things I like:

  • good way to "show files" (at least from this gui tool) Asciidoc Book Editor based on JavaFX 16
  • charts, diagrams, etc... (at least on this gui tool)
  • more possibilities syntax (for links, positioning images, etc)
  • you can Tip / Warning / Info boxes easily
  • "ascidoctor" command renders directly a nice html from an .adoc file
  • better for write books / documentation / etc, but better to see it all and examples

So looks like the best candidate is ghostwriter, what do you think about having it by default in Elive?

4 Likes

Good idea.

Was about to suggest jupyter notebook but it requires both a web-browser and it's not terribly noob-friendly. It's basically a normal editor, but with markdown formatting and able to run python code directly in it. And it's really advanced. Deserves a good try.

I HATE PROGRAMS LIKE THAT. Electron is an insult to older computers. To add insult to injury, not only does it use a browser as backend (opening up plenty of security-vulnerabilities too) but it's Chrom* of all things.


BTW:

Fountain's another language that deserves a good try. Very similar to markdown but designed for plays. Im not a playwright (is that how you spell it?) but it's still pretty cool.

2 Likes

Or LaTeX.

Don't groan. :madness:

Hi!

Yep! LaTeX with a good UI would be the best, but....
Beside that, for me, as an example but not free, is PageStream (pagestream.org), for writing books, documents...

IH!

ghostwriter is good

There's also "marktext" as a FOSS replacement for "typora".

Not quite as polished as typora and still a few quircks (like whitespace in filenames) in it's export functions (a video link as src blocks the export) but very promising prospects.

Another that is quite interesting is "zettlr"

it's FOSS and very versatile but isn't as good as typora, in the sense that live WYSIWYG isn't a full 100% (look at the headers in the screenshot) and export ... to html/pdf has the same issues as "mark-text", it breaks on "empty" (read: not recognized) code blocks

I don't think there's another way to render markdown as html other than using a browser internally. Even webkit uses up at least 100Mb, so WYSIWYG has it's toll.

I agree.
Anyone wanting more can install whatever is needed but "ghostwriter" combined with "pandoc" are the lightest and noob friendly option.
I also tried out "atom", "ascidocfx" and some more I can't remember but none were as easy as ghostwriter ..... excepting maybe typora.

Once Netsurf improves hopefully they can start using Netsurf's layout engine. Fast, uses barely any RAM if it's a basic web page.

2 Likes

yeah we need light engines, netsurf is one of them, i just checked they are developing to be html5 / css3 compliant, I personally don't think that this is really complicated to do, there's no mystery on css3 and everything is very clear, a compliant could be really simple to do

even with EFL there can be a very light engine... if there's enough interest to develop that

It's not but they're right now focusing on efficiency.

In 4.x they're going to be focusing on making the Layout engine allow partial updates to the page, allowing most JavaScript, and opening the door to CSS animations.

https://wiki.netsurf-browser.org/development_plan/

(And if you were looking at NetSurf | Development Progress then that is horribly out of date. I have contacted them about it; they said they'll update it soon.)

2 Likes

we should write an E app for that :slight_smile: using elm_code (or Ecrire) + md4c (GitHub - mity/md4c: C Markdown parser. Fast. SAX-like interface. Compliant to CommonMark specification.)

:slight_smile:

2 Likes

Another interesting python3 based markdown editor is "retext" which is also in the Buster repositories.
It has webkit as the preview renderer and uses about 300Mb of ram.

The nice thing about it compared to ghostwriter is that it can show straight HTML in a preview pane. :smiley_cat:
It has the same quirck all the others have: It cannot show or breaks at a direct external link.

  • Until now only typora seem to be able to do that.

The winner up to now (in my book):

is still ghostwriter that only uses 100-200Mb ram but does bring in some Qt dependencies (especially the Qt web renderer), is noob friendly and has more options in what it can handle.

NB, @Vincent_Torri with ghostwriter available, I doubt an EFL based markdown editor will be any lighter.

Typora isn't too heavy with it's 200Mb Ram and very cool that it allows editing in the preview (and doesn't break on direct links) but alas not FOSS, so not a valid candidate for E16. :slightly_frowning_face:

@triantares about being light, we just have to compare when there is a efl-based app to compare

entice is extermely light for example

Agreed, but the defining memory bit is actually what is being live-rendered at that moment.
I.e the page content as well as the web-renderer.

It's going to be hard to go below 100Mb without giving up the live preview. :face_with_thermometer:

The RAM usage is quite noticeable here on the forum too.

i'm currently looking at netsurf :slight_smile:

The current downside with netsurf is that it doesn't do HTML5 yet.
But then by the looks of things the other markdown renderers don't do that either, excepting typora.

At least, I suspect that that is the reason why the others keep breaking on a direct link to an mp4.

Just tried out some stuff with "netsurf" and I must say that it's extremely lightweight and renders quite nicely. At least it doesn't break on the link ..... it simple doesn't show it.
Using that as a sandbox might just be the solution. :nod:

the current downside is that their build system is a piece of s**t

I'm currently in their IRC chan and discussing with a dev

they use their archaic build system from the begining. They should use meson. Meson works (tm)

1 Like

Well, at least it's lightweight s**t. :madness:

I'm just discovering how badly it works so I've changed the HTML file on gitlab (for the E16 tutorial) to accommodate non-HTML5 browsers i.e offer a direct link. :face_with_head_bandage:

Same source, chromium next to netsurf:

Getting used to more editors ..... "zettlr" is getting to be one of my favourites too.

The fact that it also supports latex (i.e mathematical connotations) and pandoc as well as yaml is an enormous pro.

Only for that I'd find it acceptable that live HTML preview lags a little. :nod:
By that I mean that I don't really need a HTML editor disguised as a markdown editor and a good GUI for latex is gold

It really is very good and extremely well documented.
Methinks it's just what @Franc is looking for.

A very good contender next to "ghostwriter" as a default markdown editor for Elive.

2 Likes

Hi!

Thanks @triantares for this tip (zettlr)!
Just installed; I don't know if it's what I'm looking for, but seems interesting & I will for sure try it (not at now, cause I'm on huge readings session and haven't got time yet to write my analysis and options, conclusions)...

Salutations!

1 Like

since ghostwriter is the probably best candidate and also the other ones are not yet mature, we will use ghostwriter in elive for now

qt dependencies seems to be very light on the default iso (probably something else depends also of those qt libs), so nothing very big is installing by adding ghostwriter

we can look to switch to a different one in the future if they become more usable / mature

1 Like