0.3.3 • Published 15 days ago

tailwind-editor v0.3.3

Weekly downloads
65
License
MIT
Repository
github
Last release
15 days ago

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!

svelte tailwind wysiwyg editor

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

  1. embed media (image, video)
  2. add lists
  3. drag and drop positions
  4. code highlighter with tailwindcss

Contribution

All contribution are welcome!

About

Fouita : UI framework for svelte + tailwind components

0.3.3

15 days ago

0.3.2

6 months ago

0.3.0

12 months ago

0.3.1

9 months ago

0.1.63

2 years ago

0.2.1

1 year ago

0.2.0

1 year ago

0.2.2

1 year ago

0.1.62

2 years ago

0.1.60

2 years ago

0.1.61

2 years ago

0.1.57

2 years ago

0.1.58

2 years ago

0.1.59

2 years ago

0.1.55

3 years ago

0.1.56

3 years ago

0.1.52

3 years ago

0.1.53

3 years ago

0.1.54

3 years ago

0.1.50

3 years ago

0.1.51

3 years ago

0.1.49

3 years ago

0.1.46

3 years ago

0.1.47

3 years ago

0.1.48

3 years ago

0.1.45

3 years ago

0.1.44

3 years ago

0.1.43

3 years ago

0.1.42

3 years ago

0.1.41

3 years ago

0.1.40

3 years ago

0.1.39

3 years ago

0.1.38

3 years ago

0.1.37

3 years ago

0.1.36

3 years ago

0.1.31

3 years ago

0.1.32

3 years ago

0.1.33

3 years ago

0.1.34

3 years ago

0.1.35

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.3

3 years ago

0.1.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago