Synopsis text formatting in QR

It’s possible to apply some text formatting to the synopsis when editing it in a Quick Reference window, which I’m assuming is a bug since elsewhere the synopsis is plain text and this is the only place you can accidentally edit it. All the formatting changes are visible immediately in the regular inspector if the document is open in the editor as well as the QR window, and some persist through changing documents. Everything resets to normal when you close and re-open the project.

You can get a good idea of the options just by putting the focus in the synopsis box of a QR window and then opening the Format menu and running through the list–a lot of options that are grayed out when editing the synopsis elsewhere are selectable here; keyboard shortcuts also work. Highlighting, text color, kerning, and baseline changes all persist through switching documents; changing the font and font size or using bold, italic, or underline all reset to normal when you switch documents.

All the formatting options affect the entire synopsis; it’s not possible to just select a word to change.

So! I’m not sure if this is easily fixable or not, but I guess if not it might be worthwhile to put a note in the manual about any formatting there not persisting through sessions.

I noticed that one last night, too. :slight_smile: Pasting styled text retains formatting, too.

Oops, spot the deliberate mistake in this code:

BOOL showsNotes = ([metaDataPopup selectedTag] == 2);
[synopsisNotesTextView setRichText:showsNotes];
[synopsisNotesTextView setUsesRuler:showsNotes];
[synopsisNotesTextView setUsesFontPanel:showsNotes];
[synopsisNotesTextView setImportsGraphics:showsNotes];
[synopsisNotesTextView setUsesFontPanel:YES];


That was the font-changing part, anyway; the paste-as-rich-text bug was different, caused by the fact that Scrivener uses a custom internal paste type for copying and accepting formatted text and the custom text view not checking whether it is rich text or not before accepting the paste.

I’ve fixed both for 2.0.3, although it will be worth keeping an eye out for any other formatting that can creep in (for instance, it was accepting links, which I’ve fixed too), given that I’ve heavily customised the text view, and if I’ve forgot to do any more rich text checks similar problems could occur. (The problem is that the QR - and full screen inspector - synopsis area switches between being plain text for the synopsis and rich text for the notes. In Scrivener 1.x, the notes area didn’t use a custom text view - just as the synopsis area in the inspector still doesn’t - so I may have missed a couple of checks in the transition process. I think I’ve caught them all now, but let me know if you notice any more.)