I'm working on a fairly large CMS-like app that includes a forum, wiki pages, etc. What whould you chose between Markdown and HTML? I'm concerned about usability and the fact non-techie people will use this.
Markdown has a very simple syntax but few users know it
with HTML you can use a WYSIWYG editor but they are often terrible
I vote for Markdown.
I picked up Markdown in maybe 5 minutes in writing my first response here. Later
I learned more than what I picked up here, but I'd think this to be rather standard.
Markdown is much simpler to get good markup out of, and if you're worried about
speed just cache the resulting output.
Markdown is often better, and more easily understood, in plain text than HTML is
in a WYSIWYG editor. Also, no-script friendly.
And if you've got a user who wants an embeded object, just drop the HTML code from that Youtube video in and it'll get carried over.
If usability is an issue, and the target audience is non-geeks, WYSIWYG wins over Markdown. People are used to the toolbars with formatting buttons, but Markdown is a completely unknown markup language to most people (even "markup language" is completely unknown!).
I've had to explain a Markdown-lookalike wiki syntax to non-geeks at work, and they don't love it. When you want to write something, you want to write something, not look up weird ASCII syntax. Try not to interrupt the users' flow.
I would find a good WYSIWYG editor, like the one in WordPress (TinyMCE). It works ok.
If you wanted to use Markdown and a WYSIWYG editor you can use something like WMD Editor which (I am 99% sure) is what is used here at StackOverflow.
The benefit of using something like this is that your non-tech users get their WYSIWYG editor, your techie users get their Markdown love and you get clean markup. Another added side effect is it may actually teach end users Markdown from using it (or at least in an ideal world...)
WMD Editor also has an instant preview (which you can see when writing posts on StackOverflow), which will show users how changing the Markdown changes the look of their text.
We store XHTML in the database, validated against a restricted XHTML schema. The front-end is either a WYSIWYG editor (for the staff who know how to deal with its quirks) or a plain-text box (for the users, with automatic link detection etc.). We can convert the content back and forth, although the plain-text box loses formatting, so we do not depend on a specific UI. If we needed more than this, I would add another converter from XHTML to markdown.
I prefer Markdown with flat-file CMS, like Grav or other.
It's simpler to change styles, but not any html content. And you will take one killer feature: use git for web-site content. You even can create branches with "holiday" content.
Actually Markdown is simpler for non-tech people.
Related
for one of my customers I've been developing a mailsystem for his clients. His clients have been collecting e-mailaddresses in their stores and want to start using these for mailings once in a while.
I'm aware of all possible things that can go wrong, but as far as I can see we've got it pretty much covered the best way we can. We're using SMTP (Authenticated) to send the e-mails to the customers, e-mails are signed serverside, we're splitting up the mails with a max of 25 per 5 minutes, sending headers to optout location, etc. I can imaging this is just the tip of the iceberg concerning all things I have to take care off.. but I warned my customer that he might be better of using an existing app like MailChimp but he insisted on doing it ourselfs.
After the development of our beta version was done, we've ran some tests and all things went pretty well in fact. Haven't had any spamfolder problems, all mails are good to read in the different clients, and so on.
However, one thing is being a little hard right now.. the editor! We're creating templates for our clients (1 template, 6 styles). Our clients can load these into their editor and edit the text inside. As far as we (and the client) can see, everything goes pretty good, however - the editor does not create e-mail friendly HTML code (I should have known...)
I've searched the net for some articles/how-to's but there's really less to find about this.
Currently we're using CKEditor (Editor) and KCFinder (Image Plugin). As far as I know, CKEditor is the best free WYSIWYG available... but is it any good for e-mail editing?
I noticed some companies use a custom editor (MailChimp) others used TinyMCE (Enormail.eu).
Anyone has a good recommendation? Or is CKeditor the best option, but do I need to modify some of the settings to get the best possible html code for mailings?
Thanks in advance!
I have done a little research about it, because I'm interested in using CKEditor for E-Mail-based editing too.
Generally, CKEditor is the best WYSIWYG web editor, but you have to use some techniques that are not used usually in HTML pages.
Since your'e using templates (I guess CKEdtior's config.templates) most of your optimization will be in your templates, and not no configuration of CKEditor.
These are the main goals:
Don't use the <style> tag - instead, use inline styles (the style attribute). Some webmail readers does not read this tag.
Do not use config.fullPage = true; since some readers does not read the <body> tag.
Instead of using <body>, <div>, and other tags used for layout, use tables. Yes, this technique is old, but by doing this you can make sure that (almost) all readers will render the page correctly. Instead of applying styles to the <body> tag, use these style to the main <table> tag.
Don't use absolute positioning. Tables can also take part in the solution.
For all images - Insert the alt attribute, and for all width and height optimizations, don't use CSS-based width and height. I mean - Instead of <img style="width: 100px;" /> use <img width="100px" />.
In addition, one of the important things, is to customize and optimize output formatting. I personally change at least breakAfterOpen : true inside writer.setRules('p').
CKEditor is the most popular WYSIWYG web-based HTML editor, and I guess there is no other web-based editor for Email.
One more thing that I can think of, is that after your client is finished writing his message, there will be an option for him to preview the message in some popular mail clients. There are many Email testing and preview tools out there, but unfortunately I didn't find anything free.
I really hope that it helped someone!
I have worked for three years on a webmail. I could try tinyMCE, CKEditor or Redactor. None provides a perfect solution. You still encounter problems and you should always add functionalities. Some are too heavy, too slow, lack of features.
The one I found most effective is that of Gmail, but unfortunately, the code is not available.
The best solution is to create your WYSIWYG an even currently.
UPDATE
Try Squire made by FastMail.
I'm finding some editors that say they use bbcode or markdown or wiki, etc.
Can someone explain what this is all about?
It's a simplified set of mark-up language tags to help with formatting of content in situations where you do not trust the data being entered, it will prevent users having to enter direct html that may otherwise break a page or permit exploits from working their way into the page's output. These tags will be processed and formatted into HTML by the software.
Typing this answer into Stackoverflow required me to use a form of markup/markdown language :)
eg
[b]Bold[/b]
[url=http://www.google.com]Link Text[/url]
[img]http://www.domain.com/image.jpg[/img]
For wikipedia entries on each type of markup:
http://en.wikipedia.org/wiki/BBCode
http://en.wikipedia.org/wiki/Help:Wiki_markup
http://en.wikipedia.org/wiki/Markdown
BBCode, Markdown and wiki are markup languages used for writing the code on web pages that support user-entered content.
This is quite often to include one or more of these markups instead of enabling the whole WYSIWYG editor, especially when usually users enter text without any markup or with limited features.
Googling does not hurt.
What is the best solution for something that support:
rich editor
edit in place
placeholder
save HTML and strip out malicious etc.
I would like to have a nice and usable interface to change data on a profile.
It must support bold, italic and multi-line text and being sure that no malicious code can be injected.
I am looking mostly for the Javascript side but if it come with some PHP code for the backend, it would be nice.
FCK Editor which is now CKEditor
it is free.
I use TinyMCE (http://tinymce.moxiecode.com/). It should have the majority of the functionality you need.
I've seen a few options:
CKEditor (my personal favorite)
TinyMCE (also very popular)
NicEdit
YUI's Rich Text Editor (part of much larger, and very good, YUI framework)
Google's Closure Editor (part of Google's closure framework, what you get in GMail etc.)
Dijit Editor (if you're using the Dojo framework)
OpenWYSIWYG (true open source)
jwysiwyg (for jQuery)
Also see http://en.wikipedia.org/wiki/Online_rich-text_editor
and http://blog.insicdesigns.com/2009/07/rounding-up-the-best-javascript-wysiwyg-and-markup-editor/
I correctly use NicEdit but I would have changed to aloha-editor, an HTML5 WYSIWYG editor, if I had the time.
That said, I would not recommend any of those WYSIWYG editors as the html output is not only poor but also breaks the overall design by introducing a lot of inline styling that you probably did not expect for.
The only reason I use such an editor is that the client strictly asked for one. If you choose to use this method anyway, you would probably have to preprocess the user input. If I have a choice I use Markdown.
[EDIT: Added an example] As you can see in the html output below, what you see in not always what you get...
WYSIWYG Example:
Markdown Example:
I might be wrong (and please let me know if i am), but i don't believe TinyMCE nor CKedit do in place editing (that is, they do not use the contenteditable="true" without creating an iframe).
As far as i can tell, only nicedit ( http://nicedit.com/demos.php?demo=4 ) and google closure ( http://closure-library.googlecode.com/svn/trunk/closure/goog/demos/editor/seamlessfield.html ) are able to edit inline.
I hope i'm wrong :)
cheers!
I'll recommend TinyMCE.
EDIT:
And #wajiw beat me to it. Good sign though. :)
Developing a community site where everyone can post text,
I'm looking for a markup filter:
What is not part of the markup must be escaped (htmlspecialchars()) as it is.
Should turn URL-s automatically into links
Should support some form of basic markups (bold, image, url, pre, list)
Should have a simple parser, that turns user input text into HTML
Content on the site is public to everyone, XSS must not allowed to happen.
What do you suggest? What markup language in the first place? BBCode? Wiki? Markdown? Are there any complete API-s with good examples?
PHP is available on the server side. If there is a WYSIWYG-like texarea in addition (like here on SO) that would be a fantastic bonus!
BBCode is old and it's very verbose (pretty much HTML) but both CKEditor and TinyMCE supports it.
Wiki syntax is somewhat confusing to new users and you have to override the CamelCased words.
Markdown seems to be the de facto standard of today's web applications and StackOverflow uses it. There is a very good PHP implementation, not sure about RTEs but StackOverflow uses WYM Editor.
Also, check out the Wikipedia entry on Lightweight Markup Languages.
I think I'm going to go with BBCode via NBBC: http://nbbc.sourceforge.net/
Great list of tags supported, auto-detects complicated link, configurable, slim implementation.
What text to HTML converter for PHP would you recommend?
One of the examples would be Markdown, which is used here at SO. User just types some text into the text-box with some natural formatting: enters at the end of line, empty line at the end of paragraph, asterisk delimited bold text, etc. And this syntax is converted to HTML tags.
The simplicity is the main feature we are looking for, there does not need to be a lot of possibilities but those basic that are there should be very intuitive (automatic URL conversion to link, emoticons, paragraphs).
A big plus would be if there is WYSIWYG editor for it. Half-wysiwig just like here at SO would be even better.
Extra points would be if it would fit with Zend Framework well.
Take your pick at http://en.wikipedia.org/wiki/Lightweight_markup_language.
As for Markdown, there's one PHP parser that I've been using called PHP Markdown, and I especially like the Extra extension.
I have actually taken a stab at extending it with my own (undocumented) features. It's available at GitHub (remember that it's the extra branch I've fixed, not the masteR), if you're interested. I've intended on making it a 'proper fork' for a while, but that's another, largely offtopic, story.
The Zend Framework has a WYSIWYG editor bundled with it's Dojo integration.
http://framework.zend.com/manual/en/zend.dojo.form.html#zend.dojo.form.elements.editor
... Bring on the extra points!
There's always textile. It is widely implemented, and has a few basic similarities with Markdown. However, I have never seen a WYSIWYG editor for Textile.
You might find upflow useful.
If you want WYSIWYG, I'm a big fan of FCKeditor. It converts user input to HTML before submitting the form, not after, but has a nice PHP library for using it, and a PHP connector for handling file uploading/browsing (along with several other languages).
If you want something that can be read as plain-text but output as HTML, I vote for Markdown.
I will stick with my original idea of adopting Texy.
None of the products mentioned here actually beats it. I had problem with Texys syntax but it seems to be quite standard and is present in other products too.
It is very lightweith, supports very natural syntax and has great "half" wysiwyg editor Texyla (wiki is in Czech only)