Safari 3.1

Safari 3.1 ist soweit und lässt sich ab sofort auf der Apple-Seite herunterladen – sowohl für den Mac als auch für Windows-PCs. Im Vorfeld hatte sich bereits anhand von Vorversionen gezeigt, dass die neue Version ein großer Wurf werden könnte.

Nun bestätigt Apple per Pressemitteilung: „Safari baut Webseiten bis zu 1,9 mal so schnell wie der Internet Explorer 7 und bis zu 1,7 mal so schnell wie Firefox 2 auf“. JavaScript sei bis zu sechs Mal schneller als bei anderen Browsern. Apple unterschlägt bei diesen Geschwindigkeitsangaben zwar, dass die Konkurrenz ebenfalls nicht schläft und Betaversionen von Firefox 3 bereits fast an die Geschwindigkeit von Safari herankommen – dennoch hat Apple unseren Tests zufolge derzeit die Nase vorn, sowohl in punkto Gewschwindigkeit als auch bei der Komaptibilität mit aktuellen und kommenden Web-Standards, wie der Acid3-Test beweist. Safari 3.1 unterstützt zudem als erster Browser sowohl Video- und Audio-Tags in HTML 5 als auch CSS Animationen und kommt darüber hinaus mit CSS Web Fonts zurecht. Voraussetzung ist mindestens Mac OS X 10.4.11, das Update ist über die Software-Aktualisierung erhältlich und für Leopard 39 Megabyte groß, der Tiger-Download zählt 49 Megabyte.

Apple Informationen zum Update: http://docs.info.apple.com/article.html?artnum=307467-de

Via macnews.de

Firefox 3.0 Beta 4 mit verbesserter Speichernutzung

Jede Firefox-Beta kommt zusammen mit einem neuen Science-Fiction-Motiv.
Seit Kurzem ist die vierte Beta der dritten Version des Mozilla-Webbrowsers Firefox erhältlich. Sie bringt laut Release Notes mehr als 900 Verbesserungen mit sich, darunter „erhebliche Optimierungen bei der Performance und in der Speichernutzung“. Die vierte Vorabversion soll stabiler sein als die Vorgänger sowie Plattform-Erweiterungen enthalten.

Zudem haben die Entwickler an der Benutzeroberfläche gefeilt, sodass sich der Firefox besser in das Aussehen der Oberfläche von Windows Vista einpasst. Nutzer von Mac OS X und Linux waren in dieser Hinsicht schon mit der vorigen Vorabversion bedient worden. Die Nutzer der Firefox-Beta können nun wählen, ob sie eine gesamte Seite skaliert dargestellt haben wollen oder nur den Text einer Webseite. Dazu kommen Änderungen an der automatischen Vervollständigen von URL am Download-Manager.

Firefox 3.0 Beta 4 ist für Linux, Windows und Mac OS X in 35 Sprachen erhältlich. Die Entwickler bitten wie immer darauf zu achten, dass Entwicklungen sowie zusätzliche Verbesserungen am Firefox erst in der endgültigen Version enthalten sein werden. Beta-Versionen seien für Web-Entwickler und Mozillas Test-Community gedacht, um Feedback noch vor der nächsten Ausgabe zu erhalten.

(Via heise online.)

Erste Beta des Internet Explorer 8 veröffentlicht

Erste Beta des Internet Explorer 8 veröffentlicht: „Microsoft hat im Rahmen seiner Web-Konferenz Mix08 eine erste öffentlichte Beta-Version des Internet Explorer 8 (IE8) veröffentlicht. Der Browser unterstützt unter anderem CSS 2.1 und erste Teile von HTML 5. Darüber hinaus er schneller sein als sein Vorgänger und bringt mit ‚Web Slices‘ eine Technik mit, mit der Nutzer einzelne Teile einer Website aktuell halten können.“

(Via Golem.de.)

YUI 2.5.0 Released — Big upgrades to DataTable, new Layout Manager, Flickr-style multi-file Uploader, and more

YUI 2.5.0 Released — Big upgrades to DataTable, new Layout Manager, Flickr-style multi-file Uploader, and more: „

The YUI Team just released version 2.5.0 of the library. We’ve added six new components — Layout Manager, Uploader (multi-file upload engine combining Flash and JavaScript), Resize Utility, ImageCropper, Cookie Utility and a ProfilerViewer Control that works in tandem with the YUI Profiler. This release also contains major improvements to the DataTable Control and new Dual-Thumb Slider functionality in the Slider Control. Here are the highlights:

  • DataTable Control: Jenny Han Donnelly has been joined by Luke Smith for this development cycle, and we’re all thrilled with what they’ve produced. DataTable in 2.5.0 gets a more robust markup structure that allows greater control over all aspects of the table. This release also includes major performance enhancements, improvements to the fixed-header implementation for vertical scrolling, built-in support for horizontal scrollling, an all-new Paginator class, support for drag-and-drop column reordering, and a new set of column APIs with hooks for showing, hiding, adding and removing columns.
    The DataTable and its new show/hide column interface.
    DataTable has been one of YUI’s most popular and important components since its debut, and this is its strongest release yet. If you have existing DataTable implementations that you want to upgrade, take a look at the new User’s Guide, as it has some detailed notes about API changes. The DataTable examples roster is another nice place to check out the new code in action.
  • The YUI Layout ManagerLayout Manager: Dav Glass has a lot for you to enjoy in 2.5.0, but top billing goes to his new Layout Manager. Layout Manager eases development of multipane UIs that take up either the full viewport or the full canvas of any block-level element. Layout Units within a layout are resizeable, collapsible, removable and swappable; transitions between expanded and collapsed states have built-in animation support. Whether you’re creating a full-screen application like Yahoo! Mail or a rich multi-pane pop-up, Layout Manager is a great place to start.
  • Uploader: If you’ve ever built a UI for uploading files via a browser, you know what the big pain points are: One file at a time, no easy way to track upload progress, no programmatic access to file metadata, etc. The new YUI Uploader addresses these issues and others, allowing for the creation of more powerful, intuitive, and responsive file upload experiences. Allen Rabinovich of the ASTRA Library team did the legwork on this one, and it’s the same code that underlies the Flickr Uploader. Uploader is our second JavaScript/Flash hybrid control (following on the heels of the Charts Control in 2.4.0).
    The YUI Uploader is the same code that drives Flickr's multi-file photo uploading interface.
  • Resize Utility: Layout Manager is built upon a new YUI utility, Resize. Dav’s Resize Utility formalizes the support that YUI Drag & Drop has long provided in example form and makes it easier for you to make any block-level element resizeable. Resizing can be implemented directly (the resized element resizes in real time during the interaction) or by proxy (a proxy element visualizes the interaction until its conclusion, at which time the resized element snaps to its new size).
  • The YUI ImageCropper ControlImageCropper Control: The Resize Utility makes a lot of things easier — and one of those is the implementation of an ImageCropper interface, which Dav built out on top of Resize for 2.5.0. Take a look at the examples and be sure to check out the support Dav provided for modifier keys in this very desktop-like UI control.
  • Cookie Utility: When he’s not busy writing books or working on My Yahoo!, Nicholas C. Zakas is cranking out new code for YUI. In 2.5.0, he contributes the Cookie Utility, a simple but powerful component that helps you get maximum mileage out of your limited cookie space. Because browsers limit the number of cookies you can set per domain (and because that limitation can sneak up on you if you manage a large site with many subdomains), the Cookie Utility supports ’sub-cookies.‘ Sub-cookies pack multiple name-value pairs under the umbrella of a single cookie, expanding the number of data points that you can store in cookie space.
  • ProfilerViewer Control: 2.4.0 saw the release of Nicholas’s Profiler, a headless, cross-browser kit for profiling JavaScript functions. To make it easier to access and interpret the data that Profiler collects, we’ve added a ProfilerViewer Control in 2.5.0 that sits on top of Profiler and visulizes its accrued data. ProfilerViewer leverages the Charts Control and the DataTable Control. Taken together, Profiler and ProfilerViewer provide another arrow in the development quiver that includes tools like Firebug’s integrated profiling interface.

    The ProfilerViewer interface.

  • The YUI Slider Control now has dual-thumb support.Slider Control with Dual Thumb Support: Supporting dual-thumb interactions in our Slider Control has been on our list for awhile, and Luke took the opportunity to get this out to you in 2.5.0. Sliders are ‘finite range controls’; dual-thumb sliders allow you specify a sub-range within the control’s larger range. The classic use case for dual-thumb sliders is on shopping sites, where such controls can allow users to filter results based on price range. Check out the User’s Guide, example, and the new Slider Cheatsheet (which has a second page dedicated to dual-thumb implementations).
  • We’re using this release to promote the following components from beta to GA status: ColorPicker Control, Get Utility (for cross-domain, dynamic loading of script and CSS files), JSON Utility, ImageLoader Utility, and YUI Test Utility. These promotions reflect the maturity of those components and their very low bug traffic. As always, we’re releasing all new-for-2.5.0 components under the beta moniker, and we’re looking forward to your feedback on those once you get a chance to try them out.
  • Full details on the release, including a rollup of the changelog for all components and a bug/feature manifest, are available in Georgiann Puckett’s update to the YUI developer forum this morning.

One More Thing…

YUI now ships with more than 270 examples, many of which are accompanied by full tutorials to help you get started using YUI. And while individual examples are good, we’ve gotten a number of requests to create an über example, one that pulls in and makes use of a wide range of YUI components in a single sample application — while still being YUI-centric and not littered with noisy implementation logic.

The incomparably prolific Dav Glass rose to the challenge for 2.5.0 with a complex, multi-component example that uses Layout Manager as its basis and Yahoo Mail as its inspiration.

Dav Glass's multi-module YUI application example.

Let’s Celebrate!

We’re excited to get 2.5.0 out the door and, as luck would have it, we’ve got a fantastic excuse to celebrate. YUI’s (and the Yahoo Pattern Library’s) second anniversary party is coming up next week (February 26, 5 p.m., Sunnyvale), and we’d love to have you join us. Sign up on Upcoming to let us know you’ll be stopping by at Yahoo! HQ for some beer and general revelry. We look forward to showing off some of the stuff you all have been doing with YUI in the past two years and we’ll talk a bit about where Patterns and YUI are headed from here.

(Via Yahoo! User Interface Blog.)

Internet Explorer 8 führt neues Meta-Tag ein

»Die Entwickler des Internet Explorer 8 um Chris Wilson haben zusammen mit dem Web Standards Project (WaSP) einen neuen HTML-Header entworfen, mit dem eine Webseite angeben kann, zu welchen Browserversionen sie kompatibel ist. Ein Hinweis wie:

<meta http-equiv="X-UA-Compatible" content="IE=8" />

soll dem Client künftig signalisieren, dass die Seite unter dem betreffenden Browser korrekt gerendert wurde. Falls möglich, kann der Client dann seine Darstellung den jeweiligen Eigenheiten des spezifizierten Browsers annähern. Es wird auch möglich sein, mehrere Browser zu nennen (zum Beispiel „IE=8;FF=3“) oder den Header per HTTP zu setzen.

Das Tag soll das Problem lösen, dass künftige Browserversionen möglicherweise Webseiten anders darstellen werden als aktuelle, was die Zukunftssicherheit von Webseiten gefährde, so WaSP und das IE-Team. Es soll das bis jetzt praktizierte Doctype-Umschalten ablösen, bei dem ein Webdesigner durch Setzen eines standardkonformen Doctypes bestimmt, ob der Browser den standardkonformen oder den rückwärtskompatiblen „Quirksmode“ wählen soll; die Grenzen dieses Doctype-Umschaltens hätten sich bei der Einführung von Internet Explorer 7 gezeigt, als plötzlich zahlreiche Websites nicht mehr wie gewünscht angezeigt wurden, obwohl sie diese Methode nutzten.

Kritische Stimmen meldeten sich sofort in großer Zahl zu Wort; tatsächlich erinnert das Tag an die weitgehend vergangenen „optimiert für …“-Hinweise oder an die Versuche, verschiedenen Browsern verschiedene Versionen der Website zu präsentieren. Allerdings weisen Webstandard-Experten wie Peter-Paul Koch von Quirksmode.org und die CSS-Autorität Eric Meyer (der zugunsten des X-UA-Compatible-Headers Stellung bezogen hat) darauf hin, dass der Vergleich unzutreffend sei. Dennoch drohen nach Meinung vieler Kommentatoren dem Web und den Browserentwicklern durch die Einführung dieses Tags kaum beseitigbare Altlasten, die eine Orientierung an zukunftssicheren Webstandards statt an Browsereigenheiten hätte verhindern können. Ob andere Browserhersteller den X-UA-Compatible-Header auch auswerten wollen, ist derzeit noch offen.« (via heise.de)

In All Fairness … Internet Explorer Still Stinks

In All Fairness … Internet Explorer Still Stinks: „

This is the story of how SitePoint tried to give Internet Explorer a fighting chance … and it lost anyway.

If you’ve been paying attention, you’ll have caught the subtle (and not-so-subtle) hints that SitePoint has been quietly working on a series of references, beginning with The Ultimate CSS Reference.

position property sneak peek

What hasn’t been revealed (until now) is that this reference will be released not just as a slick SitePoint book, but also as a freely-accessible Reference section right here on sitepoint.com! Our aim with this project is to produce the definitive CSS reference, both on the Web and in print.

Obviously, a big part of assembling this reference has been compiling browser compatibility information. And although our hard-working authors might disagree, one of the trickiest parts of the project has been determining how that information should be presented.

The Inherit Issue

A good example of this is the inherit value, which according to the spec is supported by all CSS properties. A little over a year ago, David Hammond’s site that rates browser standards compliance generated an uproar on Chris Wilson’s blog when it counted the lack of support for inherit as a point against IE for each and every CSS property.

Our reference will similarly indicate the level of support for each property in each of the major browsers, but what level of support do we indicate for IE, which doesn’t support the inherit value? Do we count this as a failing in IE’s support for each and every property, or do we set that aside as a single unsupported feature, and rate IE’s support of properties in the absence of inherit?

On the one hand, declaring that IE fully supports a property when one of its supported values doesn’t work could be seen as misleading. On the other hand, if the best support level we can list for any property in IE is ‘partial’, then you can’t tell at a glance when IE does fully support a property (within the limitations of its CSS implementation), and our reference becomes that much less useful.

After lengthy discussion with the authors, we decided to treat inherit as a separate unsupported feature, and to list properties that would work perfectly in IE if not for inherit as fully supported. The vote was certainly not unanimous, but I felt like we were doing the right thing by IE—giving the work that Microsoft did in IE7 a chance to shine.

Except … it didn’t

position property compatibility table

In ignoring inherit when rating property support, our intention was to enable the many newly-supported CSS features in IE7 to show up in our compatibility tables.

After all, IE7 now supports position: fixed across all elements, completing (except for inherit, of course) support for that property. And IE7 introduced plenty of other new features, such as support for the child selector (>). It would be nice for our compatibility tables to reflect this, we thought—naively, as it turns out.

Once the authors had compiled all this compatibility information, what we discovered was that arguing about the difference between ‘partial’ and ‘full’ support in IE had been an academic exercise … because the vast majority of CSS features are too buggy in IE to rate either!

The position property does support fixed in IE7, but setting this property to anything but static causes that browser to mess up the stacking of overlapping elements by incorrectly establishing a new ’stacking context’, so we are forced to rate this property as ‘buggy’.

child selector compatibility table

And Microsoft did implement the child selector as a brand new feature in IE7, but even in this golden age of standards, this new feature came with obvious parsing bugs (e.g. A > /* comment */ B will fail to work).

After racking my brains for a CSS feature that would have newly achieved ‘full’ support in IE7 without being afflicted by bugs, I happened upon the dimension properties. width and height had serious bugs fixed in IE7, and IE7 added support for min-height, max-height, min-width, and max-width. And as of the current draft of our CSS reference, these properties are listed with ‘full’ support in IE7! Hooray!

Sadly, a little research has revealed reports of a bug in IE7 that affects all of these properties. We have yet to confirm this bug, but if it’s the kind of thing that will impact real-world use of these properties, they’ll lose their ‘full’ rating as well.

Internet Explorer Still Stinks

All this adds up to Internet Explorer making a very poor showing in our compatibility tables, despite us going out of our way to give it a fighting chance.

CSS features that we can honestly list as having ‘full’ or even ‘partial’ support in IE are few and far between (color is one, font-size is not). Most of them are ‘buggy’, even in IE7 … and we expect even more IE bugs to come out of the woodwork once we release the Web version of the reference for public comment.

Obviously, with IE7 Microsoft made great strides in correcting the most glaring and painful issues that plagued developers in IE6. But the unavoidable truth revealed by this reference is that Internet Explorer is still miles behind the competition.

Perhaps the new layout engine and other improvements coming in IE.Next will make up some of the difference … or perhaps Microsoft just isn’t interested in fixing (and in the case of IE7, avoiding) bugs that aren’t painfully obvious.

This article provided by sitepoint.com.

(Via SitePoint Blogs.)

CSS Transforms

CSS Transforms: „WebKit now has rudimentary support for specifying transforms through CSS. Boxes can be scaled, rotated, skewed and translated. The current nightly builds support affine transformations.

A transform can be specified using the -webkit-transform property. It supports a list of functions, where each single function represents a transform operation to apply. You can chain together operations to apply multiple transforms at once to an object (e.g., if you want to both scale and rotate a box). The supported primitives are:

scale, scaleX, scaleY – Scale an object around the transform origin. These functions take a number as an argument. The number can be negative (if you want to flip an object).
rotate – Rotate an object around the transform origin. This function takes a CSS angle (e.g., degrees or radian units).
translate, translateX, translateY – Translate an object. These functions take lengths or percentages as arguments. Percentages are relative to the border box of the object.
skew, skewX, skewY – Skew an object. These functions take CSS angles.
matrix – Specify a full affine transform matrix. This function takes six values. The last two values are the tx and ty, and they can be lengths or percentages.

In addition to the -webkit-transform property, we have introduced a -webkit-transform-origin property that allows you to specify the origin of the transform. It has the same syntax as background-position and defaults to the center of the object (so that scales and rotates will be around the center of the border box by default).

At the moment transforms do not affect layout, so they are similar to relative positioning in that respect. We are exploring ideas for how to do transforms in ways that could affect layout.“

(Via Surfin‘ Safari.)

Geschwindigkeitstest: Safari gegen Firefox und Internet Explorer

Geschwindigkeitstest: Safari gegen Firefox und Internet Explorer:

Ladezeiten Browser
„Eine Firma, die Geschwindigkeitsoptimierungen für Webseiten anbietet, schnappte sich die Windows-Beta von Safari 3 (3.0.3) und ließ diese gegen Firefox 2.0.0.6 und Internet Explorer 7.0.5730 antreten. Der Fokus lag dabei auf ‚Alltagsladezeiten‘, die beim Aufruf einiger vielbesuchten Webseiten wie Facebook, Google, YouTube, etc. gemessen wurden. Ergebnis: Safari 3 war am schnellsten – die Wartezeit für eine erstmals aufgerufene Seite war mit Apples Browser 1,4 Sekunden geringer als mit Firefox 2 und 1,1 Sekunden geringer als mit IE 7. Seiten die sich bereits im Cache tummelten, wurden von allen Browsern nahezu gleichschnell dargestellt. Der Versuchsaufbau und detaillierte Ergebnisse können bei Web Performance Inc. nachgelesen werden.“

(Via fscklog.)

Some Notes on the YUI Rich Text Editor

Some Notes on the YUI Rich Text Editor: „

The YUI Rich Text Editor

About a year ago I made a Rich Text Editor (RTE) prototype to show that it was possible to build one on top of YUI. Of all my YUI examples, it quickly became one of the most requested, and the project indirectly resulted in me joining the YUI team in a formal capacity.

Once I started on the YUI team, building a full-featured YUI Rich Text Editor became my top priority. Even though there are many DHTML-based RTEs available in the open-source world, including Moxiecode’s excellent TinyMCE, there were four key reasons I took on the challenge of building a new one for YUI.

  • A-Grade browser support – Most available RTEs fail to support the full spectrum of A-Grade web browsers. Most support IE and Firefox well, but few support Opera and I’m not aware of any that fully support Safari. For example, many existing RTEs don’t offer list editing in Safari. I thought we could do better. Because YUI is committed to A-Grade browser support (and because I’m a fanatic Mac user) fully supporting Safari was a top priority for me. Wrestling Safari into submission was no small task, and I’ll look at some of the specific challenges below.
  • Extensibility – I wanted to build an editor that would allow fellow developers to add their own unique functionality. The YUI Rich Text Editor’s Toolbar is designed from the ground up to be extensible; the Flickr example is meant to illustrate this, as is the example of the Calendar Control implementation.
  • Accessibility – What happens when users employing assistive technologies are presented with a rich-text-editing interface? What should happen? I spent time working with Yahoo! accessibility specialist Victor Tsaran to answer those questions. I believe that I have engineered some of the answers into the YUI Rich Text Editor. This is an area of ongoing development, and I’ll share more details as the RTE progresses out of Beta status.
  • Footprint and Performance – I wanted to build an RTE that was small and fast. It’s already lighter-weight than some, but let’s be clear: It is not there yet. You can count on the fact that I’ll be putting a lot of effort into shrinking its footprint and improving its performance, while maintaining (and improving) consistency across the A-Grade browsers.

Current and Future Status

Before I get into the fundamentals of the YUI RTE, let me give you an update on the state of the project. First, this editor is currently a Beta control, and as such there is still much work to be done. Second, it’s neither a site editor nor a development environment. It’s designed for simple things like web mail systems, blog posts and comments, online reviews, and so forth. However, I did try to expose as many hooks and events as possible so that others could build upon the basic A-grade browser foundation that the RTE provides.

The Development Path

My development approach was to bend Safari first. I built it to work in Safari 2 before retrofitting it back to Opera, then Firefox and lastly Internet Explorer. I figured that if I could make Safari do what I wanted, the other three would fall into place nicely. And they did. By choosing to make Safari work first I was able to make the others do things in a standard way as well. I hope that Safari will eventually catch up to its A-grade peers and add support for the things that I have ‘emulated’, so I took that into consideration too.

Hacking Around Safari

Safari 2 is a really good browser, but it was also the most challenging browser to support with the RTE project. It lacks some serious and critical features when it comes to editing HTML content from JavaScript. I will try to explain the main hurdles that Safari presents:

Iframe Focus – One of the biggest issues was actually quite simple to solve. Safari (and Internet Explorer) has an issue with selecting text inside of an embedded iframe. If you select text within the editor’s iframe then click/focus the parent document, the selection within the iframe is lost. Clearly, this makes it rather difficult for a button click to take action on the selection (because the selection is lost when you click the button!). It also makes it difficult to use, say, a YUI Menu Control for a drop down. As I investigated this problem, I determined that if you stop the mousedown event on the button/href the selection doesn’t get lost. However, if something else (say a href in a dropdown menu) gets focus, the selection will still get lost. This leads me to the next Safari trick.

Selection Object – The selection object in Safari is very limited (to say the least). To work around its limitations, the YUI RTE caches a copy of the current selection in the _getSelection method. Then, the next time _getSelection is called I check to see if a cache existed. If the cache is there, I ‘rebuild’ the selection and destroy the cached copy. This little trick is what lets Safari use a YUI Overlay as a menu instead of the more classic approach of a select element. It’s roundabout, but it works.

execCommand limitations – This is the mother of all hacks for Safari (and the others). My biggest problem with the native execCommand method (in all browsers) is that the browser doesn’t tell you what it applied the command to. So there is no real way to get an element reference back after running a command on a selection. The world of JavaScript editors would be so much more civilized if this would happen (hint, hint, nudge, nudge). So what I had to do was implement this feature myself. My current approach may not be the best way to do it (I have some other ideas that I am working through), but it does the job for now. The method is named _createCurrentElement and basically it runs execCommand('fontname', false, 'yui-tmp'); on the given selection (since fontname is supported on all A-Grade browsers). It will then search the document for an element with the font-family/name set to yui-tmp and replace that with a span that has other information in it (attributes about the element that we wanted to create), then it will add the new span to the this.currentElement array, so we now have element references to the elements that were just modified. At this point we can use standard DOM manipulation to change them as we see fit. In short, I’m using the iframe’s DOM to store metadata during editing as a way to enrich the communication that’s possible between the editor and the iframe.

Making it Your Way

Over the past few years I’ve implemented many of the available RTEs. Because of this I brought a ‘taste of your own medicine’ mentality to the table. I wanted to build an editor that was easy to extend and change. The YUI RTE has Custom Events for everything that I could think of! I made all of the event handlers standalone functions that can be overloaded on the instance or on the prototype. I also tried to make as many things configurable as possible.

Just to give you an idea, let me show you a quick way to change one of the editor’s default behaviors.

Editing links in the YUI RTE.

The Create Link Dialog – Say you want to use a different input utility for link creation (a pre-defined links list maybe?) instead of the default link editor. Well, here’s some sample code to turn it into a JavaScript prompt:

var oEditor = new YAHOO.widget.Editor('demo');
oEditor._handleCreateLinkClick = function() {
    oEditor.on('afterExecCommand', function() {
        var str = prompt('URL: ', 'link');
        var el = this.currentElement[0].setAttribute('href', str);
    }, oEditor, this);
};

Using this technique, you could easily write your own property editor. By the way, the ‘insert image’ dialog can be overridden in exactly the same way (for example to make it a photo picker), just override the _handleInsertImageClick method. You could either override it as above, or you could override all editor instances (so every editor on the page would behave the same) like this:

YAHOO.widget.Editor.prototype._handleCreateLinkClick = function() {
};

The Look and Feel

If you don’t like the visual design of the RTE, simply change the CSS. As with YUI’s entire family of controls, the visual presentation of the control is written in CSS and can be reskinned to suit your implementation. See the RTE’s skinning example for more information on how CSS controls the presentation of the RTE specifically. We’ve even provided the Photoshop source file for the icons to make it easier for you to create a design that’s customized for your site. Maybe you like the colors, but you don’t want to see the labels above the ‘groups’? Well, add these few lines of CSS:

.yui-skin-sam .yui-toolbar-container .yui-toolbar-group h3 {
	display: none;
}
.yui-skin-sam .yui-toolbar-container .yui-toolbar-group {
	margin-top: .75em;
}

Once you dig in, I think you will find that the YUI RTE is pretty flexible and easy to extend.

In the End

Safari was tough, but I’m stubborn. When Safari properly supports execCommand, things will be even better. YUI’s RTE is exceptionally extensible and customizable; from very low-level functionality all the way up through the visual layer. It’s also semi-lightweight, and will be even lighter before I’m done with it.

I hope you enjoy my first YUI control. Please keep the feedback coming.

(Via Yahoo! User Interface Blog.)

The Java Popup you Can’t Stop

„In his brand new hackademix.net blog, Giorgio Maone, known as the author of the NoScript security extension for Firefox, reveals how popup blockers can be easily circumvented using Java. Worse, popups opened this way are really evil, because they can be sized to cover the whole desktop (the wet dream of any phisher) and cannot be closed by user (the wet dream of any web advertiser). Impressive demos available, all cross-browser and cross-platform, in the best Java tradition: ‚Write once, hack anywhere‘ „

Quelle: http://rss.slashdot.org/~r/Slashdot/slashdot/~3/142007028/article.pl