项目
在 GitHub 查看
fouita/tailwind-editor
关于
notion like tailwindcss editor built with svelte
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Tailwind Editor
Svelte component to generate tailwindcss html from a notion like wysiwyg editor.
This component is under development, don't use it in production yet!

Installation
$npm i tailwind-editor
Import to use in a svelte project, you need also tailwind installed (or imported) in order for this to work
<script>
import Editor from 'tailwind-editor'
let html = ''
</script>
<div class="flex">
<Editor bind:html={html} />
<div>
{html}
</div>
</div>
Add initial HTML
If you want to add custom html when you load the component you can pass an array of elements like the following
this is not recommended if the code is not previously generated by the editor
<script>
import Editor from 'tailwind-editor'
let arr_html = [
{html: 'Hello <span class="font-bold">world!</span>', klass: 'p-2 text-3xl'}
]
let html = ''
</script>
<Editor bind:html={html} {arr_html} editable />
TODO
- embed media (image, video)
- add lists
- drag and drop positions
- code highlighter with tailwindcss
Contribution
All contribution are welcome!
About
探索相关项目
加载中…