View Single Post
Old 10-10-2014, 12:16 PM   #3
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: 31,241
Karma: 61360164
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by hpstricker View Post
Is it possible to add buttons to the Sigil-toolbar (performing some action in the HTML source with respect to the actual cursor position or selection)?

For example:
  • "wrap selected text inside <span class='x'>"
  • "wrap the active paragraph inside <div class='y'>"

Do I have to do it in the C++ sources, or is there an easier way?
the first 2 on your list can be done by using 'Clips' on selected text (in code view). Not with 'Buttons', but as a menubar:View: Toolbars: Clip Bar: Tick

Then Drag-n-reDock it under the Icon Bars (see my layout image) to get the bar Horizontal
All clips that are added, that are NOT moved to a group, in the Clip Editor appear here. (see cilip ed image)

Newbies Note The layout of buttons shown is not the default. No special code needed, just drag and drop the sections into new locations .
Attached Thumbnails
Click image for larger version

Name:	My Sigil Layout.jpg
Views:	279
Size:	93.4 KB
ID:	129463   Click image for larger version

Name:	clipEd.jpg
Views:	272
Size:	59.7 KB
ID:	129464  
theducks is offline   Reply With Quote