Skip to content

Commit 0217484

Browse files
committed
handle devhost execCommand messages
1 parent dd431b6 commit 0217484

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/resources/editor/devserver/devserver-core.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,12 @@ <h2 class="modal__title" id="quarto-log-error-modal-title">
620620
window.parent.postMessage(event, '*');
621621
});
622622
}
623+
// listen for execCommand messages
624+
window.addEventListener("message", function (event) {
625+
if (event.data.type === "devhost-exec-command") {
626+
window.document.execCommand(event.data.data);
627+
}
628+
}, true);
623629

624630
const logEntries = new Array(1000);
625631
logEntries.offset = 0;

0 commit comments

Comments
 (0)