I'm creating a website where users can submit:
- Blog posts (Articles)
- Comments
- Forum posts
Rich text is necessary and this website will be used by used by non-technical folks (usually older people) - therefore, WYSIWYG editor is required.
I have to decide between using Markdown or HTML (+ Purifier).
Here is how I currently see things in terms of good/bad:
MARKDOWN
1. WYSIWYG EDITOR - I was quite surprised when I discovered that there are no Markdown WYSIWYG editors. Actually, the only one that is actively maintained is: https://github.com/nhnent/tui.editor
I really liked that editor, it works great, but the only thing that I don't like is the size of it: minified version (tui-editor-Editor.min.js) is ~300 KB.
Most of the other Markdown editors are not WYSIWYG. There are some editors that are something between. For example, SimpleMDE is not WYSIWYG (but "WYSIWYG-esque") and I want to avoid it (also, it looks like it is not actively maintained anymore).
If you know a good WYSIWYG Markdown editor that is actively maintained, please let me know.
2. YOUTUBE - YouTube videos can't be added directly (when using markdown). I know about some workarounds like this, but that's not an option.
This should not be a problem if one of the packages:
supports autolinking and provides the ability to add a custom rule which will recognize YouTube links and automatically embed them.
But I did not use these packages... so is that possible?
HTML
On the other side, there are many really good HTML WYSIWYG editors. But I see two problems:
1. Security - I will need to use HTML Purifier in order to prevent XSS attacks. Correct me if i'm wrong: when using ezyang/htmlpurifier package - you are 100% safe, there are no XSS vulnerabilities, right?
2. YouTube - Correct me if I'm wrong, but when using HTML Purifier, it is not possible to embed YouTube videos directly because of <iframe>?