Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old Yesterday, 03:38 PM   #1
jjk
Connoisseur
jjk began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Enhance insert tag/fragment tool

In Calibre editor, currently we have two tools (amongst others) which are very useful for my needs :
1) The "Insert a tag" tool which allows to open a tag before selected text and to close it after selected text
2) The "fragment" tool which allow to insert some structured text by hitting Control+J just after have entered some trigger text
Is there a way to have the possibility, like the insert tag tool, to open a tag with attributes before selected text and to close it after selected text.
Example :
I select "blabla" then I use Insert_a_tag tool "p". It is transformed to
Quote:
<p>blabla</p>.
I wish to be able to transform it in
Quote:
<p class="myclass" lang="fr-FR">blabla</p>
It is a little similar to fragment tool, but in this one, inserted texts are entered by user after having hit Ctrl-J.

If there is no way, Kovid, could you add that feature ?
jjk is offline   Reply With Quote
Old Yesterday, 03:43 PM   #2
jjk
Connoisseur
jjk began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Sorry, I just saw that this feature exists already.
jjk is offline   Reply With Quote
Advert
Old Yesterday, 06:11 PM   #3
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,743
Karma: 13151503
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by jjk View Post
Sorry, I just saw that this feature exists already.
Where? Because I haven't seen it...
Terisa de morgan is offline   Reply With Quote
Old Yesterday, 08:26 PM   #4
retiredbiker
Evangelist
retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.retiredbiker ought to be getting tired of karma fortunes by now.
 
retiredbiker's Avatar
 
Posts: 473
Karma: 3972002
Join Date: May 2013
Location: Ontario, Canada
Device: Pop_Os!, Kobo Forma
It is in the add tags tool at the top of a code view screen. You can define tags to add:
Attached Thumbnails
Click image for larger version

Name:	addtag.jpg
Views:	29
Size:	88.6 KB
ID:	221337  
retiredbiker is offline   Reply With Quote
Old Today, 02:23 AM   #5
Terisa de morgan
Grand Sorcerer
Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.Terisa de morgan ought to be getting tired of karma fortunes by now.
 
Terisa de morgan's Avatar
 
Posts: 6,743
Karma: 13151503
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
Quote:
Originally Posted by retiredbiker View Post
It is in the add tags tool at the top of a code view screen. You can define tags to add:
Thank you!
Terisa de morgan is offline   Reply With Quote
Advert
Old Today, 03:28 PM   #6
jjk
Connoisseur
jjk began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Also this thread concerning a not well known feature of snippets :

Quote:
Originally Posted by kovidgoyal View Post
yes, snippets can surround text, read the bottom couple of parapgraphs of https://manual.calibre-ebook.com/sni...tml-link-tag-a

and to expand ctrl+alt+t to the parent tag, after pressing it simply hold down shift and move the cursor beyond the edge of the closing tag and press catrl+alt+t again.
So, there are 2 possibilities to surround any selected text by a tag with attributes.
jjk is offline   Reply With Quote
Old Today, 03:38 PM   #7
jjk
Connoisseur
jjk began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Aug 2018
Location: Paris (France)
Device: Kobo Kindle Vivlio-Inkpad3
Add tag tool is easier to use. With snippets we have to hit twice Ctrl-J, but management of snippets is more enhanced than Add tag management.
Kovid, could you add the ability to edit existing tags in add tag tool ? Currently we can just delete or add tag but not edit it.
And even manage a list of tags (with or withut attributes) ordered by tag and with folding ability. For example we should have this list :
Code:
+ p
   p class="class1"
   p class="class2" lang="fr-FR"
+ span
   span class="big"
   span class="small"
div
h1

Last edited by jjk; Today at 03:43 PM.
jjk is offline   Reply With Quote
Reply

Tags
fragment attributes


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Transform HTML - Insert HTML after tag - does not insert immediately after tag LenaWolf Conversion 10 12-02-2025 01:29 PM
Insert Tag: separate two sections by a small space to minimise user error paperback Editor 3 05-30-2022 06:53 AM
1. calibre_bookmarks.txt / 2. insert tag jiembe Calibre 5 12-05-2020 12:14 PM
Changing "Personal Doc tag" with ebook-convert CLI tool choogi Conversion 3 11-06-2015 03:38 PM
Some questions or possible enhancements on Insert Tag tool? arspr Editor 6 05-10-2014 03:22 PM


All times are GMT -4. The time now is 09:41 PM.


MobileRead.com is a privately owned, operated and funded community.