As in title, how to align text to the right?
Add to your local.css a class that aligns text to the right:
.alignright { text-align: right; }
And then you just just use
<span class="alignright">around other html.You can refine that, and allow right-aligning markdowned text by using the template directive, with a template that contains the html. The note template does something similar. --Joey
Thanks!
This is my text with a markdown link.
Here's a second paragraph.
There is more than one way to do it. If format is enabled, then this:
<div class="notebox"> [[!format mdwn """ This is my text with [a markdown link](#). Here's a *second* paragraph. """]] </div>is rendered like the box in this page.
(I'm using the
noteboxclass used by thenotetemplate here, but you could use any class.) --smcv
Doing this myself and noted that markdown down does not allow the enclosure of block level elements directly; and thus we cannot switch the
spansuggested above fordivin changing block level elements (not if you wish to include markdown, anyway). For example, I want to create a paragraph (with markdown text) which is right aligned, and so add the following<span class="right_align"> This is my text with [a markdown link](/) </span>The correct thing to do here is create a template (as indicated above) but a workaround I found useful was to over-ride the
inlinenature of thespanelement, as follows.align_right { display: block ; text-align: right ; }you may also like to remove the padding and margins since they will be provided by the enclosing block. -- fergus