This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
en:why [2018/07/30 11:22] Andreas Gohr created |
en:why [2018/07/30 11:25] (current) Andreas Gohr |
||
---|---|---|---|
Line 1: | Line 1: | ||
======= Why a new WYSIWYG plugin? ====== | ======= Why a new WYSIWYG plugin? ====== | ||
- | A [https:// | + | There are a [[https:// |
To understand why the approach of CKGEdit and similar plugins is not ideal for wikis, we need to take a deeper look at the details... | To understand why the approach of CKGEdit and similar plugins is not ideal for wikis, we need to take a deeper look at the details... | ||
Line 9: | Line 9: | ||
One of the advantages that have made wikis so popular is to allow users to create websites without writing a single line of (HTML) code. Some text and some syntax and the wiki generates HTML from it. To change something, it's always the syntax itself that is changed. This is a very simple and very stable system. Simple syntax becomes complex HTML. | One of the advantages that have made wikis so popular is to allow users to create websites without writing a single line of (HTML) code. Some text and some syntax and the wiki generates HTML from it. To change something, it's always the syntax itself that is changed. This is a very simple and very stable system. Simple syntax becomes complex HTML. | ||
- | {{ |wiki.png? | + | {{ :wiki.png? |
WYSIWYG editors have a different approach. They allow you to edit the HTML code directly. But not as raw HTML code, but as WYSIWYG. In concrete terms, this means that rendered HTML is directly manipulated. Since HTML is complex and browsers are actually meant to be display machines, the development of such an editor is already relatively complex, even if one has " | WYSIWYG editors have a different approach. They allow you to edit the HTML code directly. But not as raw HTML code, but as WYSIWYG. In concrete terms, this means that rendered HTML is directly manipulated. Since HTML is complex and browsers are actually meant to be display machines, the development of such an editor is already relatively complex, even if one has " | ||
- | For wikis there is another hurdle: you want to give experienced users the possibility to continue using Wiki syntax((In fact, some wikis, such as Confluence, have completely abandoned this claim and now only offer a WYSIWYG editor -- content is simply saved as HTML | + | For wikis there is another hurdle: you want to give experienced users the possibility to continue using Wiki syntax((In fact, some wikis, such as Confluence, have completely abandoned this aspiration |
)). This means there has to be a conversion back and forth between HTML and Wiki syntax. From Wiki syntax to HTML this is simple, the other direction is more complicated: | )). This means there has to be a conversion back and forth between HTML and Wiki syntax. From Wiki syntax to HTML this is simple, the other direction is more complicated: | ||
- | {{ |The traditional WYSIWYG approach}}} | + | {{ : |
The traditional approach quickly reaches its limits: what if I insert a red text (for example, using Copy' | The traditional approach quickly reaches its limits: what if I insert a red text (for example, using Copy' | ||
Line 22: | Line 22: | ||
This means that the editor itself has to know exactly what the Wiki system behind it can do in order to limit the input accordingly. | This means that the editor itself has to know exactly what the Wiki system behind it can do in order to limit the input accordingly. | ||
- | This is exactly the approach the [https:// | + | This is exactly the approach the [[https:// |
The editor converts the document to HTML for display and returns user input back to the document. When saving, the abstract document is converted back into syntax - since the schema already ensures that the document is well-formed, | The editor converts the document to HTML for display and returns user input back to the document. When saving, the abstract document is converted back into syntax - since the schema already ensures that the document is well-formed, | ||
- | {{ |prosemirror.png? | + | {{ :prosemirror.png? |