Hacker News new | past | comments | ask | show | jobs | submit login
Intro to Google's open source JavaScript rich text / HTML editor (closuretools.blogspot.com)
52 points by rwalker on July 14, 2010 | hide | past | favorite | 18 comments



It requires literally dozens of .js files to get it working... Is there a bundled and minified version of this in a single file?

I'm very much interested in a basic rich-text editor that is either uses jQuery or is just framework independent. I've liked 37signals's wysihat, but it uses Prototype. I'm sort of working on porting it to jQuery, but that takes time.


It (like the rest of the Closure Library) is designed to be used with the Closure Compiler:

http://code.google.com/closure/compiler/

The general philosophy is: for development, loading lots of files is ok and in some cases easier to debug. For production, the compiler will often strip out much more code than just minification would.


I saw that, and agree with that philosophy, but does the compiler also pull in all the extra files too? I didn't see it spelled out... I'm guessing yes, so I'll play around with it later tonight.


I'm not sure exactly what files get pulled in by the compiler, but it will remove any dead code (meaning 100% of any extra files) and output a single minimized file.


We use this one in our CMS: http://code.google.com/p/jwysiwyg/

It does the job and Ive found it easy to hack/patch when needed.


How does this differ significantly from something like TinyMCE? From what I can tell, it's still using contenteditable.

I'd be interested in seeing an open implementation of the editor Google is now using with Google Docs, where they completely avoid using contenteditable.


It's unbelievable how broken online RTE's are. I'm building websites for quite some time now and I never figured out why browser makers are neglecting such a basic feature, it should not be that hard to implement a basic RTE.

It's nice to see Google is trying to do something about it and making it easier to implement an RTE with projects like this, but it would be nicer if they would push other browser builders to standardise.


A big problem is that contentEditable has never been part of an official spec until now (HTML5). My fingers are crossed that we'll see some improvements over the next few years.


Hello, I have a question.

Does anybody know about javascript rich text / HTML editor, that could easily show small popup under carret (or certain word) while the user is typing? I mean something like the spell-checker in this google wave demonstration - see at 0:44:40 http://www.youtube.com/watch?v=v_UyVmITiYQ Or lets say, you want to implement something like this http://doc.trolltech.com/4.6/tools-customcompleter.html but in web browser. How would you go about it?


This is the first time I've heard about the "Closure Library".

Do you think this is what the new m.youtube.com HTML5 site is built in? Is Closure a replacement for GWT?


It is not a replacement for GWT. Closure is for people that want to write Javascript. GWT is for people that want to write Java.


It looks like there's a "Library", "Compiler", and "Templates". The Library looks like a Javascript library, the Compiler looks like a Javascript optimizer, and the Templates look like the GWT-ish thing that builds HTML from Java (or Javascript?).

source: http://code.google.com/closure/


Closure Library: a JS library containing a bunch of useful stuff.

Closure Compiler: A compiler that takes Javascript as input and produces Javascript as output. Removes dead code, does various optimizations, and usually beats other minifiers by a small but significant margin.

Closure Templates: a templating system that generates Java or Javascript code. Handy if you want to generate a bunch of HTML from templates in Javascript, and you don't want to write all that by hand.


I've read that several Google properties are using Closure (at least Gmail and Reader if I'm not misremembering).


Double BR's, DIVs used as containing elements... ugh. I was expecting better from Google. The problem of all RTE remains: their HTML is fucking ugly.


The Google one is pretty poor - enter some text and then indent it. The resulting HTML is browser-specific, Firefox produces:

<div style="margin-left: 40px;">one</div>

While IE produces:

<BLOCKQUOTE style="MARGIN-RIGHT: 0px" dir=ltr> one</BLOCKQUOTE>

Having written code to normalize the junk produced by a simple contentEditable editor I hate this kind of thing - there are editors out there that produce relatively nice well-formed XHTML.


My first thought was "finally working wysiwyg editor! It's from Google, it must be good!". After seeing the HTML output, I'm seriously disappointed. The editor is totally unsuitable e.g. for CMS, where you have to publish the generated HTML as such. So, back to looking for the holy grail of HTML editor.


The GMail editor feels a LOT faster than the demo provided. Any specific reason?




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: