Skip to content

Commit

Permalink
add tailwind experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp Kühn authored and Philipp Kühn committed Dec 17, 2021
1 parent 688614b commit 141c517
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 82 deletions.
26 changes: 0 additions & 26 deletions demos/src/Experiments/All/JS/index.html

This file was deleted.

56 changes: 0 additions & 56 deletions demos/src/Experiments/All/JS/styles.scss

This file was deleted.

54 changes: 54 additions & 0 deletions demos/src/Experiments/Tailwind/JS/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!-- load tailwind -->
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@tailwindcss/typography/dist/typography.min.css" />

<!-- provide element -->
<div class="element"></div>

<!-- create editor -->
<script type="module">
import { Editor } from '@tiptap/core'
import StarterKit from '@tiptap/starter-kit'

const editor = new Editor({
element: document.querySelector('.element'),
extensions: [
StarterKit,
],
editorProps: {
attributes: {
class: 'prose prose-sm sm:prose lg:prose-lg xl:prose-2xl m-5 focus:outline-none',
},
},
content: `
<h2>
Hi there,
</h2>
<p>
this is a basic <em>basic</em> example of <strong>tiptap</strong>. Sure, there are all kind of basic text styles you’d probably expect from a text editor. But wait until you see the lists:
</p>
<ul>
<li>
That’s a bullet list with one …
</li>
<li>
… or two list items.
</li>
</ul>
<p>
Isn’t that great? And all of that is editable. But wait, there’s more. Let’s try a code block:
</p>
<pre><code class="language-css">body {
display: none;
}</code></pre>
<p>
I know, I know, this is impressive. It’s only the tip of the iceberg though. Give it a try and click a little bit around. Don’t forget to check the other examples too.
</p>
<blockquote>
Wow, that’s amazing. Good work, boy! 👏
<br />
— Mom
</blockquote>
`,
})
</script>

0 comments on commit 141c517

Please sign in to comment.