Apply hanging indent style to only a specific line?
Posted: Thu Nov 05, 2020 8:50 pm
Can I select some text in a field, click a button, and have that text (and only that text) formatted as a hanging indent?
I've seen recipes that involve setting the leftmargin of the field, but that affects every line in the field, on all cards, which is not what I want. I want to format only a specific paragraph as a hanging indent on demand.
My current method is to select the text in LC, copy it to the clipboard, switch to TextEdit (Mac text editor), past the text, create the hanging indent with the ruler, select the text, copy it to the clipboard, switch back to LC, select the text, and paste the formatted text back in. This is cumbersome, to say the least.
I imagine there a convoluted way by copying the rtftext of the field to a variable, finding the right line in that string (somehow), adding the hanging indent code, setting the entire text of the field to the rtftext variable, then restoring the selection or insertion point.
I've seen recipes that involve setting the leftmargin of the field, but that affects every line in the field, on all cards, which is not what I want. I want to format only a specific paragraph as a hanging indent on demand.
My current method is to select the text in LC, copy it to the clipboard, switch to TextEdit (Mac text editor), past the text, create the hanging indent with the ruler, select the text, copy it to the clipboard, switch back to LC, select the text, and paste the formatted text back in. This is cumbersome, to say the least.
I imagine there a convoluted way by copying the rtftext of the field to a variable, finding the right line in that string (somehow), adding the hanging indent code, setting the entire text of the field to the rtftext variable, then restoring the selection or insertion point.