forked from miroapp/app-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheditor.html
32 lines (30 loc) · 916 Bytes
/
editor.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE html>
<html lang="en">
<head>
<script type="text/javascript" src="https://miro.com/app/static/sdk.1.1.js"></script>
<script type="text/javascript">
const icon =
'<circle cx="12" cy="12" r="9" fill="none" fill-rule="evenodd" stroke="currentColor" stroke-width="2"></circle>'
miro.onReady(() => {
miro.initialize({
extensionPoints: {
bottomBar: async () => {
const currentUser = await miro.getCurrentUser()
const canEdit = currentUser.currentBoardPermissions.includes('EDIT_CONTENT')
if (canEdit) {
return {
title: 'can edit example',
svgIcon: icon,
onClick: sayHi,
}
}
},
},
})
})
function sayHi() {
alert('Hi!')
}
</script>
</head>
</html>