Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 03-11-2019, 01:35 PM   #1
maicol07
Junior Member
maicol07 began at the beginning.
 
maicol07's Avatar
 
Posts: 2
Karma: 10
Join Date: Mar 2019
Device: none
Button to add CSS class

Hi,
is there a way or a plugin to add to the toolbar a button to add a CSS class to an element (for example the selected text)?
Thanks
maicol07 is offline   Reply With Quote
Old 03-12-2019, 07:47 AM   #2
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,001
Karma: 3598443
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by maicol07 View Post
Hi,
is there a way or a plugin to add to the toolbar a button to add a CSS class to an element (for example the selected text)?
Thanks
Yes, use the Clip Editor.

1. Go to Tools/Clip Editor...
2. In the dialog that appear, press the button "Add Entry".
3. In the field "Name" type the name of your desired class, i.e. "My Class" (no quotes).
4. Do double click in the field "Text" and write: "<span class="your_class_here">\1</span>" (no quotes).
5. Press Enter and do click on the button "Save" and then on the button "Close".

That's all. Now if you set as visible the "Clip bar", you'll see a button named "My Class". Select the text you want, press on that button and you'll have the text styled with your class.

Regards
Rubén
RbnJrg is offline   Reply With Quote
Old 03-15-2019, 02:01 PM   #3
maicol07
Junior Member
maicol07 began at the beginning.
 
maicol07's Avatar
 
Posts: 2
Karma: 10
Join Date: Mar 2019
Device: none
Quote:
Originally Posted by RbnJrg View Post
Yes, use the Clip Editor.

1. Go to Tools/Clip Editor...
2. In the dialog that appear, press the button "Add Entry".
3. In the field "Name" type the name of your desired class, i.e. "My Class" (no quotes).
4. Do double click in the field "Text" and write: "<span class="your_class_here">\1</span>" (no quotes).
5. Press Enter and do click on the button "Save" and then on the button "Close".

That's all. Now if you set as visible the "Clip bar", you'll see a button named "My Class". Select the text you want, press on that button and you'll have the text styled with your class.

Regards
Rubén
Thank you. It isn't a button in the main toolbar but it works pretty well!
maicol07 is offline   Reply With Quote
Old 03-15-2019, 02:25 PM   #4
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 22,799
Karma: 23700000
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: K4NT, Galaxy Tab A, Kobo Aura2
View: Toolbars: Clips (tick)
This shows the first N clips (titles)
theducks is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature Request: Jump to CSS class Katsunami Editor 4 09-20-2016 04:09 AM
Feature request: new CSS class from computed style kat7 Sigil 23 01-02-2015 01:30 PM
when does calibre add/not add page_styles css cybmole Calibre 5 07-14-2014 03:58 AM
Combining Class IDs In CSS to Control Left-Indent SeaCanary Sigil 13 02-24-2014 01:58 PM
Extra CSS and class renaming fenuks Recipes 4 01-26-2014 05:24 AM


All times are GMT -4. The time now is 06:12 AM.


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