5

I am using Wordpress and I want site editors to be able to write html by hand (no wysiwyg). However, everyone knows that editing html in a textarea with no colorization or other code editor features is difficult. Does anyone know of a solution -- maybe a textarea replacement, browser extension, or the like?

There are plenty of wysiwyg editors, but I'm specifically looking for an in-browser code editor that handles HTML. It would be a bonus if it handled javascript and CSS as well.

Pete
  • 1,790
  • 2
  • 19
  • 31
  • 2
    possible duplicate of [textarea with syntax / code highlighting](http://stackoverflow.com/questions/1505761/textarea-with-syntax-code-highlighting) – jigfox Aug 23 '10 at 16:28
  • 2
    and http://stackoverflow.com/questions/1619167/textarea-that-can-do-syntax-highlighting-on-the-fly – jigfox Aug 23 '10 at 16:28
  • This is pretty much the same question as those. Sorry. – Pete Aug 23 '10 at 18:20
  • http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors from the other threads. EditArea, CodeMirror, CodePress, and Bespin are all possible solutions. – Pete Aug 23 '10 at 18:26

4 Answers4

4

Have you considered using Markdown (as StackOverflow does) ?

In my opinion, it is very easy to write and format text using Markdown. It is easy to get started with WMD, which is a java-script only Markdown editor.

driis
  • 161,458
  • 45
  • 265
  • 341
  • This is a good idea. I was thinking they would edit minimal HTML elements but markdown would enforce that. I will look into it. – Pete Aug 23 '10 at 18:20
  • The original [AttackLabs WMD](http://wmd-editor.com/) site is no longer available, the [StackOverflow WMD-new](https://code.google.com/p/wmd-new/) branch was hosted at Google Code for several years, and is now at [GitHub](https://github.com/derobins/wmd/tree/master) with a note "No longer maintained - Please use [PageDown](https://code.google.com/p/pagedown/) instead". PageDown is also hosted on Google Code, and is now an archived project. – Parker Dec 14 '15 at 14:27
2

Mozilla bespin is a javascript text editor that can be embedded.

cobbal
  • 69,903
  • 20
  • 143
  • 156
  • Trying bespin which even has a bookmarklet. Seems extremely limited right now and it can't word-wrap which makes it difficult when converting a textarea on the fly. – Pete Aug 23 '10 at 18:21
  • Bespin is now known as [SkyWriter](https://mozillalabs.com/en-US/skywriter/) and is currently considered inactive. Some of the SkyWriter code ended up in [Ace](http://ace.ajax.org/), which is the project they are now promoting. – Parker Dec 14 '15 at 14:16
2

Duplicate of https://stackoverflow.com/questions/1505761/textarea-with-syntax-code-highlighting and Textarea that can do syntax highlighting on the fly?

From those threads, a list of in-browser html editors: http://en.wikipedia.org/wiki/Comparison_of_JavaScript-based_source_code_editors

EditArea, CodeMirror, CodePress, and Bespin all seem active and capable. Using WMD for markdown is another option.

Community
  • 1
  • 1
Pete
  • 1,790
  • 2
  • 19
  • 31
0

I'm quite fond of XStandard. It produces proper valid HTML (Only the XHTML varieties), has a realistic WYSIWYG editor with the option to also edit the source directly, and has a free version (which has been enough for uses I've put it to).

Jon Hanna
  • 110,372
  • 10
  • 146
  • 251