ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
From: mf <massifr@fastwebnet.it>
To: ntg-context@ntg.nl
Subject: Re: ConTeXt as a service
Date: Sat, 23 Nov 2019 15:24:20 +0100	[thread overview]
Message-ID: <80b55941-3083-60a3-09f2-d0f03843f26e@fastwebnet.it> (raw)
In-Reply-To: <C5DF8B60-BCB3-4E5F-A22A-0FA3B4124C46@fiee.net>

Il 23/11/19 13:02, Henning Hraban Ramm ha scritto:
> 
>> Am 2019-11-23 um 08:12 schrieb Mojca Miklavec
>> <mojca.miklavec.lists@gmail.com>:
>>> 
>>> Then you can use one of the online JS editors like CKeditor.\
>> 
>> Only if you spend an enormous amount of effort making sure that
>> the code is properly cleaned up rather than containing a gazillion
>> random html style tags which you can never reconstruct back into
>> some structured form.
>> 
>> (And yes, my impression is that Massi spent a huge amount of effort
>> in configuring the editor and cleaning up the mess. My company
>> didn't and ended up with sometimes literally every word in a
>> sentence using a different font size or style. They gave up on html
>> + cke pretty soon, but couldn't be convinced that this was a bad
>> idea upfront.)

Indeed, an ongoing effort.
Markup should be mostly semantic, leaving the most of styling to ConTeXt
or CSS or whatever.
But then you must consider the features and limitations of the tools you
use.

CKEditor lets you define rules to specify what can enter your sources;
it's great, but it's essentially a HTML editor, not a semantic editor.
In CKE, the HTML is *the* document, not a representation of it inside a 
browser.

Prosemirror is the best editor i know, if you care about complete
control of what goes into your sources.
It's document agnostic, HTML is used only to represent the document in a 
browser. Your document could be JSON or markdown or whatever.

Prosemirror is actually an editor kit, not an editor:

- Tiptap editor combines Prosemirror with Vue.js

- wax-prosemirror instead combines Prosemirror with React.js

I'm developing on top of wax-prosemirror, which should be the next
version of the editor inside Editoria by Coko Foundation (Luigi posted a
couple of links in another reply of this thread).

Jure Triglav of Coko Foundation wrote a good post on open source 
collaborative editors:
https://juretriglav.si/open-source-collaborative-text-editors/

> Don’t exaggerate. Or maybe your company didn’t think about which tags
> are really necessary. A proper configuration that doesn’t allow
> nonsense, even if users paste text from Word documents, is not such a
> big effort.

Even though we started with a semantic tagging mindset, we always find
alien tags or wrong combinations of allowed tags in our sources.
It's not only pasting from Word or a web page, sometimes it's browsers'
plugins or different behaviors among different browsers. And bugs of my
code, of course.

I feel it's hard to exaggerate in paying attention to that, there's 
always something unwanted sneaking in.

> I can’t remember which JS editor I used >10 years ago for the
> editorial system of a city magazine, but I remember I only allowed a
> few tags (authors weren’t allowed to use font and color settings) and
> also run a HTML cleaner before saving. It was an effort until it
> worked, but not that much.
> 

We have filters to clean up a source before editing, rules inside a
CKE-based editor and filters to do other cleanups while saving.
We have quite a good control over sources, yet it's not complete.

A lot depends on the complexity of your documents: you start
simple and do some assumptions; later you want to increase complexity,
add new features that must combine with the legacy of every assumption
you did in the past.
More complex documents, more room for unwanted markup to enter them.

I admire Pandoc's document model: it's simple enough, well specified,
with generic tags (Div for blocks and Span for inlines) that carry
information with classes and key-value data, RawInlines and RawBlocks to 
inject low level tagging for specific formats.
Generics and Raw objects let you represent and convert many elements 
that are not built in.

Massi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : http://contextgarden.net
___________________________________________________________________________________

  parent reply	other threads:[~2019-11-23 14:24 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-20 16:07 Denis Maier
2019-11-20 16:43 ` Hans Hagen
2019-11-20 17:10 ` Henning Hraban Ramm
2019-11-20 18:50   ` Hans Hagen
2019-11-22  7:43   ` Jan U. Hasecke
2019-11-22  8:46     ` Mojca Miklavec
2019-11-22  9:05       ` Henning Hraban Ramm
2019-11-22 15:45         ` Jan U. Hasecke
2019-11-22 23:44         ` denis.maier.lists
2019-11-23  7:12         ` Mojca Miklavec
2019-11-23 12:02           ` Henning Hraban Ramm
2019-11-23 12:18             ` luigi scarso
2019-11-23 13:18               ` Henning Hraban Ramm
2019-11-23 14:03                 ` mf
2019-11-24 11:00               ` Hans Hagen
2019-11-23 14:14             ` Mojca Miklavec
2019-11-23 15:39               ` Henning Hraban Ramm
2019-11-23 15:50                 ` Mojca Miklavec
2019-11-23 16:03                   ` Henning Hraban Ramm
2019-11-24 10:56                     ` Hans Hagen
2019-11-23 14:24             ` mf [this message]
2019-11-23 15:39     ` mf
2019-11-24 10:51       ` Hans Hagen
2019-11-21  2:00 Brian Ballsun-Stanton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80b55941-3083-60a3-09f2-d0f03843f26e@fastwebnet.it \
    --to=massifr@fastwebnet.it \
    --cc=ntg-context@ntg.nl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).