mmo-image
1 symbol · generated 5 Oct 2026
mmo-image
mmo-image.jhs:1An image to pick, show, or take away: its value is the image's url. The image picked is sent to mmo.edms, and the value becomes its url -- or, when embedded, it is the image itself, as a data: url.
- Extends
CustomShadowElement
Index
| value | the url of the image | |
| maxwidth | the widest the image is shown (a css length) | |
| url | where mmo.edms' api is: the page's (MMO.edms.config.url) by default | |
| token | the session's CSRF token: the page's by default | |
| labels | the labels of the image sent: ids, or quoted paths and "#tags" | |
| embedded | the image is kept in the value itself (a data: url), and sent nowhere | |
| ViewDefault static readonly accessor | ||
| value accessor | Get the value of the image | |
| maxwidth accessor | Get the widest the image is shown | |
| embedded accessor | Get the embedded attribute (read as it is: not an observed attribute, whose empty value would be set false) | |
| init() | ||
| pick() | Pick an image | |
| filesChange(input) | Handle the change event of the file input | |
| setFile(file) | Make an image of $file the value: sent to mmo.edms, or, when embedded, read as a data: url | |
| .uploading | set while the image is sent |
Attributes6
value
mmo-image.jhsthe url of the image
value
maxwidth
mmo-image.jhsthe widest the image is shown (a css length)
maxwidth
url
mmo-image.jhswhere mmo.edms' api is: the page's (MMO.edms.config.url) by default
url
token
mmo-image.jhsthe session's CSRF token: the page's by default
token
labels
mmo-image.jhsthe labels of the image sent: ids, or quoted paths and "#tags"
labels
embedded
mmo-image.jhsthe image is kept in the value itself (a data: url), and sent nowhere
embedded
Properties4
ViewDefault
staticreadonlyaccessormmo-image.jhs:20value
accessormmo-image.jhs:32Get the value of the image
- Type
string
maxwidth
accessormmo-image.jhs:46Get the widest the image is shown
- Type
?string
embedded
accessormmo-image.jhs:58Get the embedded attribute (read as it is: not an observed attribute, whose empty value would be set false)
- Type
boolean
Methods4
init()
mmo-image.jhs:24pick()
mmo-image.jhs:70Pick an image
filesChange(input)
mmo-image.jhs:78Handle the change event of the file input
| input | HTMLInputElement |
setFile(file)
mmo-image.jhs:89Make an image of $file the value: sent to mmo.edms, or, when embedded, read as a data: url
| file | File | |
| returns | Promise<string> | the value |
CSS hooks1
.uploading
mmo-image.jhsset while the image is sent
.uploading