Quote:
Originally Posted by eschwartz
It sounds like this might be the underlying problem: bold/italics/color and stuff like that can be wrapped around a single word, if need be in a span tag, but text-align and stuff like that must be used on a div/p/blockquote section and cannot be applied specifically to a certain word. And that means calibre would have to hunt down the parent tag, then analyze it to strip out any alignment code currently there, then apply new alignment code on that parent element.
So anything that can be wrapped with a span tag around selected words can get a button, but if it cannot fit in a span tag I don't think it will get done. Or at least it will be a low priority, only for when Kovid gets bored with everything else he has to do. 
|
Irrational Optimist - can I borrow that?
OK - in terms of using a button to apply a code, what's the difference between inserting italics:
Code:
<p>The cat sat on the <i>fluffy</i> mat.</p>
and centering a line:
Code:
<p class="calibre1" style="text-align: center;">The cat sat on the fluffy mat.</p>
Either way you select the text then apply the codes. And an alignment style code goes in the same place every time, so you'd (well, I'd) think implementing that with a button would be straightforward at every level. But then again I am probably being completely obtuse here. If it's just a question of coding semantics, I concede.
Maybe Kovid can consider it if and when he's ever bored enough ... does that ever happen??