Tinderbox Forum

Changing background color of pasted-in note text

Hi all, here’s another small question that I’m hoping there’s a simple answer to. When copying in text from a website (or any app that has styled text), sometimes the background color is also brought in to TBX.

You can see a demo from NYTimes.com in my attached screenshot. I found the options for Format > Style > Standard Size and Format > Style > Standard Font and that made the text somewhat normalized, but they kept the white background color.

This is a two-parter:

  1. How can I “reset” or “normalize” the note text to fully remove pasted-in styles, including background color?
  2. Is there a more TBX-native way to paste in snippets of text from websites that preserves the URL and page title? (Currently, I’m dragging in the web page from the browser, which works great, and then I manually copy/paste the exact text snippet I want. Maybe there’s a one-step solution?)



FWIW, I can’t recreate your demo.

#1. Use paste-and-match style. Cmd+Opt+Shift+V.

#2. I’d suggest you drag the URL )or article) to your Tinderbox to create a note that contains the source $URL. Then copy+paste-and-match style your text.

The white background bit appears to be a bug I can replicate but not fully describe (which I’ll report via other channels.)

This is a very common problem with copying from a web page and pasting into Tinderbox. To fix the background, select the note(s) with the issue and use Format > Style > Highlight > None

You might have to adjust the note size with a slight jostle to make the note on the map look correct.

I have this problem so consistently that I’ve got a BetterTouchTool TouchBar button defined to fix it. You could do the same with a Keyboard Maestro macro. Unfortunately, I don’t think writing a Tinderbox Stamp is feasible since this they cannot invoke menubar command.

Awesome! Both tips (“paste match style” and “highlight none”) worked for me, thanks!

@PaulWalters I’m an Alfred user, but I haven’t searched for any Tinderbox workflows in it. Maybe there are handy one-step “copy from browser” ones available.

@mwra Perhaps the white background bit is a bug, but I assumed TBX was just dutifully copying in all the source styles, which might have included a white background. I can imagine this behavior is unexpected for most uses, but still useful for some (e.g. copying code snippets with syntax coloring).

I thing the white background bit is a bug as it arises after you reset styles. My hunch is it’s due to poorly/mis-defined styles in the source styled text. CSS != RTF, so as $Text is styled (RTF) text it’s unsurprising the odd gremlin may creep in. However, I suspect separate issue is why the space allotted for the title grows by onlv line each time you click the map icon. I think selecting another tab then switching back causes a correct render for now. Either way, the latter bug has been reported.

@mwra Gotcha, that makes sense.

Is there a way to have Tinderbox treat the note text (either document-wide, or per-note) as plain text by default, jettisoning the RTF formatting?

1 Like

In short, no, though i’d agree it would be useful. I rarely if ever want source formatting in data copy/pasted into TBX. Feature request, if someone wants to make it?

You can use shortcut utilities to map Paste-and-match-style to Paste and vice-versa. However, such fixes then tend to me system-wide and not helpful in all other sorts of contents.

Pretty common for apps that accept rich text from the clipboard to preserve formatting – but OTOH there are a lot of misbehaving websites. It’s always a crap shoot. For anyone doing a lot of this, consider TextSoap, which can clean up the clipboard before pasting.

Should be easy to write, if there’s isn’t one already.

1 Like

I just did over in “Off the Wall”.

Yes, totally… if there isn’t already a constellation of TBX workflows for Alfred, I can imagine them being relatively easy to build out.

I have a simiiar question. I am copying and pasting a lot of text from older documents (Scrivener, etc) into Tinderbox. The is not small in the original, but when pasted is very small. I realize I can either copy-all and magnify, or what is basically the same thing, Format>Style>Standard size (still a bit too small). But is there any default setting that would automatically increase the size of pasted text to a fixed font size? Thanks.

Paste the text in using EditPaste and match style ** (⌘+⌥+⇧+V)

Then the text uses the note’s inherited text font/size/background etc and ignored the unneeded style info in the pasted data.

I don’t think there is an action code ‘reset’ function, I can recall recall asking for one ages back for a not dissimilar situation so I guess that’s still on the strike.

What one really needs is a single command that resets both font (size/face/colour, etc.) and the margins (i.e. the ruler/style). Unhelpfully those have to be don’t mentally, and separately. About once a year some (beta) issue ends up in me resetting the $Text style in the aTbRef TBX—manually on thousands of notes: not fun! Let’s hope there’s a ‘bulk’ fix soon.

AppleScript might br a route but Ii’ve not tried it.

The Text Font setting used in Format ▸ Style ▸ Standard Size is entirely under your control, so you can choose whatever font size you want.