How to write plugin

for example: i want create context menus,when i click it,i will choose image on my server,mean i neet use network request api to get images list,then insert is to cell or word.

or: i want insert ole to cell or word,when custome click ole,i want do something

Please see PostMessage API — SDK https://sdk.collaboraonline.com/ documentation, maybe the closest that is available as-is is the Insert_Button postmessage API.