Check if Node.js is installed by running: node -v.
If not installed, download and install it from https://nodejs.org.
Run: npx nuxi@latest init nuxt-tetrons-app
Navigate into project folder: cd nuxt-tetrons-app
Install dependencies: npm install
Run: npm run dev
Open your browser at: http://localhost:3000
Create a new file: pages/editor.vue
Paste the provided Vue code to embed the Tetrons Editor.
1<template>
2 <div class="container">
3 <h2>Tetrons Editor</h2>
4 <iframe
5 src="http://staging.tetrons.com/editor/dist/editor-host.html"
6 allowfullscreen
7 ></iframe>
8 </div>
9</template>
10
11<style scoped>
12html, body {
13 margin: 0;
14 padding: 0;
15 height: 100vh;
16 width: 100vw;
17 overflow: hidden;
18 font-family: 'Inter', sans-serif;
19}
20.container {
21 display: flex;
22 flex-direction: column;
23 height: 100vh;
24 width: 100vw;
25}
26h2 {
27 text-align: center;
28 color: #343a40;
29 margin-bottom: 1rem;
30}
31iframe {
32 flex: 1;
33 width: 100%;
34 border: none;
35 border-radius: 0.3rem;
36 box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
37}
38</style>
Visit: http://localhost:3000/editor in your browser.
You should see the embedded Tetrons Editor.
Install Tailwind CSS using: npx nuxi@latest add tailwind
Run: npm install
Restart dev server to apply Tailwind to your app.