Skip to content

feat: handle UI_PickLink postMessage from Collabora Online#2435

Open
pedropintosilva wants to merge 1 commit intoopencloud-eu:mainfrom
pedropintosilva:feat/handle-ui-picklink
Open

feat: handle UI_PickLink postMessage from Collabora Online#2435
pedropintosilva wants to merge 1 commit intoopencloud-eu:mainfrom
pedropintosilva:feat/handle-ui-picklink

Conversation

@pedropintosilva
Copy link
Copy Markdown
Contributor

Summary

Details

Reuses the same file-picker infrastructure as the existing UI_InsertFile / UI_InsertGraphic handlers. The text field is an optional argument honoured by coolwsd since CollaboraOnline/online#15561 (MERGED) — older coolwsd ignores it and falls back to the URL, so this change is backward-compatible with any coolwsd release.

SDK reference: https://sdk.collaboraonline.com/docs/postmessage_api.html#ui-picklink-ui-editor-host

Open the existing FilePickerModal and reply with Action_InsertLink
carrying {url: resource.privateLink, text: resource.name} so Collabora
Online inserts a hyperlink to the picked file (label =
filename). Requires EnableRemoteLinkPicker=true in CheckFileInfo,
added in the companion opencloud-eu/opencloud PR.

Signed-off-by: Pedro Pinto Silva <pedro.silva@collabora.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant