1.0.0-beta.54 • Published 9 months ago

@tanbo/textbus v1.0.0-beta.54

Weekly downloads
1,235
License
GPL-3.0-only
Repository
github
Last release
9 months ago

安装

通过 npm 安装 TextBus:

npm install @tanbo/textbus

在 html 中准备一个空的元素

<body>
  <div id="editor"></div>
</body>

通过 css 选择器,或直接传入一个 DOM 元素初始化 TextBus。

import { createEditor } from '@tanbo/textbus';
import { Observable } from 'rxjs';

const editor = createEditor('#editor', {
  uploader(type: string): string | Promise<string> | Observable<string> {
    // switch (type) {
    //   case 'video':
    //     console.log('上传视频');
    //     break;
    //   case 'image':
    //     console.log('上传视频');
    //     break;
    //   case 'audio':
    //     console.log('上传音频');
    //     break;
    // }
    return Promise.resolve().then(() => {
      return '/test'
    })
  },
  contents: `<p>欢迎你使用&nbsp;<strong>TextBus</strong> 富文本编辑器...<br></p>`
});

editor.onChange.subscribe(() => {
  console.log(editor.getContents());
});

官网地址

TextBus 官网

1.0.0-beta.54

9 months ago

1.0.0-beta.53

9 months ago

1.0.0-beta.51

9 months ago

1.0.0-beta.52

9 months ago

1.0.0-beta.50

9 months ago

1.0.0-beta.48

9 months ago

1.0.0-beta.49

9 months ago

1.0.0-beta.47

9 months ago

1.0.0-beta.44

9 months ago

1.0.0-beta.45

9 months ago

1.0.0-beta.42

9 months ago

1.0.0-beta.43

9 months ago

1.0.0-beta.40

9 months ago

1.0.0-beta.41

9 months ago

1.0.0-beta.46

9 months ago

1.0.0-beta.39

9 months ago

1.0.0-beta.37

9 months ago

1.0.0-beta.38

9 months ago

1.0.0-beta.36

9 months ago

1.0.0-beta.35

9 months ago

1.0.0-beta.33

10 months ago

1.0.0-beta.34

10 months ago

1.0.0-beta.31

10 months ago

1.0.0-beta.32

10 months ago

1.0.0-beta.30

10 months ago

1.0.0-beta.29

10 months ago

1.0.0-beta.28

10 months ago

1.0.0-beta.26

10 months ago

1.0.0-beta.27

10 months ago

1.0.0-beta.25

10 months ago

1.0.0-beta.24

10 months ago

1.0.0-beta.23

10 months ago

1.0.0-beta.22

10 months ago

1.0.0-beta.20

10 months ago

1.0.0-beta.21

10 months ago

1.0.0-beta.19

10 months ago

1.0.0-beta.17

10 months ago

1.0.0-beta.18

10 months ago

1.0.0-beta.15

10 months ago

1.0.0-beta.16

10 months ago

1.0.0-beta.12

10 months ago

1.0.0-beta.13

10 months ago

1.0.0-beta.14

10 months ago

1.0.0-beta.11

10 months ago

1.0.0-beta.10

10 months ago

1.0.0-beta.9

10 months ago

1.0.0-beta.8

10 months ago

1.0.0-beta.2

10 months ago

1.0.0-beta.3

10 months ago

1.0.0-beta.4

10 months ago

1.0.0-beta.5

10 months ago

1.0.0-beta.0

10 months ago

1.0.0-beta.1

10 months ago

1.0.0-beta.6

10 months ago

1.0.0-beta.7

10 months ago

1.0.0-alpha.139

10 months ago

1.0.0-alpha.138

10 months ago

1.0.0-alpha.137

10 months ago

1.0.0-alpha.135

11 months ago

1.0.0-alpha.136

11 months ago

1.0.0-alpha.134

11 months ago

1.0.0-alpha.131

11 months ago

1.0.0-alpha.130

11 months ago

1.0.0-alpha.133

11 months ago

1.0.0-alpha.132

11 months ago

1.0.0-alpha.129

11 months ago

1.0.0-alpha.128

11 months ago

1.0.0-alpha.127

11 months ago

1.0.0-alpha.126

11 months ago

1.0.0-alpha.125

11 months ago

1.0.0-alpha.124

11 months ago

1.0.0-alpha.123

11 months ago

1.0.0-alpha.122

11 months ago

1.0.0-alpha.121

11 months ago

1.0.0-alpha.119

11 months ago

1.0.0-alpha.118

11 months ago

1.0.0-alpha.117

11 months ago

1.0.0-alpha.116

11 months ago

1.0.0-alpha.115

11 months ago

1.0.0-alpha.120

11 months ago

1.0.0-alpha.114

11 months ago

1.0.0-alpha.109

11 months ago

1.0.0-alpha.113

11 months ago

1.0.0-alpha.112

11 months ago

1.0.0-alpha.111

11 months ago

1.0.0-alpha.110

11 months ago

1.0.0-alpha.108

11 months ago

1.0.0-alpha.107

11 months ago

1.0.0-alpha.106

11 months ago

1.0.0-alpha.105

11 months ago

1.0.0-alpha.104

11 months ago

1.0.0-alpha.103

11 months ago

1.0.0-alpha.102

12 months ago

1.0.0-alpha.101

12 months ago

1.0.0-alpha.100

12 months ago

1.0.0-alpha.99

12 months ago

1.0.0-alpha.98

12 months ago

1.0.0-alpha.97

12 months ago

1.0.0-alpha.96

12 months ago

1.0.0-alpha.95

12 months ago

1.0.0-alpha.94

12 months ago

1.0.0-alpha.92

12 months ago

1.0.0-alpha.91

12 months ago

1.0.0-alpha.93

12 months ago

1.0.0-alpha.90

12 months ago

1.0.0-alpha.85

12 months ago

1.0.0-alpha.87

12 months ago

1.0.0-alpha.86

12 months ago

1.0.0-alpha.89

12 months ago

1.0.0-alpha.88

12 months ago

1.0.0-alpha.84

12 months ago

1.0.0-alpha.83

12 months ago

1.0.0-alpha.82

12 months ago

1.0.0-alpha.81

12 months ago

1.0.0-alpha.80

12 months ago

1.0.0-alpha.79

12 months ago

1.0.0-alpha.78

1 year ago

1.0.0-alpha.77

1 year ago

1.0.0-alpha.76

1 year ago

1.0.0-alpha.74

1 year ago

1.0.0-alpha.73

1 year ago

1.0.0-alpha.75

1 year ago

1.0.0-alpha.72

1 year ago

1.0.0-alpha.71

1 year ago

1.0.0-alpha.70

1 year ago

1.0.0-alpha.69

1 year ago

1.0.0-alpha.68

1 year ago

1.0.0-alpha.67

1 year ago

1.0.0-alpha.66

1 year ago

1.0.0-alpha.65

1 year ago

1.0.0-alpha.64

1 year ago

1.0.0-alpha.63

1 year ago

1.0.0-alpha.54

1 year ago

1.0.0-alpha.53

1 year ago

1.0.0-alpha.52

1 year ago

1.0.0-alpha.51

1 year ago

1.0.0-alpha.50

1 year ago

1.0.0-alpha.49

1 year ago

1.0.0-alpha.48

1 year ago

1.0.0-alpha.47

1 year ago

1.0.0-alpha.44

1 year ago

1.0.0-alpha.43

1 year ago

1.0.0-alpha.42

1 year ago

1.0.0-alpha.41

1 year ago

1.0.0-alpha.40

1 year ago

1.0.0-alpha.39

1 year ago

1.0.0-alpha.38

1 year ago

1.0.0-alpha.37

1 year ago

1.0.0-alpha.36

1 year ago

1.0.0-alpha.35

1 year ago

1.0.0-alpha.34

1 year ago

1.0.0-alpha.33

1 year ago

1.0.0-alpha.32

1 year ago

1.0.0-alpha.31

1 year ago

1.0.0-alpha.30

1 year ago

1.0.0-alpha.29

1 year ago

1.0.0-alpha.27

1 year ago

1.0.0-alpha.28

1 year ago

1.0.0-alpha.26

1 year ago

1.0.0-alpha.25

1 year ago

1.0.0-alpha.24

1 year ago

1.0.0-alpha.23

1 year ago

1.0.0-alpha.22

1 year ago

1.0.0-alpha.19

1 year ago

1.0.0-alpha.18

1 year ago

1.0.0-alpha.17

1 year ago

1.0.0-alpha.21

1 year ago

1.0.0-alpha.20

1 year ago

1.0.0-alpha.16

1 year ago

1.0.0-alpha.15

1 year ago

1.0.0-alpha.14

1 year ago

1.0.0-alpha.13

1 year ago

1.0.0-alpha.12

1 year ago

1.0.0-alpha.11

1 year ago

1.0.0-alpha.10

1 year ago

1.0.0-alpha.9

1 year ago

1.0.0-alpha.8

1 year ago

1.0.0-alpha.7

1 year ago

1.0.0-alpha.6

1 year ago

1.0.0-alpha.5

1 year ago

1.0.0-alpha.4

1 year ago

1.0.0-alpha.3

1 year ago

1.0.0-alpha.2

1 year ago

0.1.0-alpha.19

1 year ago

1.0.0-alpha.1

1 year ago

1.0.0-alpha.0

1 year ago

0.1.0-alpha.18

1 year ago

0.1.0-alpha.17

1 year ago

0.1.0-alpha.15

1 year ago

0.1.0-alpha.14

1 year ago

0.1.0-alpha.13

1 year ago

0.1.0-alpha.12

1 year ago

0.1.0-alpha.11

1 year ago

0.1.0-alpha.10

1 year ago

0.1.0-alpha.9

1 year ago

0.1.0-alpha.8

1 year ago

0.1.0-alpha.7

1 year ago

0.1.0-alpha.6

1 year ago

0.1.0-alpha.5

1 year ago

0.1.0-alpha.4

1 year ago

0.1.0-alpha.3

1 year ago

0.1.0-alpha.2

1 year ago

0.1.0-alpha.1

1 year ago

0.1.0-alpha.0

1 year ago

0.0.1-beta.49

1 year ago

0.0.1-beta.48

1 year ago

0.0.1-beta.47

1 year ago

0.0.1-beta.46

1 year ago

0.0.1-beta.45

1 year ago

0.0.1-beta.44

1 year ago

0.0.1-beta.43

1 year ago

0.0.1-beta.42

1 year ago

0.0.1-beta.41

1 year ago

0.0.1-beta.40

1 year ago

0.0.1-beta.39

1 year ago

0.0.1-beta.38

1 year ago

0.0.1-beta.37

1 year ago

0.0.1-beta.36

1 year ago

0.0.1-beta.34

1 year ago

0.0.1-beta.35

1 year ago

0.0.1-beta.33

1 year ago

0.0.1-beta.32

1 year ago

0.0.1-beta.31

1 year ago

0.0.1-beta.30

1 year ago

0.0.1-beta.29

1 year ago

0.0.1-beta.28

1 year ago

0.0.1-beta.27

1 year ago

0.0.1-beta.23

1 year ago

0.0.1-beta.25

1 year ago

0.0.1-beta.24

1 year ago

0.0.1-beta.26

1 year ago

0.0.1-beta.21

1 year ago

0.0.1-beta.22

1 year ago

0.0.1-beta.20

1 year ago

0.0.1-beta.19

1 year ago

0.0.1-beta.18

1 year ago

0.0.1-beta.17

1 year ago

0.0.1-beta.16

1 year ago

0.0.1-beta.15

1 year ago

0.0.1-beta.14

1 year ago

0.0.1-beta.13

1 year ago

0.0.1-beta.12

1 year ago

0.0.1-beta.11

1 year ago

0.0.1-beta.9

1 year ago

0.0.1-beta.8

1 year ago

0.0.1-beta.10

1 year ago

0.0.1-beta.7

1 year ago

0.0.1-beta.6

1 year ago

0.0.1-beta.3

1 year ago

0.0.1-beta.5

1 year ago

0.0.1-beta.4

1 year ago

0.0.1-beta.2

1 year ago

0.0.1-beta.1

1 year ago

0.0.1-beta.0

1 year ago