Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
Export first paragraph only w/specific markup (Read 4472 times)
russ lipton
Full Member
*
Offline



Posts: 126

Export first paragraph only w/specific markup
Sep 09th, 2008, 2:06pm
 
What I want to do:

Export the first paragraph of a note and define it in a template as italicized.

Export the rest of a note's paragraphs as-is.

This seems useful for the first paragraph: "^paragraphs( n ) exports the first n paragraphs of the text."

Can I then use some magic to export the rest of the paragraphs for a given note without repeat-exporting the first one?

Or is there an easier way to approach this altogether, given that I have a set of notes and would rather not hardwire HTML into them for this task?
Back to top
 
 
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: Export first paragraph only w/specific markup
Reply #1 - Sep 9th, 2008, 5:44pm
 
Using ^paragraphs(item,N)^ the answer is no as N always starts at the first paragraph.  Instead use an action to set HTMLFirstParagraphStart and HTMLFirstParagraphEnd. Change the default <p> and </p> to <p><i> and </i></p> or use <em> instead of <i> to set the italics. You could also simply set a class name for the start <p class="firstpara'> and define the format in CSS.

A method needing more expertise would be to leave the existing default values for the above attributes and then use HTMLExportCommand with command line tools to fine the first <p> and change it to <p class="firstpara'> or the like.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
russ lipton
Full Member
*
Offline



Posts: 126

Re: Export first paragraph only w/specific markup
Reply #2 - Sep 9th, 2008, 6:01pm
 
Thank you - helpful in its own (sic) write and also for pointing towards greater mastery of Tinderbox.
Back to top
 
 
  IP Logged
Pages: 1
Send Topic Print