witten
/
luminotes
Archived
1
0
Fork 0

WebKit-specific hack to make the horizontal line under the title show up correctly.

This commit is contained in:
Dan Helfman 2008-10-03 00:11:40 -07:00
parent 41dade9f28
commit e2996030ac
1 changed files with 7 additions and 1 deletions

View File

@ -135,9 +135,15 @@ Editor.prototype.init_document = function () {
// third and final stage of construction, invoked by init_document(). do not call directly
Editor.prototype.finish_init = function () {
if ( !this.initial_text )
if ( !this.initial_text ) {
this.initial_text = "<h3>";
// WebKit hack: add a zero-width space to make the horizontal line under title show up in the
// correct position, even before there is a title
if ( WEBKIT )
this.initial_text += "&#8203;";
}
this.insert_html( this.initial_text );
// since the browser may subtly tweak the html when it's inserted, save off the browser's version