Macro attached
When I create a Scrivener document (could be the body of an Evernote note) from a block of selected text, I often want to give the first line some style, for example font size 18, color blue.
Thanks to @JMichaelTX 's regex .+, I can easily extract the first line of selected text with a regex which I can then copy to a named clipboard → change style of named clipboard.
I have 2 problems with the macro:
1- I can't figure out why at the end it is the styled blue font 18 variable itself (!) %Variable%First_Liine_of_Selection% that is displayed rather than styled first line of selected text.
2- the second problem is that I obviously have no clue how to replace the first line of selected text with the styled variant. I can't understand why KBM does not have a simple search / replace regex like BBEdit, in which case I could replace .+ with the styled named clipboard.
Thanks very much.
The macro:
Replace 1st line of selection with styled text blue font 18.kmmacros|attachment (29.0 KB)
The end result: display named clipboard