![]() |
#1 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 529
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Feature Request: Headings buttons
Just to add one feature to your miles-long "To do" list.
Something I use continuously in Sigil. The "H1 H2 H3 H4 H5 p" buttons. Just select something and change the heading type with one click. After that, auto create TOC and auto split the HTML files. The only thing that keeps me still using Sigil. Thanks for your work anyway :o) |
![]() |
![]() |
![]() |
#2 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,345
Karma: 27182818
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
It's not clear to me how such a feature would work robustly. Consider the following example:
Code:
<div> <div> <span class="heading">cursor</span> </div> </div> The best that can be done is to change the immediately surrounding tag, which means if you want to change the first div you need to put your cursor between the first and second divs, for the second div, between the second div and the span and so on. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
I think perhaps embryo means do as Sigil does -- wrap the currently selected text with the tags, and rely on the user knowing what he is doing.
Sigil way: For the alignment toolbar, the first surrounding tag that accepts text-align is the one that gets the attribute, but the heading/formatting toolbars (h1-6, p, strike, sub, sup, b, u, i) will only apply to the actual text selected. Book view will allow you to change strictly between p, h1-6 applying to the entire p/h1-6 around the currently selected text. But we don't want any Book view anyway. I agree with embryo, it would be nice to be able to have the most commonly used tags in a toolbar that just follows the idea of regex replace: <$tag>\1</$tag> |
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 31,047
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
My 2cents:
Working in CV change the first (from the inside): P, Div, H to the designated H# or P. Leave the class intact. You noticed I included H so the level could be changed H2 > H3 In Sigil, I setup '(wrap with)-Clips for P, Div, H3 complete with any class I wanted to assign (these do not remove any existing tags, only wrap the selection in a tag) Type some words. Select them. Hit the Clips (toolbar) Menu item ![]() My most used clips are on the clips toolbar |
![]() |
![]() |
![]() |
#5 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
|
My 1.5 cents --
Specific example: If I click the new [H1] toolbar button in a <p> ... </p>, then just change the p's to h1's Generally, add [H1] ... [H6], [P] (maybe more) and if the cursor is in a H# or p block then just change the tags and strip the classes. If I shift-click, then replace the tags, but leave the classes If there aren't any h# or p tags, then add the choice to the inner-most text based on container If the cursor is on 'cursor', then [H1] would ... Code:
<div> <div> <span class="heading">cursor</span> </div> </div> make Code:
<div> <div> <h1>cursor</h1> </div> </div> Code:
<h1 class="heading">cursor</h1> |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 529
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Well, its here!
The only thing is that it seems to be working only in the editor part of the program. If I select a word or a paragraph in the preview, and hit the H1, the text in the editor gets bold and ... nothing changes. I'm almost sure that there is something there that I miss, but... It would be nice if it worked the same way in both views, but this is better than not at all. ![]() ![]() |
![]() |
![]() |
![]() |
#7 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 691
Karma: 3026110
Join Date: Dec 2008
Location: Lancashire, U.K.
Device: BeBook 1, BeBook Pure, Kobo Glo, (and HD),Energy Sistem EReader Pro +
|
I think you will find that when you click on a word in the preview the cursor in the editor will move to a point before the "current" paragraph. When you hit H1 it wraps everything in H1 tags - in the case I tried the entire body.
The editor window is for editing, not the preview - watch where the cursor goes in there before trying to change anything. BobC |
![]() |
![]() |
![]() |
#8 | ||
US Navy, Retired
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 9,896
Karma: 13806776
Join Date: Feb 2009
Location: North Carolina
Device: Icarus Illumina XL HD, Kindle PaperWhite SE 11th Gen
|
Quote:
Here are the release notes for this new feature. Quote:
|
||
![]() |
![]() |
![]() |
#9 | |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 529
Karma: 64554
Join Date: Aug 2013
Device: Kobo Glo, GloHD
|
Quote:
You see, I'm used to work with Sigil, and I find its way of editing easier. Its much better for me, to highlight a word of (preview) text and make it Bold, Header or whatever and at the same time see how it looks, than to work in the editor and all the time "ping-pong" between that pane and the preview one. Of course, this is a matter of preference. The editor is really good as is already. |
|
![]() |
![]() |
![]() |
#10 | |
Ex-Helpdesk Junkie
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 19,421
Karma: 85400180
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
|
Quote:
On the other hand, in both Sigil and calibre the preview will open at the same time as the code view, so you can see your changes updating live. |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Enhancement Request]Calibre Navigation Buttons way too big | elementz | Calibre | 19 | 02-07-2014 07:25 AM |
Possible Feature Request | BookJunkieLI | Calibre | 12 | 08-08-2012 10:34 AM |
feature request | antonin.chadima | Sigil | 5 | 07-14-2012 06:48 AM |
feature request | pyatachoks | EPUBReader | 1 | 06-27-2011 10:49 AM |
Feature Request: Hot-keying Navigation-buttons | Arjun | EPUBReader | 3 | 04-14-2010 08:05 AM |