Skip to content

Commit ce64534

Browse files
committed
when dom-parsing images, allow the html to set a relative ID
This is for compatibility with the imgpaste plugin.
1 parent 202bbc1 commit ce64534

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

script/schema.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ export default function getSpec() {
125125
align = 'center';
126126
}
127127
return {
128-
id: attrs.media,
128+
// a relative ID might be preferred (see imgpaste plugin)
129+
id: dom.dataset.relID || attrs.media,
129130
title: dom.getAttribute('alt'),
130131
width: attrs.w,
131132
height: attrs.h,

0 commit comments

Comments
 (0)