WebKit-specific hack to make the horizontal line under the title show up correctly.
This commit is contained in:
parent
41dade9f28
commit
e2996030ac
|
@ -135,9 +135,15 @@ Editor.prototype.init_document = function () {
|
||||||
|
|
||||||
// third and final stage of construction, invoked by init_document(). do not call directly
|
// third and final stage of construction, invoked by init_document(). do not call directly
|
||||||
Editor.prototype.finish_init = function () {
|
Editor.prototype.finish_init = function () {
|
||||||
if ( !this.initial_text )
|
if ( !this.initial_text ) {
|
||||||
this.initial_text = "<h3>";
|
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 += "​";
|
||||||
|
}
|
||||||
|
|
||||||
this.insert_html( this.initial_text );
|
this.insert_html( this.initial_text );
|
||||||
|
|
||||||
// since the browser may subtly tweak the html when it's inserted, save off the browser's version
|
// since the browser may subtly tweak the html when it's inserted, save off the browser's version
|
||||||
|
|
Reference in New Issue
Block a user