News for hackers. Stuff that matters.
Re:Redactor - javascript (jQuery) WYSIWYG editor by tzury on Monday May 28, 2012 @03:03PM (#4034562)
Selecting a word, making it "bold", looking at the code, seeing <b> word.. </b>.

Shouldn't it be <strong></strong> ?

Re:Redactor - javascript (jQuery) WYSIWYG editor by kijin on Monday May 28, 2012 @03:33PM (#4034648)
There's a reason why W3C didn't just replace <b> and <i> with <strong> and <em>. A lot of people think they're just equivalent, but a lot of other people disagree. "Please display this in italic" arguably sends a different message from "Please emphasize this", and in some settings they may not be interchangeable.
Re:Redactor - javascript (jQuery) WYSIWYG editor by celoyd on Monday May 28, 2012 @07:39PM (#4035380)
The classic example is screen readers. A phrase that’s italicized because it’s important should probably be slightly louder, but a phrase that’s italicized because it’s foreign should probably be pronounced slightly slower. Those are entirely orthogonal things, and it’s useful to distinguish them.

Semantic HTML + CSS can be taken too far, but having separate layers gives you a lot more flexibility than presentational HTML alone, which tends to be very brittle.

Re:Redactor - javascript (jQuery) WYSIWYG editor by kijin on Monday May 28, 2012 @08:00PM (#4035427)
If <i> means something different from <em>, you can keep them distinct while keeping everything "semantic". In fact, you could have a dozen different HTML elements for each use case of italics, e.g. <foreign> for foreign words and <t> for titles of books and movies, and it will be a mess, but it will still be "semantic". So the semantic-vs-presentational argument doesn't even apply here.

Meanwhile, the whole concept of using italics for emphasis is a Western idea. CJK languages, for example, don't use italics for emphasis, and most of their italic fonts actually look terrible on screen.

Re:Redactor - javascript (jQuery) WYSIWYG editor by celoyd on Monday May 28, 2012 @08:13PM (#4035451)
I don’t understand what you’re arguing for or against here.
Re:Redactor - javascript (jQuery) WYSIWYG editor by emil0r on Tuesday May 29, 2012 @04:51AM (#4036572)
CJK = Chinese Japanese Korean I believe. There is no concept of italics in those languages.
Re:Redactor - javascript (jQuery) WYSIWYG editor by celoyd on Tuesday May 29, 2012 @02:22PM (#4038909)
Yes, but if anything that seems to contradict the gist of the first paragraph of the comment.
Re:Redactor - javascript (jQuery) WYSIWYG editor by callum85 on Monday May 28, 2012 @04:50PM (#4034881)
Just to expand on kijin's reply...

In HTML5, <i> and <b> now have the deliberately vague semantic definitions of "alternate voice" and "stylistically offset" – this could cover emphasis, book/film names, key words, foreign phrases, etc. Incorrect use of the more specific semantic tags (eg. generating <em> when the user sets a film title to "italic") is worse than a lack of semantic detail.

HTML5 was designed with the understanding that not all web content can be authored by someone who knows the correct use of semantic HTML tags like <cite>, <em>, <strong>, <mark>, etc. Application-level copy can use those tags, but a rich text editor (for normal people) can't know which one is appropriate, so it should always default to the vague ones, <b> and <i>.

Re:Redactor - javascript (jQuery) WYSIWYG editor by justincormack on Monday May 28, 2012 @06:43PM (#4035232)
Why default to those? You dont justify that, you only justify the existence of a default.
Re:Redactor - javascript (jQuery) WYSIWYG editor by stesch on Monday May 28, 2012 @04:09PM (#4034750)
The b element is back in HTML5.