Welcome to the #dominoforever Product Ideas Forum! The place where you can submit product ideas and enhancement request. We encourage you to participate by voting on, commenting on, and creating new ideas. All new ideas will be evaluated by HCL Product Management & Engineering teams, and the next steps will be communicated. While not all submitted ideas will be executed upon, community feedback will play a key role in influencing which ideas are and when they will be implemented.
For more information and upcoming events around #dominoforever, please visit our Destination Domino Page
I second this. Would be great to have more options when adding files to richtext items.
If using Domino JNA (https://github.com/klehmann/domino-jna) is an option for you, you can use
NotesNote.attachFile(String filePathOnDisk, String uniqueFileNameInNote, Compression compression)
or
NotesNote.attachFile(IAttachmentProducer
producer
, String
uniqueFileNameInNote
, Date fileCreated, Date fileModified)
to attach the file to the document. This actually adds the file data to the NSF and creates the $file item pointing to it so that the file is displayed below the document with V2 attachment style.
Next you can use
NotesNote.createRichTextItem(String
itemName
)
to create a new richtext item from scratch (which returns a "RichTextBuilder") and then call one of theRichTextBuilder.addFileHotspot(...)
methods to produce the richtext item for the file.The most advanced one looks like this:
NotesNote.addFileHotspot(String attachmentProgrammaticName, String filenameToDisplay, String captionText, FontStyle captionStyle, CaptionPosition captionPos,
int
captionColorRed,
int
captionColorGreen,
int
captionColorBlue,
int
resizeToWidth,
int
resizeToHeight,
int
fileSize, InputStream imageData)
So you have plenty of options to
load the icon from disk or produce it on the fly (even PNG will work)
use a custom icon size
set a caption text (e.g. the filename, but can be something else as well)
change the caption position and color
Karsten Lehmann, Mindoo GmbH