Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

style: improve style for tiptap selection of loom video

Brad Barbin00348ab11bec
diff --git a/apps/erp/app/styles/tailwind.css b/apps/erp/app/styles/tailwind.css
index ae73d2f51e..d8d7f2283e 100644
--- a/apps/erp/app/styles/tailwind.css
+++ b/apps/erp/app/styles/tailwind.css
@@ -113,3 +113,8 @@ p.is-editor-empty:first-child:before {
height: 0;
pointer-events: none;
}
+
+.tiptap.ProseMirror-focused div[data-loom-video],
+.tiptap.ProseMirror-selectedNode div[data-loom-video] {
+ @apply ring-2 ring-primary cursor-move p-2 rounded-lg;
+}
diff --git a/apps/starter/app/styles/tailwind.css b/apps/starter/app/styles/tailwind.css
index 8d56749419..4d2651dae8 100644
--- a/apps/starter/app/styles/tailwind.css
+++ b/apps/starter/app/styles/tailwind.css
@@ -102,3 +102,8 @@ p.is-editor-empty:first-child:before {
height: 0;
pointer-events: none;
}
+
+.tiptap.ProseMirror-focused div[data-loom-video],
+.tiptap.ProseMirror-selectedNode div[data-loom-video] {
+ @apply ring-2 ring-primary cursor-move p-2 rounded-lg;
+}
diff --git a/packages/react/src/Editor/extensions.ts b/packages/react/src/Editor/extensions.ts
index db2089d003..1e15d61348 100644
--- a/packages/react/src/Editor/extensions.ts
+++ b/packages/react/src/Editor/extensions.ts
@@ -36,17 +36,17 @@ const HTMLContent = Node.create({
parseHTML() {
return [
{
- tag: "div[data-html-content]",
+ tag: "div[data-loom-video]",
},
];
},
renderHTML({ node }) {
const container = document.createElement("div");
- container.setAttribute("data-html-content", "true");
+ container.setAttribute("data-loom-video", "true");
container.setAttribute("tabindex", "0");
container.className =
- "focus:ring-2 focus:ring-primary focus:ring-offset-2 hover:ring-2 hover:ring-primary hover:ring-offset-2 p-2 border bg-zinc-100 dark:bg-zinc-900 cursor-move rounded-lg";
+ "focus:ring-2 focus:ring-primary hover:bg-zinc-200 dark:hover:bg-zinc-800 p-2 border bg-zinc-100 dark:bg-zinc-900 cursor-move rounded-lg";
container.innerHTML = node.attrs.html;
return container;
},