Skip to main content

Cross-platform rich text editing

General • Asked by Nino Rosella

I'm building a note-taking Rails 5 app that will be a web app and will also act as a backend for OSX and Windows apps in the future. One of the key features is the rich editing of text - bold, italics, size, colour, highlights etc very much like the feature set of Evernote.

What options should I be considering in regards to which text format to use and save in the db? HTML seems too messy (especially when using it with the native desktop apps), markdown doesn't seem to include enough features...

Getting quite lost and confused. As always, your help is appreciated Go Rails fam.


You've probably got two options here:

  1. Build your own custom markdown parser so you can add in new features. You could use html-pipeline for this in Rails. That's what Github uses for their commenting. You'd have to come up with your own syntax for features like highlighting.
  2. Use an HTML editor like Trix, etc and build your own features out there. These typically have full HTML support so you're free to write as complicated of features as you want and you're not stuck with some simple formatting like Markdown. I would imagine an HTML editor would provide you with a whole lot more flexiblity going forward.

In either case, I'm sure you'll have to build custom plugins for your editor to pull off all the features you want. The thing I would recommend is to pick a complex feature or two and try it with both. Which solution makes it easiest and which do you see being most flexible for the inevitable changes in the future?


Thanks, Chris.

Will try with markdown first and take it from there!


Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.