![]() |
#1 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
A few small issues with Sigil's formatting controls (not just 2.x)
I've had these two small issues for a long time now, and both involve the format and align buttons.
The first is that the formatting buttons won't work if there are already some formatting tags in effect, even if they're not the same tags. For example with the following: Code:
<p>one two three</p> Code:
<p>one <i>two</i> three</p> Similarly, with the following: Code:
<p>blah</p> Both of these issues have existed for a long time (unfortunately I can't remember how far back), but I figured now that Sigil is in a new major it might be worth bringing up. Are these the result of a best practice I'm not aware of, or is it maybe an issue others have noticed but no one had brought up yet? In any case, thanks in advance for the help! |
![]() |
![]() |
![]() |
#2 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,010
Karma: 5449552
Join Date: Nov 2009
Device: many
|
I will look into these two issues, but I think they are caused by the same thing:
The last one is similar to other issues that were special cased in the past. The cursor position at the end of the line just before the start of the end tag is actually an insertion pointer AFTER the bit of text meaning that spot is inside the end tag (effectively) and running that command when the cursor is in a tag is disabled. I am betting the first problem you talked about is the same. When you select the i tag and all of its contents, even though the cursor is immediately before the tag, that spot is AFTER the text and so is considered to be in the i tag itself and you can not bold a tag - just its contents. If I had to do it all over again, I would remove the B, I, U, subscript, and superscript buttons completely. They are just a pain to maintain. And instead, Sigil would ship with 5 pre-added clips (with clip buttons) that would be easier for the user to determine how (what tags) it wants for b, I, U to use or instead to use an in-line style tag. Then I would add a simple button to remove the immediate parent tag first to make swapping tags easier using clips. Clips would have been a much better way to implement such things giving the user much more control yet as simple to click on as any toolbar button. Maybe a future version of Sigil will do just that. Last edited by KevinH; 09-14-2023 at 06:44 PM. |
![]() |
![]() |
![]() |
#3 |
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Thanks for letting me know. The whole pointer position thing seems like a weird off-by-one issue, but I'm sure it's more complicated than that or it would have been fixed as a matter of course.
I already have clips set up for smallcaps and the like, I may do as you suggested and make them for italics, bold, etc and override the keyboard shotcuts (ctrl+b etc) if possible. Clicking a second time to remove the tags isn't usually an issue for me as I use undo for that anyway. |
![]() |
![]() |
![]() |
#4 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,010
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Not quite an off by one, think of the old days when a block blinking cursor was used in place of the I beam style cursor... the character immediately after the I beam would be blinking as the char to be replaced.
Code:
I-beam style cursor represented by the | char: blah|</p> versus old style blinking block character represented by []: blah[<]/p> But the days of the block flashing cursor are gone leading to changes is how positions in strings are thought about by the user. But I can special case it for a future release. Last edited by KevinH; 09-19-2023 at 06:25 PM. |
![]() |
![]() |
![]() |
#5 |
Sigil Developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 8,010
Karma: 5449552
Join Date: Nov 2009
Device: many
|
Okay pushed a fix for the second one where you can not align paragraph if cursor just before ending tag </
But the first one is not as easy to handle and I am not sure I consider it a bug. More of a safety feature. And, if you just select the text you can do what you want. For example, to add <b> around the blah, you just select "blah" and it will nicely do what you want with the i on the outside and the b on the inside. You can also do the reverse. But trying to bold a tag and not just its contents is asking for trouble. Code:
<p>one <i>blah</i> two</p> So that is not something I am going to change. Sorry. Last edited by KevinH; 09-25-2023 at 03:28 PM. |
![]() |
![]() |
![]() |
#6 | ||
Groupie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 152
Karma: 474196
Join Date: Jan 2011
Location: Ottawa
Device: Kobo Aura H2O
|
Quote:
Quote:
Code:
<p>one <i>blah</i> two</p> Code:
<p>one <b><i>blah</i></b> two</p> Code:
<p>one <i><b>blah</b></i> two</p> I'm not trying to be ornery about this, and I'm fine with it not being something you're interested in changing; I'm more just interested from a learning/best practices standpoint. In any case, thanks for everything! |
||
![]() |
![]() |
![]() |
Tags |
buttons, formatting, shortcut, sigil, tags |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Another small Sigil bug | jwes | Sigil | 7 | 08-23-2023 12:50 PM |
Issues with controls bar in e-book viewer | Flane | Calibre | 4 | 06-15-2016 12:00 AM |
Inexplicable small cap formatting | John123 | Workshop | 4 | 01-16-2013 08:33 AM |
Weird formatting issues - Sigil .epub in Calibre viewer | december | Sigil | 9 | 06-18-2010 04:04 PM |
Lost My Very Long Post With Questions About PB 301 Controls vs PB 360 Controls | Vienna01 | PocketBook | 6 | 06-04-2010 01:51 PM |