I’m trying to copy a summary of some notes to the clipboard. The notes are in a rich-text notes field, so I’m calling getNoteFieldValue()
and passing the result into copyTextToClipboard()
with the expectation that I’d then be able to paste the formatted text into something like TextEdit. However, what ends up on the clipboard is just the string literal "[object NSConcreteMutableAttributedString]"
. Am I missing another step?
It works when using record.getFieldValue()
instead of getNoteFieldValue()
:
function Copy_Note_To_Clipboard() {
var note_id = 'fld-xxx';
let note = record.getFieldValue(note_id);
Utils.copyTextToClipboard(note);
}
Copy_Note_To_Clipboard();
It won’t be the rich text content though. I’ll have to do more work to get it to copy the rich text version of the note to the clipboard.
Thanks, I guess I’ll just use the plain text version for now and switch to the other when it’s fleshed out.