Changing the colour of text I've highlighted

Hello again,

I have a note in which I’m pasting in quotes, and so as to quickly and easily see where the contents of one item starts and where it stops, I was hoping that I could vary the colour of each individual section/chunk of text.

If I mouse-highlight a paragraph or two of text and then right-click on it, I only have the standard cut/copy/paste options, I don’t have an option to either modify the text font, change the colour, etc.

Am I missing something?

I usually mark the text in question (using mouse or keyboard), then type two equal signs ==. This will put these highlighting markers around the marked text.

This method also works with …

  • * for emphasis,
  • ** for strong emphasis,
  • ~~ for deletion (strike-through),
  • ` for putting the text into an inline code block,
  • and of course [[ for creating a link out of it.

For this to work, you have to enable

  • Auto pair brackets and
  • Auto pair Markdown syntax

in Settings → Editor.

Before you ask, that’s about it. So no fancy fonts, colors, or text sizes.

Markdown (which Obsidian is built around) is intentionally a very simple markup “language” that has the goal that the text should stay readable in a text file using any other tool in the world.

3 Likes

Hehe… so that’s it, that’s all, eh? Good catch, yes indeed, I would have asked otherwise. Ok, fair enough, I’ll work within those confines.

I remembered that I was using the markdown <>s to encapsulate my links to local files, so I did suspect that I might only be able to modify the text by means of markdown encapsulation, since I use it a bit in Discord, so I thought it might be the same here, but since I know virtually nothing about markdown coding, I would have thought that there was much more flexibility… but this is going to be very helpful.

Thank you once again Moonbase.

1 Like

The problem with all those Markdown dialects that have evolved (for good reasons) and Obsidian’s enormous flexibility, everyone adds his/her own “extension” and one day soon we won’t be able to edit our stuff with anything else than Obsidian. Talk about “locked in” …

That’s actually my greatest fear, since the past has shown that companies either get sold for high prices at that point, or fail. In either case, the user loses.

That’s why I try to use “extras” sparingly. But of course even I am really intrigued by the possibilities, I must admit. Kudos to the creators and the great community.

A little off-topic, I know. Sorry.

2 Likes

== is a markdown extension/dialect too

But in many ways I agree. I like plaintext, but I dislike markdown. Partly for the reasons you mention but also many of the design decisions and choices. Underlining may not work well on the web, but it has much value in print (including epub etc). There’s much to prefer about asciidoc or org-mode - even rtf etc - but “markdown” is ubiquitous - or, at least, claims about using it are. So it is what it is.
And will be. Until it isn’t.
But plaintext will still be there and manageable.

Oh, and markdown is designed to pass much of the formatting responsibility on to HTML, and so the CSS snippet approach can be considered an intrinsic part of the markdown design.

1 Like

RFT dates from the 1980s and was abandoned by Microsoft in 2008. It is buggy, a security risk, and riven with incompatibilities across the different operating systems and word processors that use it. Even MS recommends avoiding RTF. Thankfully it is being removed by Apple slowly from macOS, and presumably the rest of the computing world will follow suit. No one and no app should be using RTF when it hasn’t been updated in thirteen years, and especially when it was a complete mess from the outset.

1 Like

Reluctant as I am to take a thread further off topic,

I wasn’t actually advocating rtf; the etc indicated it was meant as a marker for WP formats. They all have their deficiencies, but rtf is one of the most widely used and many apps, eg Scrivener, are based on it. And I wasn’t advocating them either, simply indicating that they have many advantages over markdown - the pros aren’t all in one direction.

Criticising rtf for incompatibilities between variants is rather rich from a markdown user. I’ve met far more incompatibility problems using markdown than using rtf.

Microsoft don’t recommend doc either. Apple would love to move its world to a proprietary format it had patented.

All formats can present security problems if they trigger further processing; this includes markdown with its acceptance of HTML.
Obisidian has already once cleaned the HTML is will process in its md files.

Plain plaintext is safe and future proof into a future where computers still exist. Nothing else actually is.

2 Likes

Hello @N1755L : I use the following for highlighting certain texts
<font color=red>\item for change</font>
The colour name cane be changed to a variety of others – blue, orange, paleyellow etc.
Hope this may help
Adrian

4 Likes

@ajbrads Nice I like that. tks.

@N1755L I know you solved the question, but thought I’d add :wink:
I actually use Quotes for Quotes, I know shoot me.
but a simple > separates quotes nicely
Imgur

May not be suitable for a variety of reasons, but I like it for some things.

2 Likes

Adrian,

(Have read the posts alluding to RTF etc; agree. OTOH is there any risk that adding HTML like this fail to comply with Obsidian’s implementation of MarkDown?)

As the OP in this thread, I’m grateful for your suggestion :slight_smile: .

Is there any way to add that simple HTML snippet with, ideally, a single keystroke, please?

It’d make my transition from TextEdit (which of course allows selected text to be colored using conventional macOS commands/manus) to Obsidian complete.

Thanks in advance for any help!

1 Like

I realized very soon after you replied that I could expand on the text customization with markdown (Getting Started | Markdown Guide), but also understood why you were mentioning only the basic formatting with asterisks and such.

I likewise don’t think that it would be wise to add coding to my notes, no matter how nifty they would look in Obsidian. I’m always thinking about whether or not the methods I’m using at any given time will lead me to problems down the road, and I’m too new to Obsidian as of now, I’m constantly in fear that as my database is growing, as I’m investing so much time adding to it, that at some point later I’ll realize that I’ve been doing something in such a manner that I’m going to later run into trouble… or the opposite, that I’ll realize that I should have been doing it this way rather than that way, and how much better or easier my database would have evolved had I done it right from the beginning.

Although something as simple as @ajbrads’s suggestion might be worthy consideration, it would not interfere with the integrity of my notes, and if I ever needed to export and those were in the way, I could always run a grep program to find all instances and delete them. I’m going to be keeping that trick in my bag, thanks @ajbrads

But I might not need to use that solution for my quotes, since @transmitthis’s solution to use the > character works wonderfully, although I’ve yet to experiment with maintaining the same quote box through paragraphs… ah… nm, all I have to do is use another > between the paragraphs to extend the quote box through, so there you have it, complete solution. Thanks @transmitthis

P.S. Oh, I had missed @Dor’s suggestion… Thanks @Dor, lots to look into there!, a few things to figure out.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.