@cocreate/text 1.20.12 → 1.20.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/FUNDING.yml +3 -3
- package/.github/workflows/automated.yml +95 -95
- package/.github/workflows/manual.yml +44 -44
- package/CHANGELOG.md +1797 -1790
- package/CONTRIBUTING.md +96 -96
- package/CoCreate.config.js +26 -26
- package/LICENSE +683 -683
- package/README.md +97 -97
- package/demo/custom-rich-text.html +277 -277
- package/demo/demos.1.html +24 -24
- package/demo/demos.html +38 -38
- package/demo/index.html +74 -74
- package/demo/test-webpage.html +376 -376
- package/docs/index.html +276 -276
- package/package.json +73 -73
- package/release.config.js +21 -21
- package/src/index.js +470 -470
- package/src/saveDomText.js +32 -32
- package/src/updateDom.js +208 -208
- package/src/updateText.js +79 -79
- package/webpack.config.js +84 -84
package/CONTRIBUTING.md
CHANGED
@@ -1,97 +1,97 @@
|
|
1
|
-
# Contributing to CoCreate-text
|
2
|
-
|
3
|
-
This project is work of [many contributors](https://github.com/CoCreate-app/CoCreate-text/graphs/contributors).
|
4
|
-
You're encouraged to submit [pull requests](https://github.com/CoCreate-app/CoCreate-text/pulls),
|
5
|
-
[propose features and discuss issues](https://github.com/CoCreate-app/CoCreate-text/issues).
|
6
|
-
|
7
|
-
In the examples below, substitute your Github username for `contributor` in URLs.
|
8
|
-
|
9
|
-
## Fork the Project
|
10
|
-
|
11
|
-
Fork the [project on Github](https://github.com/CoCreate-app/CoCreate-text) and check out your copy.
|
12
|
-
|
13
|
-
```
|
14
|
-
git text https://github.com/contributor/CoCreate-text.git
|
15
|
-
cd CoCreate-text
|
16
|
-
git remote add upstream https://github.com/CoCreate-app/CoCreate-text.git
|
17
|
-
```
|
18
|
-
|
19
|
-
## Create a Topic Branch
|
20
|
-
|
21
|
-
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix on dev branch.
|
22
|
-
|
23
|
-
```
|
24
|
-
git checkout dev
|
25
|
-
git pull upstream dev
|
26
|
-
git checkout -b my-feature-branch
|
27
|
-
```
|
28
|
-
|
29
|
-
## Write Tests
|
30
|
-
|
31
|
-
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build.
|
32
|
-
|
33
|
-
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
|
34
|
-
|
35
|
-
## Write Code
|
36
|
-
|
37
|
-
Implement your feature or bug fix.
|
38
|
-
|
39
|
-
## Write Documentation
|
40
|
-
|
41
|
-
Document any external behavior in the [README](README.md).
|
42
|
-
|
43
|
-
## Commit Changes
|
44
|
-
|
45
|
-
Make sure git knows your name and email address:
|
46
|
-
|
47
|
-
```
|
48
|
-
git config --global user.name "Your Name"
|
49
|
-
git config --global user.email "contributor@example.com"
|
50
|
-
```
|
51
|
-
|
52
|
-
We use [semantic-release](https://github.com/semantic-release/semantic-release) as process to generate changelog
|
53
|
-
and to release. Write meaningful commits according to
|
54
|
-
[Commit Message Formats](https://github.com/semantic-release/semantic-release#commit-message-format) is important.
|
55
|
-
|
56
|
-
```
|
57
|
-
git add ...
|
58
|
-
git commit -am "commit-type(optional topic): a meaningful message"
|
59
|
-
```
|
60
|
-
|
61
|
-
Here is an example of the release type that should be done based on a [semantic-release](https://github.com/semantic-release/semantic-release):
|
62
|
-
|
63
|
-
| Commit message | Release type |
|
64
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
|
65
|
-
| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
|
66
|
-
| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
|
67
|
-
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |
|
68
|
-
|
69
|
-
|
70
|
-
## Push
|
71
|
-
|
72
|
-
```
|
73
|
-
git push origin my-feature-branch
|
74
|
-
```
|
75
|
-
|
76
|
-
## Make a Pull Request
|
77
|
-
|
78
|
-
Go to [https://github.com/CoCreate-app/CoCreate-text](https://github.com/CoCreate-app/CoCreate-text) and select your feature branch.
|
79
|
-
Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
80
|
-
|
81
|
-
## Rebase
|
82
|
-
|
83
|
-
If you've been working on a change for a while, rebase with upstream/dev.
|
84
|
-
|
85
|
-
```
|
86
|
-
git fetch upstream
|
87
|
-
git rebase upstream/dev
|
88
|
-
git push origin my-feature-branch -f
|
89
|
-
```
|
90
|
-
|
91
|
-
## Be Patient
|
92
|
-
|
93
|
-
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang in there!
|
94
|
-
|
95
|
-
## Thank You
|
96
|
-
|
1
|
+
# Contributing to CoCreate-text
|
2
|
+
|
3
|
+
This project is work of [many contributors](https://github.com/CoCreate-app/CoCreate-text/graphs/contributors).
|
4
|
+
You're encouraged to submit [pull requests](https://github.com/CoCreate-app/CoCreate-text/pulls),
|
5
|
+
[propose features and discuss issues](https://github.com/CoCreate-app/CoCreate-text/issues).
|
6
|
+
|
7
|
+
In the examples below, substitute your Github username for `contributor` in URLs.
|
8
|
+
|
9
|
+
## Fork the Project
|
10
|
+
|
11
|
+
Fork the [project on Github](https://github.com/CoCreate-app/CoCreate-text) and check out your copy.
|
12
|
+
|
13
|
+
```
|
14
|
+
git text https://github.com/contributor/CoCreate-text.git
|
15
|
+
cd CoCreate-text
|
16
|
+
git remote add upstream https://github.com/CoCreate-app/CoCreate-text.git
|
17
|
+
```
|
18
|
+
|
19
|
+
## Create a Topic Branch
|
20
|
+
|
21
|
+
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix on dev branch.
|
22
|
+
|
23
|
+
```
|
24
|
+
git checkout dev
|
25
|
+
git pull upstream dev
|
26
|
+
git checkout -b my-feature-branch
|
27
|
+
```
|
28
|
+
|
29
|
+
## Write Tests
|
30
|
+
|
31
|
+
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build.
|
32
|
+
|
33
|
+
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
|
34
|
+
|
35
|
+
## Write Code
|
36
|
+
|
37
|
+
Implement your feature or bug fix.
|
38
|
+
|
39
|
+
## Write Documentation
|
40
|
+
|
41
|
+
Document any external behavior in the [README](README.md).
|
42
|
+
|
43
|
+
## Commit Changes
|
44
|
+
|
45
|
+
Make sure git knows your name and email address:
|
46
|
+
|
47
|
+
```
|
48
|
+
git config --global user.name "Your Name"
|
49
|
+
git config --global user.email "contributor@example.com"
|
50
|
+
```
|
51
|
+
|
52
|
+
We use [semantic-release](https://github.com/semantic-release/semantic-release) as process to generate changelog
|
53
|
+
and to release. Write meaningful commits according to
|
54
|
+
[Commit Message Formats](https://github.com/semantic-release/semantic-release#commit-message-format) is important.
|
55
|
+
|
56
|
+
```
|
57
|
+
git add ...
|
58
|
+
git commit -am "commit-type(optional topic): a meaningful message"
|
59
|
+
```
|
60
|
+
|
61
|
+
Here is an example of the release type that should be done based on a [semantic-release](https://github.com/semantic-release/semantic-release):
|
62
|
+
|
63
|
+
| Commit message | Release type |
|
64
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- |
|
65
|
+
| `fix(pencil): stop graphite breaking when too much pressure applied` | Patch Release |
|
66
|
+
| `feat(pencil): add 'graphiteWidth' option` | ~~Minor~~ Feature Release |
|
67
|
+
| `perf(pencil): remove graphiteWidth option`<br><br>`BREAKING CHANGE: The graphiteWidth option has been removed.`<br>`The default graphite width of 10mm is always used for performance reasons.` | ~~Major~~ Breaking Release |
|
68
|
+
|
69
|
+
|
70
|
+
## Push
|
71
|
+
|
72
|
+
```
|
73
|
+
git push origin my-feature-branch
|
74
|
+
```
|
75
|
+
|
76
|
+
## Make a Pull Request
|
77
|
+
|
78
|
+
Go to [https://github.com/CoCreate-app/CoCreate-text](https://github.com/CoCreate-app/CoCreate-text) and select your feature branch.
|
79
|
+
Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
80
|
+
|
81
|
+
## Rebase
|
82
|
+
|
83
|
+
If you've been working on a change for a while, rebase with upstream/dev.
|
84
|
+
|
85
|
+
```
|
86
|
+
git fetch upstream
|
87
|
+
git rebase upstream/dev
|
88
|
+
git push origin my-feature-branch -f
|
89
|
+
```
|
90
|
+
|
91
|
+
## Be Patient
|
92
|
+
|
93
|
+
It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang in there!
|
94
|
+
|
95
|
+
## Thank You
|
96
|
+
|
97
97
|
Please do know that we really appreciate and value your time and work. We love you, really.
|
package/CoCreate.config.js
CHANGED
@@ -1,27 +1,27 @@
|
|
1
|
-
module.exports = {
|
2
|
-
"config": {
|
3
|
-
"organization_id": "5ff747727005da1c272740ab",
|
4
|
-
"key": "2061acef-0451-4545-f754-60cf8160",
|
5
|
-
"host": "general.cocreate.app"
|
6
|
-
},
|
7
|
-
"sources": [
|
8
|
-
{
|
9
|
-
"collection": "files",
|
10
|
-
"document": {
|
11
|
-
"_id": "60209cdc3c260207bf49cacc",
|
12
|
-
"name": "index.html",
|
13
|
-
"path": "/docs/text/index.html",
|
14
|
-
"src": "{{./docs/index.html}}",
|
15
|
-
"hosts": [
|
16
|
-
"*",
|
17
|
-
"general.cocreate.app"
|
18
|
-
],
|
19
|
-
"directory": "/docs/text",
|
20
|
-
"parentDirectory": "{{parentDirectory}}",
|
21
|
-
"content-type": "{{content-type}}",
|
22
|
-
"public": "true",
|
23
|
-
"website_id": "644d4bff8036fb9d1d1fd69c"
|
24
|
-
}
|
25
|
-
}
|
26
|
-
]
|
1
|
+
module.exports = {
|
2
|
+
"config": {
|
3
|
+
"organization_id": "5ff747727005da1c272740ab",
|
4
|
+
"key": "2061acef-0451-4545-f754-60cf8160",
|
5
|
+
"host": "general.cocreate.app"
|
6
|
+
},
|
7
|
+
"sources": [
|
8
|
+
{
|
9
|
+
"collection": "files",
|
10
|
+
"document": {
|
11
|
+
"_id": "60209cdc3c260207bf49cacc",
|
12
|
+
"name": "index.html",
|
13
|
+
"path": "/docs/text/index.html",
|
14
|
+
"src": "{{./docs/index.html}}",
|
15
|
+
"hosts": [
|
16
|
+
"*",
|
17
|
+
"general.cocreate.app"
|
18
|
+
],
|
19
|
+
"directory": "/docs/text",
|
20
|
+
"parentDirectory": "{{parentDirectory}}",
|
21
|
+
"content-type": "{{content-type}}",
|
22
|
+
"public": "true",
|
23
|
+
"website_id": "644d4bff8036fb9d1d1fd69c"
|
24
|
+
}
|
25
|
+
}
|
26
|
+
]
|
27
27
|
}
|