fix: Ensure copy code button appears in collab editing (#3021)

* fix: Ensure copy code button appears in collab editing

* fix: code actions should not flip in RTL doc (code is always left aligned)
This commit is contained in:
Tom Moor
2022-01-27 17:14:47 -08:00
committed by GitHub
parent bcd6e17781
commit 0203b2bc17
3 changed files with 32 additions and 22 deletions

View File

@@ -63,6 +63,10 @@ export default class Notice extends Node {
select.appendChild(option);
});
const actions = document.createElement("div");
actions.className = "notice-actions";
actions.appendChild(select);
let component;
if (node.attrs.style === "tip") {
@@ -81,7 +85,7 @@ export default class Notice extends Node {
"div",
{ class: `notice-block ${node.attrs.style}` },
icon,
["div", { contentEditable: "false" }, select],
["div", { contentEditable: "false" }, actions],
["div", { class: "content" }, 0],
];
},