Clipboard font style paste preference default setting

Everything related to our flagship word processor.
Post Reply
foster13
Posts: 37
Joined: 2013-02-25 14:16:16

Clipboard font style paste preference default setting

Post by foster13 »

Is there a way to configure Nisus to use the Times 12 font to paste text copied from another application into a Nisus document and if so, how?

(I tend to copy text from Firefox to paste into Nisus documents. I have not been able to locate a way to set a clipboard font copy preference in Firefox. Also, I tried using Nisus’ ‘Paste Character Attributes' menu option. Though the Firefox font size was different, it still did not seem to work.)

Thank you!

(PS Sorry for all the words in the subject line — I didn't know the proper vernacular, so I tossed in some of everything.)
User avatar
martin
Official Nisus Person
Posts: 5230
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Clipboard font style paste preference default setting

Post by martin »

There's not really any setting like you describe, but I wonder if this tip doesn't help: you can paste anything on the clipboard as plain text using the menu Edit > Paste > Paste Text Only. That way instead of using whatever font Firefox has applied, the pasted text will assume the font/styles of the destination document. Of course using that command would also strip other formatting, links, images, etc, so perhaps it's not quite what you're after.

Another solution would be to use a macro to do the paste, plus some special post-processing. I think the most generalizable solution would be to paste and then apply the Normal paragraph style, so your document's default font is enforced:

Code: Select all

$text = Read Clipboard
Insert Attributed Text $text
Menu "Paragraph Style:Normal"
That will keep most of the pasted formatting intact (eg: links, bolded words, etc) but give a baseline font. Depending on the content being pasted, this might not be enough to really change the font. You might have to get more aggressive and explicitly change it like so:

Code: Select all

$text = Read Clipboard
Insert Attributed Text $text
Menu "Paragraph Style:Normal"
Set Font Name "Times New Roman"
Set Font Size 12
I hope this helps.
foster13
Posts: 37
Joined: 2013-02-25 14:16:16

Re: Clipboard font style paste preference default setting

Post by foster13 »

It might…I'm not versed in macros, other than to click an option under the Macro menu.

Is there any way you could put both macro-related suggestions into an importable macro file that I could add to the menu, to try?

As always, continuing thanks!

-- Susan
User avatar
phspaelti
Posts: 1349
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Clipboard font style paste preference default setting

Post by phspaelti »

Hello Susan,
  1. select the code of the macro above (just the code) and copy.
  2. Switch to Nisus
  3. Select Macro > New Macro
  4. Paste the code
  5. Macro > Save as Macro…
I include the result of this process here for you:
Paste with default font.nwm
(16.22 KiB) Downloaded 344 times
philip
Post Reply