# FAQ: how to work with UNO commands

**URL:** <https://forum.collaboraonline.com/t/faq-how-to-work-with-uno-commands/1009>\
**Category:** Development\
**Created:** [April 5, 2022, 5:28pm UTC](https://forum.collaboraonline.com/t/faq-how-to-work-with-uno-commands/1009 "2022-04-05T17:28:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![szyklos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/szyklos/32/359_2.png) [@szyklos](https://forum.collaboraonline.com/u/szyklos)\
**Post date:** [April 5, 2022, 5:28pm UTC](https://forum.collaboraonline.com/t/faq-how-to-work-with-uno-commands/1009/1 "2022-04-05T17:28:48Z")

</div>

Hi, there were questions about using UNO commands in our code. I answered on our Telegram channel but I decided to create this post to make it archived:

1. **What is UNO command?**  
UNO commands are commands to trigger some actions/dialogs inside LibreOffice, our “core”. Example command: `.uno:SetOptimalRowHeight`

2. **How to send UNO command to the server?**  
You can call it on a “map” object which is accessible from many places: `map.sendUnoCommand('.uno:SetOptimalRowHeight');`

3. **How to get UNO command result?**  
Here is an example of catching a command state updates:  
[online/Control.Toolbar.js at 585974e3715c56897093d8c1ecd0d1c2f65b4631 · CollaboraOnline/online · GitHub](https://github.com/CollaboraOnline/online/blob/585974e3715c56897093d8c1ecd0d1c2f65b4631/browser/src/control/Control.Toolbar.js#L1011)  
`map.on('commandresult', onCommandResult);` registers a callback which will receive notification about all command results.  
If you want to query command state only one time, there is a helper already:  
`map['stateChangeHandler'].getItemValue('.uno:DeletePage');`

4. **Where is any UNO commands documentation?**  
You need to look into LibreOffice codebase and documentation. Example:  
[https://wiki.documentfoundation.org/Development/DispatchCommands](https://wiki.documentfoundation.org/Development/DispatchCommands)  
This is a list of UNO commands with short description, under “SDI” link you can find declaration with required parameters and result type.

---

<div class="post-metadata">

**Author:** ![szyklos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/szyklos/32/359_2.png) [@szyklos](https://forum.collaboraonline.com/u/szyklos)\
**Post date:** [April 5, 2022, 5:29pm UTC](https://forum.collaboraonline.com/t/faq-how-to-work-with-uno-commands/1009/2 "2022-04-05T17:29:29Z")

</div>

1. **My command doesn’t get status updates in Collabora Online.**  
You need to enable it in the “core” LibreOffice, example: [https://gerrit.libreoffice.org/c/core/+/132585](https://gerrit.libreoffice.org/c/core/+/132585)

2. **My command needs more params, how to sent them?**  
See more advanced example: [online/Control.RowHeader.js at 46e6f6b4ba1b4b06661a76e259856d7ae9b9e4c0 · CollaboraOnline/online · GitHub](https://github.com/CollaboraOnline/online/blob/46e6f6b4ba1b4b06661a76e259856d7ae9b9e4c0/browser/src/control/Control.RowHeader.js#L208)

````auto
var command = {
	RowHeight: {
		type: 'unsigned short',
		value: this._map._docLayer.twipsToHMM(Math.max(height, 0))
	},
	Row: {
		type: 'long',
		value: row + 1 // core expects 1-based index.
	}
};
map.sendUnoCommand('.uno:RowHeight', command);```
````

---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [September 20, 2022, 2:51pm UTC](https://forum.collaboraonline.com/t/faq-how-to-work-with-uno-commands/1009/3 "2022-09-20T14:51:01Z")

</div>

Listed on September 20, 2022, 2:51pm UTC



---

<div class="post-metadata">

**Author:** ![pedro.silva](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/pedro.silva/32/4_2.png) [@pedro.silva](https://forum.collaboraonline.com/u/pedro.silva)\
**Post date:** [September 20, 2022, 2:54pm UTC](https://forum.collaboraonline.com/t/faq-how-to-work-with-uno-commands/1009/4 "2022-09-20T14:54:46Z")

</div>

Pinned on September 20, 2022, 2:54pm UTC



---

<div class="post-metadata">

**Author:** ![vmiklos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.collaboraonline.com/vmiklos/32/787_2.png) [@vmiklos](https://forum.collaboraonline.com/u/vmiklos)\
**Post date:** [April 21, 2026, 12:37pm UTC](https://forum.collaboraonline.com/t/faq-how-to-work-with-uno-commands/1009/5 "2026-04-21T12:37:11Z")

</div>

Unpinned on April 21, 2026, 12:37pm UTC


