Skip to content

Script to right-align text quickly? #672

Answered by welpdx
daamiian asked this question in Help
Discussion options

You must be logged in to vote

Here you go:

<%*
if (tp.file.selection() !== "" ) {
	tR+= `<p style='text-align: right;'>` + tp.file.selection() + tp.file.cursor() +`</p>`
}
%>
Demo

I actually use this quite frequently to highlight my notes! For example, to highlight a text orange

<%*
if (tp.file.selection() !== "" ) {
	tR+= `<span style='background-color: Orange;color:black'>` + tp.file.selection() + tp.file.cursor() +`</span>`
}
%>
Demo text highlighter

Hope that helps.

~welp

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@daamiian
Comment options

@welpdx
Comment options

@daamiian
Comment options

Answer selected by daamiian
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants