Skip to content

Commit 3d30027

Browse files
committed
[migrate] move HTML Editor to independent package
1 parent 508f65e commit 3d30027

6 files changed

Lines changed: 25 additions & 217 deletions

File tree

ReadMe.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,7 @@
1515
## Usage
1616

1717
```shell
18-
npm install boot-cell \
19-
iterable-observer \
20-
quill quill-image-uploader \
21-
@nuintun/qrcode
18+
npm install boot-cell iterable-observer @nuintun/qrcode
2219
```
2320

2421
`index.html`
@@ -129,7 +126,6 @@ npm install boot-cell \
129126
10. [FormField](https://web-cell.dev/BootCell/interfaces/form_formfield.formfieldprops.html)
130127
11. [InputGroup](https://web-cell.dev/BootCell/interfaces/form_inputgroup.inputgroupprops.html)
131128
12. [FileInput](https://web-cell.dev/BootCell/interfaces/form_fileinput.fileinputprops.html)
132-
13. [HTMLEditor](https://web-cell.dev/BootCell/interfaces/form_htmleditor.htmleditorprops.html)
133129

134130
### Calendar
135131

package.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@
3838
"bootstrap-icons": "^1.0.0",
3939
"dialog-polyfill": "^0.5.0",
4040
"iterable-observer": "^1.0.0-rc.0",
41-
"quill": "^1.3.7",
42-
"quill-image-uploader": "^1.2.2",
4341
"share-api-polyfill": "1.0.21"
4442
},
4543
"devDependencies": {
@@ -52,7 +50,6 @@
5250
"@tech_query/snabbdom-looks-like": "^2.0.1",
5351
"@types/classnames": "^2.3.1",
5452
"@types/jest": "^27.4.0",
55-
"@types/quill": "^2.0.9",
5653
"@types/resize-observer-browser": "^0.1.7",
5754
"@types/turndown": "^5.0.1",
5855
"autoprefixer": "^10.4.2",
@@ -69,8 +66,7 @@
6966
"parcel": "^2.2.1",
7067
"postcss": "^8.4.6",
7168
"prettier": "^2.5.1",
72-
"quill": "^1.3.7",
73-
"quill-image-uploader": "^1.2.2",
69+
"quill-cell": "^0.1.0",
7470
"ts-jest": "^27.1.3",
7571
"ts-node": "^10.4.0",
7672
"typedoc": "^0.22.11",

source/Form/HTMLEditor/index.less

Lines changed: 0 additions & 11 deletions
This file was deleted.

source/Form/HTMLEditor/index.tsx

Lines changed: 0 additions & 152 deletions
This file was deleted.

test/index.tsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
import { documentReady, render, createCell, Fragment } from 'web-cell';
2-
import { formToJSON } from 'web-utility';
2+
import { sleep, formToJSON } from 'web-utility';
33
import { FileCell } from 'file-cell';
44
import { MarkdownAreaElement } from 'markdown-area-element';
5+
import { QuillCell } from 'quill-cell';
56

67
import { Field } from '../source/Form/Field';
78
import { ScoreRange } from '../source/Form/ScoreRange';
89
import { FileInput } from '../source/Form/FileInput';
9-
import { HTMLEditor } from '../source/Form/HTMLEditor';
1010
import { TabView, TabPanel } from '../source/Content/TabView';
1111
import { NavLink } from '../source/Navigator/Nav';
1212
import { ListItem } from '../source/Content/ListGroup';
1313
import { Step } from '../source/Navigator/Stepper';
1414
import { Button } from '../source/Form/Button';
1515

16-
const test_image = 'https://web-cell.dev/WebCell-1.fb612fdb.png';
16+
const test_image = 'https://github.com/EasyWebApp.png';
1717

1818
documentReady.then(() =>
1919
render(
@@ -60,20 +60,19 @@ documentReady.then(() =>
6060
<h2>HTML Editor</h2>
6161

6262
<h3>Bubble theme</h3>
63-
<HTMLEditor name="html-lite">
63+
<QuillCell theme="bubble" name="html-lite">
6464
Operate after selecting
65-
</HTMLEditor>
65+
</QuillCell>
6666

6767
<h3>Snow theme</h3>
68-
<HTMLEditor
68+
<QuillCell
6969
theme="snow"
7070
name="html-full"
7171
placeholder="type here..."
72-
upload={() =>
73-
new Promise(resolve =>
74-
setTimeout(() => resolve(test_image), 1000)
75-
)
76-
}
72+
upload={async () => {
73+
await sleep();
74+
return test_image;
75+
}}
7776
/>
7877
</section>
7978
<Button type="submit" color="success" className="my-3">

yarn.lock

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1435,14 +1435,6 @@
14351435
resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.4.3.tgz#a3c65525b91fca7da00ab1a3ac2b5a2a4afbffbf"
14361436
integrity sha512-QzSuZMBuG5u8HqYz01qtMdg/Jfctlnvj1z/lYnIDXs/golxw0fxtRAHd9KrzjR7Yxz1qVeI00o0kiO3PmVdJ9w==
14371437

1438-
"@types/quill@^2.0.9":
1439-
version "2.0.9"
1440-
resolved "https://registry.yarnpkg.com/@types/quill/-/quill-2.0.9.tgz#71e2cd9069690eeb01b0c7318ff7eb2bb9e2044a"
1441-
integrity sha512-/n40Ypp+jF3GDLqB/5z1P+Odq1K98txXbBgRDkG6Z90LGC1AwQPtZWNeOdDg0yUlgBSUASmpeDn3eBPUuPXtuw==
1442-
dependencies:
1443-
parchment "^1.1.2"
1444-
quill-delta "^4.0.1"
1445-
14461438
"@types/resize-observer-browser@^0.1.7":
14471439
version "0.1.7"
14481440
resolved "https://registry.yarnpkg.com/@types/resize-observer-browser/-/resize-observer-browser-0.1.7.tgz#294aaadf24ac6580b8fbd1fe3ab7b59fe85f9ef3"
@@ -2846,11 +2838,6 @@ fast-diff@1.1.2:
28462838
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.1.2.tgz#4b62c42b8e03de3f848460b639079920695d0154"
28472839
integrity sha512-KaJUt+M9t1qaIteSvjc6P3RbMdXsNhK61GRftR6SNxqmhthcd9MGIi4T+o0jD8LUSpSnSKXE20nLtJ3fOHxQig==
28482840

2849-
fast-diff@1.2.0:
2850-
version "1.2.0"
2851-
resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
2852-
integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
2853-
28542841
fast-glob@3.1.1:
28552842
version "3.1.1"
28562843
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.1.1.tgz#87ee30e9e9f3eb40d6f254a7997655da753d7c82"
@@ -4280,16 +4267,6 @@ lodash.clone@^4.5.0:
42804267
resolved "https://registry.yarnpkg.com/lodash.clone/-/lodash.clone-4.5.0.tgz#195870450f5a13192478df4bc3d23d2dea1907b6"
42814268
integrity sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=
42824269

4283-
lodash.clonedeep@^4.5.0:
4284-
version "4.5.0"
4285-
resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
4286-
integrity sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=
4287-
4288-
lodash.isequal@^4.5.0:
4289-
version "4.5.0"
4290-
resolved "https://registry.yarnpkg.com/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
4291-
integrity sha1-QVxEePK8wwEgwizhDtMib30+GOA=
4292-
42934270
lodash.memoize@4.x, lodash.memoize@^4.1.2:
42944271
version "4.1.2"
42954272
resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
@@ -4857,7 +4834,7 @@ parcel@^2.2.1:
48574834
get-port "^4.2.0"
48584835
v8-compile-cache "^2.0.0"
48594836

4860-
parchment@^1.1.2, parchment@^1.1.4:
4837+
parchment@^1.1.4:
48614838
version "1.1.4"
48624839
resolved "https://registry.yarnpkg.com/parchment/-/parchment-1.1.4.tgz#aeded7ab938fe921d4c34bc339ce1168bc2ffde5"
48634840
integrity sha512-J5FBQt/pM2inLzg4hEWmzQx/8h8D0CiDxaG3vyp9rKrQRSDgBlhjdP5jQGgosEajXPSQouXGHOmVdgo7QmJuOg==
@@ -5381,6 +5358,18 @@ quick-lru@^5.1.1:
53815358
resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-5.1.1.tgz#366493e6b3e42a3a6885e2e99d18f80fb7a8c932"
53825359
integrity sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==
53835360

5361+
quill-cell@^0.1.0:
5362+
version "0.1.0"
5363+
resolved "https://registry.yarnpkg.com/quill-cell/-/quill-cell-0.1.0.tgz#3c564ce81365020bdc490e69fe9a5036f2e1ae2b"
5364+
integrity sha512-2gSKlUqzpqgo0RYl17MlXxLZP2sv56YreAyaRGRgOyY2Z3SgyEjunfHCsbWcXp5THRntxdCyxLURIsDuuZbbFA==
5365+
dependencies:
5366+
"@swc/helpers" "^0.3.2"
5367+
quill "^1.3.7"
5368+
quill-image-uploader "^1.2.2"
5369+
regenerator-runtime "^0.13.9"
5370+
web-cell "^2.4.0-rc.6"
5371+
web-utility "^3.0.0"
5372+
53845373
quill-delta@^3.6.2:
53855374
version "3.6.3"
53865375
resolved "https://registry.yarnpkg.com/quill-delta/-/quill-delta-3.6.3.tgz#b19fd2b89412301c60e1ff213d8d860eac0f1032"
@@ -5390,15 +5379,6 @@ quill-delta@^3.6.2:
53905379
extend "^3.0.2"
53915380
fast-diff "1.1.2"
53925381

5393-
quill-delta@^4.0.1:
5394-
version "4.2.2"
5395-
resolved "https://registry.yarnpkg.com/quill-delta/-/quill-delta-4.2.2.tgz#015397d046e0a3bed087cd8a51f98c11a1b8f351"
5396-
integrity sha512-qjbn82b/yJzOjstBgkhtBjN2TNK+ZHP/BgUQO+j6bRhWQQdmj2lH6hXG7+nwwLF41Xgn//7/83lxs9n2BkTtTg==
5397-
dependencies:
5398-
fast-diff "1.2.0"
5399-
lodash.clonedeep "^4.5.0"
5400-
lodash.isequal "^4.5.0"
5401-
54025382
quill-image-uploader@^1.2.2:
54035383
version "1.2.2"
54045384
resolved "https://registry.yarnpkg.com/quill-image-uploader/-/quill-image-uploader-1.2.2.tgz#ef4722f0394fbbcdef937d9ad29b4b43e2f5c3f3"

0 commit comments

Comments
 (0)