Test suite for rich text editing

Many web applications allow users not just to edit plain text, but also to embellish it – making it bold or underlined, adding bulleted lists or images. For example, think of online document or blog editors, or rich e-mail apps. JavaScript provides various APIs you can use to implement these apps.

Unfortunately, while these APIs are largely defined the same in modern browsers, the results often differ. To document the current state of all this, we have set up a new rich text editing test suite as part of the larger browserscope framework.

Let’s look at how a region of text, such as a

, can be marked as editable by adding the contenteditable attribute:

...some content...

You can then manipulate the content with simple calls:

document.execCommand("formatting command", showUI, parameter)

For example, you can set the color of the selected text to red with this call:

document.execCommand("forecolor", false, "red")

Although this command works well on most browsers, different browsers implement different subsets of formatting commands, and even common commands often produce varying HTML structures.

There are other APIs that affect selection and cursor movement, or allow querying of the current state, and those, too, are often implemented differently.

Our new test suite tries to capture all currently implemented commands and APIs, and runs them on varying initial HTML content and within various containers. The suite already contains well over 1,000 tests.

We don’t want to stop there. We intend to grow the suite and incorporate external feedback and suggestions so we can arrive at a common set of editing functions. We hope this can then serve as a common reference, not only for browser implementers, but also for web developers.

To achieve this goal, we would like input from anyone interested in this topic, including those with past complaints about bugs and incompatibilities in this area.

Android SDK for Bing Maps available on Codeplex

InKnowledge has launched an open-source Bing Maps SDK for Android. This new SDK now gives Android developers a choice in terms of map controls and provides greater flexibility as a result of having direct access to the code base. You can find the SDK at: http://bingmapsandroidsdk.codeplex.com/

Built using the latest Bing Maps AJAX Control 7.0, the Bing Maps Android SDK has all JavaScript wrapped with native Java calls. As a result, Android developers can use this control without having to know the JavaScript code. In addition to wrapping the AJAX Control, we created libraries to make accessing the Bing Spatial Data Services and Bing Maps REST services simple and straightforward.
Initial tests have found that the SDK provides much faster pan/zoom and loading speeds. To see for yourself, download the SDK and run the sample. Or, watch this video to see the SDK in action.

We also extended an Android WebView object, so that the map is embedded along with several Java-based method calls for controlling the map. Touch controls have been added to support pinch-to-zoom and double-tap-to-zoom. The new SDK’s zooming feature provides a deep zoom-like effect, which enhances the user experience as existing map tiles are scaled up until the requested tile is loaded.
The following functionalities have been supported for these services:
Bing Spatial Data Service—Query API:

  • FindNearArea
  • FindByID
  • FindByProperty

Bing Maps REST:

  • Geocoding (address and query searches)
  • Reverse geocoding
  • Routing with support for all route options

In addition, all libraries are inside a base Android application that can be used either as a template or as a reference to create your own Bing Maps Android application. You’ll also find support for GeoRSS feeds.
This SDK is still in its early stages; additional features on the roadmap include:

  • Clustering
  • Documentation of code, and articles on how to use the SDK to create an application
  • Sample UI for Location Details view
  • Support for localization
  • UI controls for rotating Bird’s eye view

Are you good at Google Earth-based puzzles?

treasure-hunt.jpgThis fall, a new scavenger hunt using Google Earth will be launched, with a prize valued at €50,000 (over $70,000)! Thanks to GEB reader ‘Will from the UK’ for letting us know about it.

The contest will work similarly to classic puzzle book “Masquerade” in the early 1980’s, which sent people hunting for (and eventually finding) a valuable prize.

According to the Telegraph, the book “will provide a series of drawings that include visual and textual puzzles described by publisher Carlton Books as ‘ferociously complicated’.”

The contest begins on September 1 and will end in March. All users that find the answer will be entered into a drawing for the the €50,000 prize.

We’ll keep you posted on the release of the book as it gets closer. It might be a fun way to spend some time playing around in Google Earth!