So I have to take care of the text alignment. I see. Thanks a lot, Eric. Vincent
On Tuesday, August 14, 2012 1:53:14 AM UTC+8, Eric Shulman wrote: > > > For example, I had an element, place, which contains left-aligned text > > "left text" before I did > > wikify ( " centered text ", place ); // The " content text " does > contain > > a leading and an ending white space. > > Afterwards the content of place got changed to "centered text", but > remains > > left-aligned. > > The text decorations, such as "__underlined__" and "//italic//", and CSS > > style settings, such as @@color:blue;blue text@@, all seem to work fine. > > Am I missing something for text alignment here? > > The use of leading/trailing whitespace to center text is *only* > recognized by the TW table syntax: > > |this is left justified | > | this is right justified| > | this is centered | > > To center normal TW text content, you need to wrap it in a DIV element > with CSS style="text-align:center", like this: > wikify ( "@@display:block;text-align:center;centered text@@", > place ); > > For improved readability, you can install: > http://www.TiddlyTools.com/#StyleSheetShortcuts > and then add: > [[StyleSheetShortcuts]] > to your StyleSheet. You can then use the TW CSS *wrapper* syntax > "{{center{...}}}" to control the style of the content, like this: > wikify ( "{{center{{centered text}}", place ); > > Alternatively, you could set the center style for the entire "place" > element, like this: > place.style.textAlign="center"; > Note, however, that this will affect all content in that element (not > just the newly wikified output) > > enjoy, > -e > Eric Shulman > TiddlyTools / ELS Design Studios > > HELP ME TO HELP YOU - MAKE A CONTRIBUTION TO MY "TIP JAR"... > http://www.TiddlyTools.com/#Donations > > Professional TiddlyWiki Consulting Services... > Analysis, Design, and Custom Solutions: > http://www.TiddlyTools.com/#Contact > > -- You received this message because you are subscribed to the Google Groups "TiddlyWiki" group. To view this discussion on the web visit https://groups.google.com/d/msg/tiddlywiki/-/aZvbW8EPXuMJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/tiddlywiki?hl=en.

