BlogMatrix
 

Playing with Yahoo’s Rich Text Editor

edit David P. Janes 2008-03-09 10:53 UTC 2 comments  ·  ·  ·  ·

I spent a fair fraction of yesterday playing with Yahoo’s Rich Text Editor (http://developer.yahoo.com/yui/editor/), trying to integrate it into what we’re calling “V12” of the BlogMatrix Platform – the look and feel you’re seeing on Onaswarm (http://www.onaswarm.com) right now.

Currently, we’re using TinyMCE as a text editor. On the plus side, TinyMCE is standard and reliable; on the minus side, it’s difficult to work with, very difficult to extend, and fairly hefty. So as a background task I’ve been looking at various technologies and seeing what can be done. TinyMCE has recently revved from 2.x to 3.x (http://tinymce.moxiecode.com/punbb/viewtopic.php?id=9942), so we’ll be revisiting that soon.

One of problems with all browser based editors is that that they, well, make weird looking HTML. Especially on Safari (AKA webkit). We’ve partially solved this problem at BlogMatrix by running a number of “scrubbers” that look for well-known weirdnesses and transform them into something better. Generally this works as a pipeline from TIDY (http://tidy.sourceforge.net/), to a bunch of regular expressions, to TIDY again. The goal is to be able to process normal hand-entered input into good-looking HTML, but still preserve the formatting pasted in from another webpage or document. Believe it or not, we’ve had a lot of luck with this.

You’d think that all this could be done with a Flash component – this would nicely solve multiple browser problem, but alas I haven’t found a Flash editor that accepts pasted text and does something sane with it. If you’d like to look at this, I’ve posted notes here on del.icio.us (http://del.icio.us/dpjanes/text_editor).

So, back to the YUI RTE – here’s my positives and negatives in no particular order. I’m aware that this is not a finished product, so expect to see the negatives to disappear.

  • it’s super easy to configure, especially the toolbar
  • there’s no HTML view; like WTF, I have to write this myself?
  • block indent/undent is broken beyond repair
  • I had no problems mixing and matching with MochiKit (http://www.mochikit.com/), our JS weapon of choice.
  • The dialogs that pop up for editing links and images are worth a whole section to themselves:
  • here we see the limitations of CSS styling – even the slightest change to text (from my CSS) breaks the dialogs. In this particular case boys and girls, perhaps even go back to table layout; it’s an app, not a webpage
  • in fact, just isolate this altogether out of RTE. By the looks of it, this seems to be the plan.
  • for proper styling, YUI components need to be descended from an element with CSS class “yui-skin-sam”. Unfortunately, dialogs attach themselves to the BODY element and we can’t mark that as “yui-skin-sam” because that, well, breaks all our stuff. So we ended up having to copy out all the CSS, remove “.yui-skin-sam”, adjust all the background images and so on and so forth.

I may experiment next with Ext’s editor (http://extjs.com/deploy/ext/examples/form/dynamic.html) but I’m thinking the best bang for our buck is still TinyMCE. If only I could figure out how to add my own buttons and functions….

For what it’s worth, I’m composing this using MS Word 2008 on a Mac, which doesn't play nicely with anything. Sigh

 
 

Sitemaps Protocol

edit David P. Janes 2006-11-16 14:58 UTC add comment  ·  ·  ·

Techcrunch reports:

In an encouraging act of collaboration, Google, Yahoo and Microsoft announced tonight that they will all begin using the same Sitemaps protocol to index sites around the web. Now based at Sitemaps.org, the system instructs web masters on how to install an XML file on their servers that all three engines can use to track updates to pages. This should make it easier to get your pages indexed in a simple and standardized way. People who use Google Sitemaps don’t need to change anything, those maps will now be indexed by Yahoo and Microsoft.

I.e. it looks like they all agreed on Google's defacto standard?

Yahoo adds "Python Developer Center" to their Developer Network

edit David P. Janes 2006-08-09 17:35 UTC add comment  ·  ·  ·

Yahoo has added a Python Developer Center to their Developer Network (tip: Slashdot):

Welcome to the Python Developer Center

Python is a dynamic object-oriented programming language that can be used for many kinds of software development. It offers strong support for integration with other languages and tools, comes with extensive standard libraries, and can be learned in a few days. This site is your source for information about using Python with Yahoo! Web Services APIs. Here you'll find:

  • HOWTO Articles to help you understand our technologies and how you can use them better with Python.
  • Useful Resources on the web where you can find source code and helpful tools.
  • Educational sites where you can learn how to program using Python.
  • Community Resources where you can join our mailing list and discuss the Yahoo! APIs with us and with other Python developers.

Pretty cool. We originally were using Yahoo Maps when we started adding mapping extensions to the BlogMatrix Platform. However, the maturity wasn't there and due to client demands we migrated to Google. That's not to say we didn't like Yahoo; they're a hell of a lot easier to get an answer out of and they have lots of other great APIs, services and libraries -- such as the Javascript Yahoo UI library, which this site does use -- available.

Update: g*dd*mn*t. no RSS feed. Get it together guys.