neatlife / lwrte

Automatically exported from code.google.com/p/lwrte
0 stars 0 forks source link

<b> instead of <strong> #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

SEO-wise it would be better to use the <strong>-tag instead of the <b>-tag
when pressing the "b"-button.

How can i change the behaviour of the "b"-button so it uses the <strong> tag?

It's probably possible, but i've been looking for a while and couldn't find
out how.

Original issue reported on code.google.com by brecht...@gmail.com on 19 Feb 2009 at 11:42

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
well, there are 2 ways:
1) overwrite 'b' button callback (create 'exec' function)
2) owerwrite 'disable' button callback (it executes at submit time too). 

disable: {exec: 
function() { 

var s = this.get_content();
s = s.replace( /([\s\S]*?)<\/b>/gi, '<strong>$1</strong');
this.set_content(s);

}
}

Original comment by plandem on 24 Feb 2009 at 8:57