Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Is there a way to highlight text in editor and preview
-
in ulysses, i can highlight text in the editor by surrounding it with two colons around both ends of the text (ie ::this is highlighted text::). this makes it appear yellow in the ulysses editor (though it does not highlight on html preview b/c their markdown xl flavor i guess doesn't support it??)
i would love to be able to do the same thing in editorial. i use the existing emphasis and strong (italic and bold) for marking other aspects of what i'm doing but the ability to highlight on top of emphasis and strong comes in very handy for me.
is there any way i can get what i want in either the editorial editor and or html preview? perhaps there is an ability to customize the markdown interpreter to support :: or __ as highlight markers? this requires both the ability to add a button to the on screen keyboard to wrap selected text in either :: or __ to represent the highlight as well as hopefully display the text with highlighted yellow background color in the editor while reducing the opacity or the :: or __ marks themselves.
OR perhaps there is a way that i can add a workflow / python script to do what i want? my thought is that i could attach a button to the popup menu that appears when i highlight text in the editor which will insert the "highlight" :: or __ codes into the text and then magically present them as background yellow? i know how to program if that matters i just don't know where to start in editorial / python in this regard.
note, the functionality must be saved and activated automatically every time i open the file AND it also must be easy to insert the highlight marks in the file text with mouse gestures or keyboard commands (if attached keyboard), otherwise doing this is not worth the hassle.
fwiw, since i can get :: marks inserted easy enough from within ulysses, if i can at least display them correctly in the editorial editor / preview as background yellow once i open them from dropbox that would be a worthwhile compromise as well IF it's possible to customize the css behind editorial's editor / html previews.
thanks in advance.
-
Editorial has some support for CriticMarkup, and you can highlight a piece of text using this syntax:
{==highlighted text==}
. This works both in the editor, and in the preview. You can also use{++text++}
for additions (highlighted in green) or{--text--}
for deletions (red). -
thanks for the quick reply and turning me on to critical markup which i never heard about!. it does exactly what i want on the display side of things and even more since it has multiple colors!
BUT it's actually going to be quite impractical in real use on the insertion side in editorial if i have to type those 6 characters around everything i want to highlight. this would be the case even i had an actual keyboard attached. fyi, i do a lot of highlighting in my documents so i need to be able to do this quickly and more importantly easily, especially without a keyboard.
SO... is there a way to assign a function to an editorial keyboard button or popup menu so that when you select some text in editorial, you can simply click the button to automagically wrap the text with one of the choices of 6 characters you mentioned? that WOULD be practical :)
one last thing: those six extra characters start eating up a lot of screen real estate and effecting the readability of the file in the editor (which is why having something like :: or __ would be preferable as a replacement for the three {++, {==, {-- etc)) so perhaps there is a way to change what critical markup / editoral considers the highlight tags to be (ie my preference for :: or __ vs {++, etc)?
thanks
-
You can use snippets to enter those characters more quickly. Simply add a snippet that contains
{==[Selected Text]==}
(where [Selected Text] is a placeholder from the Variables... popup). Then you can select some text, insert the snippet, and the selection will be surrounded by{==
and==}
.Regarding your other question, it's not possible to customize this syntax.
-
This post is deleted! -
You can do it from the keyboard snippets.
-
ah. i didn't realize you had the vars with the snippets. great! thanks
-
I can't seem to get this to show anything but the literal {== ==} characters in the preview. I tried creating a brand new preview theme with zero customizations in it to be sure I wasn't adding any roadblocks.
Is there a setting I need to turn on? Is there a better theme I need?
-
@BoxOfSnoo There is no setting you'd need to turn on. Does it work in the editor?
-
i know editorial supports critical markup per this thread. however, i would like to change the normal == markers used for criticmarkup highlight to my own custom tags :: (double colons).
- is this possible if so how?
- also how can i change the default syntax colors used for text highlight on text surrounded with == markers
if i can't edit the default rules supplied with editorial for == and i must use my custom snippet approach described above to wrap :: for highlight, then
- how / where do i add a syntax color highlight for text surrounded by double colons (::) in the editorial's normal edit view?
finally, vim syntax configurations allow you to "conceal" the extra md characters that are used in wrap pairs like bold, italic, bold + italic (ie unless you are on the line being edited, you do NOT see the characters in the normal edit view.. which is great b/c it makes reading the md documents easer to read and work with after you've edited the document by placing the bold, italic, etc marks). editorial goes half way there, by "dimming" (reducing the transparency) of the special md markup characters but not entirely removing them from the display. it's good but if you have md wrap pairs that consist of multiple characters (like critical markup and bold+italic (three asterisks), they start cluttering up the text and make it hard to read.
- so is it possible to "conceal" md marker pairs in editorial like vim in normal mode and if so how /where?
thx!
-
You could write using the ::highlight markup:: and then use a snippet to convert those into CriticMarkup format for previewing. If you wanted to get reallynfancy, you could create a workflow to convert and then show the preview, without altering the original document. Then always use hat workflow to preview.