I am attempting to build some programming quizzes where we can save user responses and review them at a later date. I am quite familiar with how all the backend stuff should work, but I have no idea how to create a friendly environment for users to enter in code on the frontend.
Here’s what I need:
- Syntax highlighting (at least HTML/CSS, PHP, and Javascript/JQuery
- A way to specify on a per-textarea basis which language the answer should be in
- Something that is compatible with JQuery if possible.
Does anyone know of a good solution for this problem?
Use CodeMirror editor which is very robust and supports various languages.
http://codemirror.net/
Take a look at the below link which gives comparison of widely used client side editors available along with their pros and cons.
http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors