We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<style> html, body { margin: 0; } #editor { width: 100vw; height: 100vh; } </style> </head> <body> <div id="container"></div> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/bundle.js"></script> <script> // 创建 Shadow DOM const container = document.getElementById("container"); const shadowRoot = container.attachShadow({ mode: "open" }); // 创建 link 元素并附加到 Shadow DOM const link = document.createElement("link"); link.rel = "stylesheet"; link.href = "https://cdn.jsdelivr.net/npm/@baklavajs/[email protected]/dist/syrup-dark.css"; shadowRoot.appendChild(link); // 创建 editor 元素并附加到 Shadow DOM const editor = document.createElement("div"); editor.id = "editor"; shadowRoot.appendChild(editor); // 初始化 BaklavaJS const viewModel = BaklavaJS.createBaklava(editor); const TestNode = BaklavaJS.Core.defineNode({ type: "TestNode", inputs: { a: () => new BaklavaJS.RendererVue.TextInputInterface("Hello", "world"), }, outputs: { b: () => new BaklavaJS.RendererVue.TextInputInterface("Hello", "world"), }, }); viewModel.editor.registerNodeType(TestNode); </script> </body>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: