@cocreate/text 1.20.10 → 1.20.12
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/CHANGELOG.md +15 -0
- package/demo/custom-rich-text.html +272 -147
- package/demo/demos.1.html +19 -20
- package/demo/demos.html +32 -32
- package/demo/index.html +68 -30
- package/docs/index.html +237 -66
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
@@ -1,3 +1,18 @@
|
|
1
|
+
## [1.20.12](https://github.com/CoCreate-app/CoCreate-text/compare/v1.20.11...v1.20.12) (2023-06-02)
|
2
|
+
|
3
|
+
|
4
|
+
### Bug Fixes
|
5
|
+
|
6
|
+
* format demo html ([2c0b945](https://github.com/CoCreate-app/CoCreate-text/commit/2c0b9458e322a1d85dd3990635cf453a6e428e3c))
|
7
|
+
* Update dependencies versions for [@cocreate](https://github.com/cocreate) libraries ([fcc0161](https://github.com/CoCreate-app/CoCreate-text/commit/fcc0161c5ef30b22cc2eb8a9103b4654ccec0ef4))
|
8
|
+
|
9
|
+
## [1.20.11](https://github.com/CoCreate-app/CoCreate-text/compare/v1.20.10...v1.20.11) (2023-05-21)
|
10
|
+
|
11
|
+
|
12
|
+
### Bug Fixes
|
13
|
+
|
14
|
+
* Update dependencies versions for [@cocreate](https://github.com/cocreate) libraries ([6feb00b](https://github.com/CoCreate-app/CoCreate-text/commit/6feb00bf8f1f63c99822483f635218b41bad1604))
|
15
|
+
|
1
16
|
## [1.20.10](https://github.com/CoCreate-app/CoCreate-text/compare/v1.20.9...v1.20.10) (2023-05-19)
|
2
17
|
|
3
18
|
|
@@ -1,152 +1,277 @@
|
|
1
|
-
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>Rich Text Editor</title>
|
5
|
-
<script type="text/javascript">
|
6
|
-
var oDoc, sDefTxt;
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<title>Rich Text Editor</title>
|
5
|
+
<script type="text/javascript">
|
6
|
+
var oDoc, sDefTxt;
|
7
7
|
|
8
|
-
function initDoc() {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
function initDoc() {
|
9
|
+
oDoc = document.getElementById("textBox");
|
10
|
+
sDefTxt = oDoc.innerHTML;
|
11
|
+
if (document.compForm.switchMode.checked) {
|
12
|
+
setDocMode(true);
|
13
|
+
}
|
14
|
+
}
|
13
15
|
|
14
|
-
function formatDoc(sCmd, sValue) {
|
15
|
-
|
16
|
-
|
16
|
+
function formatDoc(sCmd, sValue) {
|
17
|
+
if (validateMode()) {
|
18
|
+
document.execCommand(sCmd, false, sValue);
|
19
|
+
oDoc.focus();
|
20
|
+
}
|
21
|
+
}
|
17
22
|
|
18
|
-
function validateMode() {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
23
|
+
function validateMode() {
|
24
|
+
if (!document.compForm.switchMode.checked) {
|
25
|
+
return true;
|
26
|
+
}
|
27
|
+
alert('Uncheck "Show HTML".');
|
28
|
+
oDoc.focus();
|
29
|
+
return false;
|
30
|
+
}
|
24
31
|
|
25
|
-
function setDocMode(bToSource) {
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
}
|
32
|
+
function setDocMode(bToSource) {
|
33
|
+
var oContent;
|
34
|
+
if (bToSource) {
|
35
|
+
oContent = document.createTextNode(oDoc.innerHTML);
|
36
|
+
oDoc.innerHTML = "";
|
37
|
+
var oPre = document.createElement("pre");
|
38
|
+
oDoc.contentEditable = false;
|
39
|
+
oPre.id = "sourceText";
|
40
|
+
oPre.contentEditable = true;
|
41
|
+
oPre.appendChild(oContent);
|
42
|
+
oDoc.appendChild(oPre);
|
43
|
+
document.execCommand(
|
44
|
+
"defaultParagraphSeparator",
|
45
|
+
false,
|
46
|
+
"div"
|
47
|
+
);
|
48
|
+
} else {
|
49
|
+
if (document.all) {
|
50
|
+
oDoc.innerHTML = oDoc.innerText;
|
51
|
+
} else {
|
52
|
+
oContent = document.createRange();
|
53
|
+
oContent.selectNodeContents(oDoc.firstChild);
|
54
|
+
oDoc.innerHTML = oContent.toString();
|
55
|
+
}
|
56
|
+
oDoc.contentEditable = true;
|
57
|
+
}
|
58
|
+
oDoc.focus();
|
59
|
+
}
|
49
60
|
|
50
|
-
function printDoc() {
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
.
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
}
|
75
|
-
#
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
<
|
96
|
-
|
97
|
-
<
|
98
|
-
<
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
<
|
104
|
-
<
|
105
|
-
<
|
106
|
-
|
107
|
-
<option
|
108
|
-
<option value="
|
109
|
-
<option value="
|
110
|
-
|
111
|
-
<
|
112
|
-
<option
|
113
|
-
<option value="
|
114
|
-
<option value="
|
115
|
-
<option value="
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
<option class="heading" selected>-
|
120
|
-
<option
|
121
|
-
<option
|
122
|
-
<option
|
123
|
-
</
|
124
|
-
</
|
125
|
-
<
|
126
|
-
|
127
|
-
<
|
128
|
-
<
|
129
|
-
<
|
130
|
-
<
|
131
|
-
<
|
132
|
-
<
|
133
|
-
<
|
134
|
-
<
|
135
|
-
|
136
|
-
<
|
137
|
-
|
138
|
-
<
|
139
|
-
<
|
140
|
-
<
|
141
|
-
<
|
142
|
-
<
|
143
|
-
|
144
|
-
<
|
145
|
-
|
146
|
-
|
147
|
-
<
|
148
|
-
<
|
149
|
-
<
|
150
|
-
</
|
151
|
-
</
|
152
|
-
|
61
|
+
function printDoc() {
|
62
|
+
if (!validateMode()) {
|
63
|
+
return;
|
64
|
+
}
|
65
|
+
var oPrntWin = window.open(
|
66
|
+
"",
|
67
|
+
"_blank",
|
68
|
+
"width=450,height=470,left=400,top=100,menubar=yes,toolbar=no,location=no,scrollbars=yes"
|
69
|
+
);
|
70
|
+
oPrntWin.document.open();
|
71
|
+
oPrntWin.document.write(`
|
72
|
+
<!doctype html><html><head><title>Print<\/title><\/head><body onload="print();">' +
|
73
|
+
oDoc.innerHTML +
|
74
|
+
"<\/body><\/html>"
|
75
|
+
`);
|
76
|
+
oPrntWin.document.close();
|
77
|
+
}
|
78
|
+
</script>
|
79
|
+
<style type="text/css">
|
80
|
+
.intLink {
|
81
|
+
cursor: pointer;
|
82
|
+
}
|
83
|
+
img.intLink {
|
84
|
+
border: 0;
|
85
|
+
}
|
86
|
+
#toolBar1 select {
|
87
|
+
font-size: 10px;
|
88
|
+
}
|
89
|
+
#textBox {
|
90
|
+
width: 540px;
|
91
|
+
height: 200px;
|
92
|
+
border: 1px #000000 solid;
|
93
|
+
padding: 12px;
|
94
|
+
overflow: scroll;
|
95
|
+
}
|
96
|
+
#textBox #sourceText {
|
97
|
+
padding: 0;
|
98
|
+
margin: 0;
|
99
|
+
min-width: 498px;
|
100
|
+
min-height: 200px;
|
101
|
+
}
|
102
|
+
#editMode label {
|
103
|
+
cursor: pointer;
|
104
|
+
}
|
105
|
+
</style>
|
106
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
107
|
+
</head>
|
108
|
+
<body onload="initDoc();">
|
109
|
+
<form
|
110
|
+
name="compForm"
|
111
|
+
method="post"
|
112
|
+
action="sample.php"
|
113
|
+
onsubmit="if (validateMode()){this.myDoc.value=oDoc.innerHTML;return true;}return false;">
|
114
|
+
<input type="hidden" name="myDoc" />
|
115
|
+
<div id="toolBar1">
|
116
|
+
<select
|
117
|
+
onchange="formatDoc('formatblock',this[this.selectedIndex].value);this.selectedIndex=0;">
|
118
|
+
<option selected>- formatting -</option>
|
119
|
+
<option value="h1">Title 1 <h1></option>
|
120
|
+
<option value="h2">Title 2 <h2></option>
|
121
|
+
<option value="h3">Title 3 <h3></option>
|
122
|
+
<option value="h4">Title 4 <h4></option>
|
123
|
+
<option value="h5">Title 5 <h5></option>
|
124
|
+
<option value="h6">Subtitle <h6></option>
|
125
|
+
<option value="p">Paragraph <p></option>
|
126
|
+
<option value="pre">Preformatted <pre></option>
|
127
|
+
</select>
|
128
|
+
<select
|
129
|
+
onchange="formatDoc('fontname',this[this.selectedIndex].value);this.selectedIndex=0;">
|
130
|
+
<option class="heading" selected>- font -</option>
|
131
|
+
<option>Arial</option>
|
132
|
+
<option>Arial Black</option>
|
133
|
+
<option>Courier New</option>
|
134
|
+
<option>Times New Roman</option>
|
135
|
+
</select>
|
136
|
+
<select
|
137
|
+
onchange="formatDoc('fontsize',this[this.selectedIndex].value);this.selectedIndex=0;">
|
138
|
+
<option class="heading" selected>- size -</option>
|
139
|
+
<option value="1">Very small</option>
|
140
|
+
<option value="2">A bit small</option>
|
141
|
+
<option value="3">Normal</option>
|
142
|
+
<option value="4">Medium-large</option>
|
143
|
+
<option value="5">Big</option>
|
144
|
+
<option value="6">Very big</option>
|
145
|
+
<option value="7">Maximum</option>
|
146
|
+
</select>
|
147
|
+
<select
|
148
|
+
onchange="formatDoc('forecolor',this[this.selectedIndex].value);this.selectedIndex=0;">
|
149
|
+
<option class="heading" selected>- color -</option>
|
150
|
+
<option value="red">Red</option>
|
151
|
+
<option value="blue">Blue</option>
|
152
|
+
<option value="green">Green</option>
|
153
|
+
<option value="black">Black</option>
|
154
|
+
</select>
|
155
|
+
<select
|
156
|
+
onchange="formatDoc('backcolor',this[this.selectedIndex].value);this.selectedIndex=0;">
|
157
|
+
<option class="heading" selected>- background -</option>
|
158
|
+
<option value="red">Red</option>
|
159
|
+
<option value="green">Green</option>
|
160
|
+
<option value="black">Black</option>
|
161
|
+
</select>
|
162
|
+
</div>
|
163
|
+
<div id="toolBar2">
|
164
|
+
<img
|
165
|
+
class="intLink"
|
166
|
+
title="Clean"
|
167
|
+
onclick="if (validateMode()&&confirm('Are you sure?')){oDoc.innerHTML=sDefTxt};"
|
168
|
+
src="data:image/gif;base64,R0lGODlhFgAWAIQbAD04KTRLYzFRjlldZl9vj1dusY14WYODhpWIbbSVFY6O7IOXw5qbms+wUbCztca0ccS4kdDQjdTLtMrL1O3YitHa7OPcsd/f4PfvrvDv8Pv5xv///////////////////yH5BAEKAB8ALAAAAAAWABYAAAV84CeOZGmeaKqubMteyzK547QoBcFWTm/jgsHq4rhMLoxFIehQQSAWR+Z4IAyaJ0kEgtFoLIzLwRE4oCQWrxoTOTAIhMCZ0tVgMBQKZHAYyFEWEV14eQ8IflhnEHmFDQkAiSkQCI2PDC4QBg+OAJc0ewadNCOgo6anqKkoIQA7" />
|
169
|
+
<img
|
170
|
+
class="intLink"
|
171
|
+
title="Print"
|
172
|
+
onclick="printDoc();"
|
173
|
+
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oEBxcZFmGboiwAAAAIdEVYdENvbW1lbnQA9syWvwAAAuFJREFUOMvtlUtsjFEUx//n3nn0YdpBh1abRpt4LFqtqkc3jRKkNEIsiIRIBBEhJJpKlIVo4m1RRMKKjQiRMJRUqUdKPT71qpIpiRKPaqdF55tv5vvusZjQTjOlseUkd3Xu/3dPzusC/22wtu2wRn+jG5So/OCDh8ycMJDflehMlkJkVK7KUYN+ufzA/RttH76zaVocDptRxzQtNi3mRWuPc+6cKtlXZ/sddP2uu9uXlmYXZ6Qm8v4Tz8lhF1H+zDQXt7S8oLMXtbF4e8QaFHjj3kbP2MzkktHpiTjp9VH6iHiA+whtAsX5brpwueMGdONdf/2A4M7ukDs1JW662+XkqTkeUoqjKtOjm2h53YFL15pSJ04Zc94wdtibr26fXlC2mzRvBccEbz2kiRFD414tKMlEZbVGT33+qCoHgha81SWYsew0r1uzfNylmtpx80pngQQ91LwVk2JGvGnfvZG6YcYRAT16GFtW5kKKfo1EQLtfh5Q2etT0BIWF+aitq4fDbk+ImYo1OxvGF03waFJQvBCkvDffRyEtxQiFFYgAZTHS0zwAGD7fG5TNnYNTp8/FzvGwJOfmgG7GOx0SAKKgQgDMgKBI0NJGMEImpGDk5+WACEwEd0ywblhGUZ4Hw5OdUekRBLT7DTgdEgxACsIznx8zpmWh7k4rkpJcuHDxCul6MDsmmBXDlWCH2+XozSgBnzsNCEE4euYV4pwCpsWYPW0UHDYBKSWu1NYjENDReqtKjwn2+zvtTc1vMSTB/mvev/WEYSlASsLimcOhOBJxw+N3aP/SjefNL5GePZmpu4kG7OPr1+tOfPyUu3BecWYKcwQcDFmwFKAUo90fhKDInBCAmvqnyMgqUEagQwCoHBDc1rjv9pIlD8IbVkz6qYViIBQGTJPx4k0XpIgEZoRN1Da0cij4VfR0ta3WvBXH/rjdCufv6R2zPgPH/e4pxSBCpeatqPrjNiso203/5s/zA171Mv8+w1LOAAAAAElFTkSuQmCC" />
|
174
|
+
<img
|
175
|
+
class="intLink"
|
176
|
+
title="Undo"
|
177
|
+
onclick="formatDoc('undo');"
|
178
|
+
src="data:image/gif;base64,R0lGODlhFgAWAOMKADljwliE33mOrpGjuYKl8aezxqPD+7/I19DV3NHa7P///////////////////////yH5BAEKAA8ALAAAAAAWABYAAARR8MlJq7046807TkaYeJJBnES4EeUJvIGapWYAC0CsocQ7SDlWJkAkCA6ToMYWIARGQF3mRQVIEjkkSVLIbSfEwhdRIH4fh/DZMICe3/C4nBQBADs=" />
|
179
|
+
<img
|
180
|
+
class="intLink"
|
181
|
+
title="Redo"
|
182
|
+
onclick="formatDoc('redo');"
|
183
|
+
src="data:image/gif;base64,R0lGODlhFgAWAMIHAB1ChDljwl9vj1iE34Kl8aPD+7/I1////yH5BAEKAAcALAAAAAAWABYAAANKeLrc/jDKSesyphi7SiEgsVXZEATDICqBVJjpqWZt9NaEDNbQK1wCQsxlYnxMAImhyDoFAElJasRRvAZVRqqQXUy7Cgx4TC6bswkAOw==" />
|
184
|
+
<img
|
185
|
+
class="intLink"
|
186
|
+
title="Remove formatting"
|
187
|
+
onclick="formatDoc('removeFormat')"
|
188
|
+
src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAABGdBTUEAALGPC/xhBQAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAAd0SU1FB9oECQMCKPI8CIIAAAAIdEVYdENvbW1lbnQA9syWvwAAAuhJREFUOMtjYBgFxAB501ZWBvVaL2nHnlmk6mXCJbF69zU+Hz/9fB5O1lx+bg45qhl8/fYr5it3XrP/YWTUvvvk3VeqGXz70TvbJy8+Wv39+2/Hz19/mGwjZzuTYjALuoBv9jImaXHeyD3H7kU8fPj2ICML8z92dlbtMzdeiG3fco7J08foH1kurkm3E9iw54YvKwuTuom+LPt/BgbWf3//sf37/1/c02cCG1lB8f//f95DZx74MTMzshhoSm6szrQ/a6Ir/Z2RkfEjBxuLYFpDiDi6Af///2ckaHBp7+7wmavP5n76+P2ClrLIYl8H9W36auJCbCxM4szMTJac7Kza////R3H1w2cfWAgafPbqs5g7D95++/P1B4+ECK8tAwMDw/1H7159+/7r7ZcvPz4fOHbzEwMDwx8GBgaGnNatfHZx8zqrJ+4VJBh5CQEGOySEua/v3n7hXmqI8WUGBgYGL3vVG7fuPK3i5GD9/fja7ZsMDAzMG/Ze52mZeSj4yu1XEq/ff7W5dvfVAS1lsXc4Db7z8C3r8p7Qjf///2dnZGxlqJuyr3rPqQd/Hhyu7oSpYWScylDQsd3kzvnH738wMDzj5GBN1VIWW4c3KDon7VOvm7S3paB9u5qsU5/x5KUnlY+eexQbkLNsErK61+++VnAJcfkyMTIwffj0QwZbJDKjcETs1Y8evyd48toz8y/ffzv//vPP4veffxpX77z6l5JewHPu8MqTDAwMDLzyrjb/mZm0JcT5Lj+89+Ybm6zz95oMh7s4XbygN3Sluq4Mj5K8iKMgP4f0////fv77//8nLy+7MCcXmyYDAwODS9jM9tcvPypd35pne3ljdjvj26+H2dhYpuENikgfvQeXNmSl3tqepxXsqhXPyc666s+fv1fMdKR3TK72zpix8nTc7bdfhfkEeVbC9KhbK/9iYWHiErbu6MWbY/7//8/4//9/pgOnH6jGVazvFDRtq2VgiBIZrUTIBgCk+ivHvuEKwAAAAABJRU5ErkJggg==" />
|
189
|
+
<img
|
190
|
+
class="intLink"
|
191
|
+
title="Bold"
|
192
|
+
onclick="formatDoc('bold');"
|
193
|
+
src="data:image/gif;base64,R0lGODlhFgAWAID/AMDAwAAAACH5BAEAAAAALAAAAAAWABYAQAInhI+pa+H9mJy0LhdgtrxzDG5WGFVk6aXqyk6Y9kXvKKNuLbb6zgMFADs=" />
|
194
|
+
<img
|
195
|
+
class="intLink"
|
196
|
+
title="Italic"
|
197
|
+
onclick="formatDoc('italic');"
|
198
|
+
src="data:image/gif;base64,R0lGODlhFgAWAKEDAAAAAF9vj5WIbf///yH5BAEAAAMALAAAAAAWABYAAAIjnI+py+0Po5x0gXvruEKHrF2BB1YiCWgbMFIYpsbyTNd2UwAAOw==" />
|
199
|
+
<img
|
200
|
+
class="intLink"
|
201
|
+
title="Underline"
|
202
|
+
onclick="formatDoc('underline');"
|
203
|
+
src="data:image/gif;base64,R0lGODlhFgAWAKECAAAAAF9vj////////yH5BAEAAAIALAAAAAAWABYAAAIrlI+py+0Po5zUgAsEzvEeL4Ea15EiJJ5PSqJmuwKBEKgxVuXWtun+DwxCCgA7" />
|
204
|
+
<img
|
205
|
+
class="intLink"
|
206
|
+
title="Left align"
|
207
|
+
onclick="formatDoc('justifyleft');"
|
208
|
+
src="data:image/gif;base64,R0lGODlhFgAWAID/AMDAwAAAACH5BAEAAAAALAAAAAAWABYAQAIghI+py+0Po5y02ouz3jL4D4JMGELkGYxo+qzl4nKyXAAAOw==" />
|
209
|
+
<img
|
210
|
+
class="intLink"
|
211
|
+
title="Center align"
|
212
|
+
onclick="formatDoc('justifycenter');"
|
213
|
+
src="data:image/gif;base64,R0lGODlhFgAWAID/AMDAwAAAACH5BAEAAAAALAAAAAAWABYAQAIfhI+py+0Po5y02ouz3jL4D4JOGI7kaZ5Bqn4sycVbAQA7" />
|
214
|
+
<img
|
215
|
+
class="intLink"
|
216
|
+
title="Right align"
|
217
|
+
onclick="formatDoc('justifyright');"
|
218
|
+
src="data:image/gif;base64,R0lGODlhFgAWAID/AMDAwAAAACH5BAEAAAAALAAAAAAWABYAQAIghI+py+0Po5y02ouz3jL4D4JQGDLkGYxouqzl43JyVgAAOw==" />
|
219
|
+
<img
|
220
|
+
class="intLink"
|
221
|
+
title="Numbered list"
|
222
|
+
onclick="formatDoc('insertorderedlist');"
|
223
|
+
src="data:image/gif;base64,R0lGODlhFgAWAMIGAAAAADljwliE35GjuaezxtHa7P///////yH5BAEAAAcALAAAAAAWABYAAAM2eLrc/jDKSespwjoRFvggCBUBoTFBeq6QIAysQnRHaEOzyaZ07Lu9lUBnC0UGQU1K52s6n5oEADs=" />
|
224
|
+
<img
|
225
|
+
class="intLink"
|
226
|
+
title="Dotted list"
|
227
|
+
onclick="formatDoc('insertunorderedlist');"
|
228
|
+
src="data:image/gif;base64,R0lGODlhFgAWAMIGAAAAAB1ChF9vj1iE33mOrqezxv///////yH5BAEAAAcALAAAAAAWABYAAAMyeLrc/jDKSesppNhGRlBAKIZRERBbqm6YtnbfMY7lud64UwiuKnigGQliQuWOyKQykgAAOw==" />
|
229
|
+
<img
|
230
|
+
class="intLink"
|
231
|
+
title="Quote"
|
232
|
+
onclick="formatDoc('formatblock','blockquote');"
|
233
|
+
src="data:image/gif;base64,R0lGODlhFgAWAIQXAC1NqjFRjkBgmT9nqUJnsk9xrFJ7u2R9qmKBt1iGzHmOrm6Sz4OXw3Odz4Cl2ZSnw6KxyqO306K63bG70bTB0rDI3bvI4P///////////////////////////////////yH5BAEKAB8ALAAAAAAWABYAAAVP4CeOZGmeaKqubEs2CekkErvEI1zZuOgYFlakECEZFi0GgTGKEBATFmJAVXweVOoKEQgABB9IQDCmrLpjETrQQlhHjINrTq/b7/i8fp8PAQA7" />
|
234
|
+
<img
|
235
|
+
class="intLink"
|
236
|
+
title="Delete indentation"
|
237
|
+
onclick="formatDoc('outdent');"
|
238
|
+
src="data:image/gif;base64,R0lGODlhFgAWAMIHAAAAADljwliE35GjuaezxtDV3NHa7P///yH5BAEAAAcALAAAAAAWABYAAAM2eLrc/jDKCQG9F2i7u8agQgyK1z2EIBil+TWqEMxhMczsYVJ3e4ahk+sFnAgtxSQDqWw6n5cEADs=" />
|
239
|
+
<img
|
240
|
+
class="intLink"
|
241
|
+
title="Add indentation"
|
242
|
+
onclick="formatDoc('indent');"
|
243
|
+
src="data:image/gif;base64,R0lGODlhFgAWAOMIAAAAADljwl9vj1iE35GjuaezxtDV3NHa7P///////////////////////////////yH5BAEAAAgALAAAAAAWABYAAAQ7EMlJq704650B/x8gemMpgugwHJNZXodKsO5oqUOgo5KhBwWESyMQsCRDHu9VOyk5TM9zSpFSr9gsJwIAOw==" />
|
244
|
+
<img
|
245
|
+
class="intLink"
|
246
|
+
title="Hyperlink"
|
247
|
+
onclick="var sLnk=prompt('Write the URL here','http:\/\/');if (sLnk&&sLnk!=''&&sLnk!='http://'){formatDoc('createlink',sLnk)}"
|
248
|
+
src="data:image/gif;base64,R0lGODlhFgAWAOMKAB1ChDRLY19vj3mOrpGjuaezxrCztb/I19Ha7Pv8/f///////////////////////yH5BAEKAA8ALAAAAAAWABYAAARY8MlJq7046827/2BYIQVhHg9pEgVGIklyDEUBy/RlE4FQF4dCj2AQXAiJQDCWQCAEBwIioEMQBgSAFhDAGghGi9XgHAhMNoSZgJkJei33UESv2+/4vD4TAQA7" />
|
249
|
+
<img
|
250
|
+
class="intLink"
|
251
|
+
title="Cut"
|
252
|
+
onclick="formatDoc('cut');"
|
253
|
+
src="data:image/gif;base64,R0lGODlhFgAWAIQSAB1ChBFNsRJTySJYwjljwkxwl19vj1dusYODhl6MnHmOrpqbmpGjuaezxrCztcDCxL/I18rL1P///////////////////////////////////////////////////////yH5BAEAAB8ALAAAAAAWABYAAAVu4CeOZGmeaKqubDs6TNnEbGNApNG0kbGMi5trwcA9GArXh+FAfBAw5UexUDAQESkRsfhJPwaH4YsEGAAJGisRGAQY7UCC9ZAXBB+74LGCRxIEHwAHdWooDgGJcwpxDisQBQRjIgkDCVlfmZqbmiEAOw==" />
|
254
|
+
<img
|
255
|
+
class="intLink"
|
256
|
+
title="Copy"
|
257
|
+
onclick="formatDoc('copy');"
|
258
|
+
src="data:image/gif;base64,R0lGODlhFgAWAIQcAB1ChBFNsTRLYyJYwjljwl9vj1iE31iGzF6MnHWX9HOdz5GjuYCl2YKl8ZOt4qezxqK63aK/9KPD+7DI3b/I17LM/MrL1MLY9NHa7OPs++bx/Pv8/f///////////////yH5BAEAAB8ALAAAAAAWABYAAAWG4CeOZGmeaKqubOum1SQ/kPVOW749BeVSus2CgrCxHptLBbOQxCSNCCaF1GUqwQbBd0JGJAyGJJiobE+LnCaDcXAaEoxhQACgNw0FQx9kP+wmaRgYFBQNeAoGihCAJQsCkJAKOhgXEw8BLQYciooHf5o7EA+kC40qBKkAAAGrpy+wsbKzIiEAOw==" />
|
259
|
+
<img
|
260
|
+
class="intLink"
|
261
|
+
title="Paste"
|
262
|
+
onclick="formatDoc('paste');"
|
263
|
+
src="data:image/gif;base64,R0lGODlhFgAWAIQUAD04KTRLY2tXQF9vj414WZWIbXmOrpqbmpGjudClFaezxsa0cb/I1+3YitHa7PrkIPHvbuPs+/fvrvv8/f///////////////////////////////////////////////yH5BAEAAB8ALAAAAAAWABYAAAWN4CeOZGmeaKqubGsusPvBSyFJjVDs6nJLB0khR4AkBCmfsCGBQAoCwjF5gwquVykSFbwZE+AwIBV0GhFog2EwIDchjwRiQo9E2Fx4XD5R+B0DDAEnBXBhBhN2DgwDAQFjJYVhCQYRfgoIDGiQJAWTCQMRiwwMfgicnVcAAAMOaK+bLAOrtLUyt7i5uiUhADs=" />
|
264
|
+
</div>
|
265
|
+
<div id="textBox" contenteditable="true"><p>Lorem ipsum</p></div>
|
266
|
+
<p id="editMode">
|
267
|
+
<input
|
268
|
+
type="checkbox"
|
269
|
+
name="switchMode"
|
270
|
+
id="switchBox"
|
271
|
+
onchange="setDocMode(this.checked);" />
|
272
|
+
<label for="switchBox">Show HTML</label>
|
273
|
+
</p>
|
274
|
+
<p><input type="submit" value="Send" /></p>
|
275
|
+
</form>
|
276
|
+
</body>
|
277
|
+
</html>
|
package/demo/demos.1.html
CHANGED
@@ -1,25 +1,24 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
<title>Text | CoCreate</title>
|
8
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
9
|
+
</head>
|
3
10
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
<form collection="apples1" document_id="">
|
14
|
-
<textarea name="name1" class="width:100% padding:0px margin:0px" rows="10"></textarea>
|
15
|
-
<textarea name="name2" class="width:100%" rows="10"></textarea>
|
16
|
-
<iframe name='name2' width="100%" contenteditable></iframe>
|
17
|
-
|
18
|
-
</form>
|
19
|
-
|
20
|
-
<!--<script src="../dist/CoCreate-text.js" ></script>-->
|
21
|
-
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
|
22
|
-
|
23
|
-
</body>
|
11
|
+
<body class="padding:20px">
|
12
|
+
<form collection="apples1" document_id="">
|
13
|
+
<textarea
|
14
|
+
name="name1"
|
15
|
+
class="width:100% padding:0px margin:0px"
|
16
|
+
rows="10"></textarea>
|
17
|
+
<textarea name="name2" class="width:100%" rows="10"></textarea>
|
18
|
+
<iframe name="name2" width="100%" contenteditable></iframe>
|
19
|
+
</form>
|
24
20
|
|
21
|
+
<!--<script src="../dist/CoCreate-text.js" ></script>-->
|
22
|
+
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
|
23
|
+
</body>
|
25
24
|
</html>
|
package/demo/demos.html
CHANGED
@@ -1,38 +1,38 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
<title>Text | CoCreate</title>
|
8
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
9
|
+
</head>
|
3
10
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
+
<body class="padding:20px">
|
12
|
+
<form collection="test" document_id="62a3f5d5e6dfc91d581cdd2d">
|
13
|
+
<input type="email" name="email" />
|
14
|
+
<input type="tel" name="tel" />
|
15
|
+
<input type="url" name="url" />
|
16
|
+
<h1 name="name" collection="test"></h1>
|
17
|
+
<!-- <textarea name="name2"></textarea> -->
|
18
|
+
<!--<h1 name='name' contenteditable>I will be replaced by crdt</h1>-->
|
19
|
+
<!-- <div name='name2' contenteditable>I will be replaced by crud</div> -->
|
11
20
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
<div class="padding:20px">
|
26
|
-
CoCreateCrdt.getText({collection: "apples1", document_id: "60bea334b25613e8da1b4bdf", name: "src"});
|
27
|
-
</div>
|
28
|
-
<div class="padding:20px">
|
29
|
-
CoCreate.crdt.getText({collection: "apples1", document_id: "5fe9e0a11b4a703e71c51ba8", name: "name"});
|
30
|
-
</div>
|
31
|
-
</form>
|
32
|
-
|
33
|
-
<!--<script src="../dist/CoCreate-text.js" ></script>-->
|
34
|
-
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
|
35
|
-
|
36
|
-
</body>
|
21
|
+
<div class="padding:20px">
|
22
|
+
CoCreateCrdt.init({collection: "apples1", document_id:
|
23
|
+
"60bea334b25613e8da1b4bdf", name: "src"});
|
24
|
+
</div>
|
25
|
+
<div class="padding:20px">
|
26
|
+
CoCreateCrdt.getText({collection: "apples1", document_id:
|
27
|
+
"60bea334b25613e8da1b4bdf", name: "src"});
|
28
|
+
</div>
|
29
|
+
<div class="padding:20px">
|
30
|
+
CoCreate.crdt.getText({collection: "apples1", document_id:
|
31
|
+
"5fe9e0a11b4a703e71c51ba8", name: "name"});
|
32
|
+
</div>
|
33
|
+
</form>
|
37
34
|
|
35
|
+
<!--<script src="../dist/CoCreate-text.js" ></script>-->
|
36
|
+
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
|
37
|
+
</body>
|
38
38
|
</html>
|
package/demo/index.html
CHANGED
@@ -1,36 +1,74 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
<link
|
8
|
+
rel="icon"
|
9
|
+
href="https://cdn.cocreate.app/favicon.ico"
|
10
|
+
type="image/ico"
|
11
|
+
sizes="16x16" />
|
12
|
+
<title>Text | CoCreate</title>
|
3
13
|
|
4
|
-
|
5
|
-
|
6
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
8
|
-
<link rel="icon" href="https://cdn.cocreate.app/favicon.ico" type="image/ico" sizes="16x16">
|
9
|
-
<title>Text | CoCreate</title>
|
14
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
15
|
+
</head>
|
10
16
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
17
|
+
<body>
|
18
|
+
<div class="padding:20px">
|
19
|
+
<!--<input collection="modules" realtime="true" document_id="5e6d06ab430580425dd9e950" name="inputText" style="width: 500px; display: block">-->
|
20
|
+
<!--<textarea collection="modules" realtime="true" document_id="5e6d06ab430580425dd9e950" name="nameOtro" id="textare_test" rows="10" style="width: 500px; display: block" ></textarea>-->
|
21
|
+
<!--<textarea collection="modules" realtime="true" document_id="5e6d06ab430580425dd9e950" name="nameOtro2" id="textare_test" rows="10" style="width: 500px; display: block" ></textarea>-->
|
22
|
+
<form
|
23
|
+
realtime="true"
|
24
|
+
collection="module_activities"
|
25
|
+
class="margin-bottom:75px"
|
26
|
+
id="form">
|
27
|
+
<input
|
28
|
+
type="number"
|
29
|
+
collection="module_activities"
|
30
|
+
realtime="true"
|
31
|
+
document_id="5ef50326e0219c2a488dc6bc"
|
32
|
+
name="inputText"
|
33
|
+
style="width: 100%; display: block" />
|
34
|
+
<input
|
35
|
+
type="date"
|
36
|
+
collection="module_activities"
|
37
|
+
realtime="true"
|
38
|
+
document_id="5ef50326e0219c2a488dc6bc"
|
39
|
+
name="inputdate"
|
40
|
+
style="width: 100%; display: block" />
|
41
|
+
<textarea
|
42
|
+
realtime="true"
|
43
|
+
collection="module_activities"
|
44
|
+
document_id="5ef50326e0219c2a488dc6bc"
|
45
|
+
name="nameOtro"
|
46
|
+
rows="10"
|
47
|
+
class="floating-label"></textarea>
|
48
|
+
<textarea
|
49
|
+
realtime="true"
|
50
|
+
collection="module_activities"
|
51
|
+
document_id="5ef50326e0219c2a488dc6bc"
|
52
|
+
name="html"
|
53
|
+
rows="10"
|
54
|
+
class="floating-label"></textarea>
|
55
|
+
<textarea
|
56
|
+
collection="module_activities"
|
57
|
+
realtime="true"
|
58
|
+
document_id=""
|
59
|
+
name="nameOtro123"
|
60
|
+
rows="10"
|
61
|
+
style="width: 100%; display: block"></textarea>
|
62
|
+
<input
|
63
|
+
collection="modules"
|
64
|
+
realtime="true"
|
65
|
+
document_id="5ef50326e0219c2a488dc6bc"
|
66
|
+
name="text"
|
67
|
+
style="width: 500px; display: block" />
|
68
|
+
</form>
|
69
|
+
</div>
|
35
70
|
|
71
|
+
<!--<script src="../dist/CoCreate-text.js"></script>-->
|
72
|
+
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
|
73
|
+
</body>
|
36
74
|
</html>
|
package/docs/index.html
CHANGED
@@ -1,51 +1,137 @@
|
|
1
1
|
<!DOCTYPE html>
|
2
2
|
<html lang="en">
|
3
3
|
<head>
|
4
|
-
<meta charset="utf-8"
|
5
|
-
<meta http-equiv="X-UA-Compatible" content="IE=edge"
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1"
|
7
|
-
<title>CoCreate-text Documentation | CoCreateJS
|
8
|
-
<link
|
9
|
-
|
10
|
-
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
7
|
+
<title>CoCreate-text Documentation | CoCreateJS</title>
|
8
|
+
<link
|
9
|
+
rel="icon"
|
10
|
+
type="image/png"
|
11
|
+
sizes="32x32"
|
12
|
+
href="https://cocreate.app/images/favicon.ico" />
|
13
|
+
<meta
|
14
|
+
name="description"
|
15
|
+
content="A simple HTML5 and pure javascript component. Easy configuration using HTML5 attributes or Javscript api and highly styleable." />
|
16
|
+
<meta
|
17
|
+
name="keywords"
|
18
|
+
content="helper classes, utility classes, css framework, css library, inline style classes" />
|
11
19
|
<meta name="robots" content="index,follow" />
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
20
|
+
<meta
|
21
|
+
property="og:image"
|
22
|
+
content="https://cdn.cocreate.app/docs/boilerplate.png" />
|
23
|
+
<link
|
24
|
+
rel="stylesheet"
|
25
|
+
href="/docs/index.css"
|
26
|
+
collection="files"
|
27
|
+
document_id="60888216117c640e7596303f"
|
28
|
+
name="src"
|
29
|
+
type="text/css"
|
30
|
+
save="true" />
|
31
|
+
<link rel="manifest" href="/manifest.webmanifest" />
|
32
|
+
</head>
|
16
33
|
|
17
34
|
<body>
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
35
|
+
<nav
|
36
|
+
class="nav display:flex align-items:center left:0px background:whitesmoke padding-top:10px padding-bottom:10px"
|
37
|
+
content_id="content"
|
38
|
+
scroll="sticky-nav,hide-nav"
|
39
|
+
scroll-up="10"
|
40
|
+
scroll-down="10"
|
41
|
+
collection="files"
|
42
|
+
document_id="60395ef42b3ac232657040fd"
|
43
|
+
name="src"></nav>
|
44
|
+
<sidenav
|
45
|
+
id="menuL"
|
46
|
+
class="position:fixed top:0px left:0px overflow:hidden background:whitesmoke height:100vh width:0px width:300px@xl"
|
47
|
+
resizable
|
48
|
+
resize-target="[content_id='content']"
|
49
|
+
resize-property="margin-left"
|
50
|
+
resize-value="width">
|
51
|
+
<menu
|
52
|
+
collection="files"
|
53
|
+
document_id="603717b07de7fb350ae9fec8"
|
54
|
+
name="src"></menu>
|
55
|
+
<div resize="right"></div>
|
56
|
+
</sidenav>
|
57
|
+
<main
|
58
|
+
class="padding-top:15px padding:15px@lg@xl"
|
59
|
+
content_id="content"
|
60
|
+
id="cocreate-text">
|
61
|
+
<div
|
62
|
+
class="display:flex flex-wrap:wrap justify-content:space-between">
|
26
63
|
<div class="display:flex align-items:center">
|
27
64
|
<h2>CoCreate-text</h2>
|
28
65
|
</div>
|
29
|
-
<div
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
<a
|
66
|
+
<div
|
67
|
+
class="display:flex align-items:center font-size:20px"
|
68
|
+
share-height="600"
|
69
|
+
share-width="500"
|
70
|
+
share-media="https://via.placeholder.com/300/09f/fff.png">
|
71
|
+
<a
|
72
|
+
href="https://github.com/CoCreate-app/CoCreate-text"
|
73
|
+
target="_blank"
|
74
|
+
class="margin-right:15px"
|
75
|
+
><i
|
76
|
+
class="height:20px fill:#505050"
|
77
|
+
src="/assets/svg/github.svg"></i
|
78
|
+
></a>
|
79
|
+
<a
|
80
|
+
class="margin-right:15px share"
|
81
|
+
share-network="twitter"
|
82
|
+
title="Share on twitter"
|
83
|
+
><i
|
84
|
+
class="height:20px fill:#505050"
|
85
|
+
src="/assets/svg/twitter.svg"></i
|
86
|
+
></a>
|
87
|
+
<a
|
88
|
+
class="margin-right:15px share"
|
89
|
+
share-network="facebook"
|
90
|
+
title="Share on Facebook"
|
91
|
+
><i
|
92
|
+
class="height:20px fill:#505050"
|
93
|
+
src="/assets/svg/facebook.svg"></i
|
94
|
+
></a>
|
95
|
+
<a
|
96
|
+
class="margin-right:15px share"
|
97
|
+
share-network="instagram"
|
98
|
+
title="Share on instagram"
|
99
|
+
><i
|
100
|
+
class="height:20px fill:#505050"
|
101
|
+
src="/assets/svg/instagram.svg"></i
|
102
|
+
></a>
|
103
|
+
<a
|
104
|
+
class="margin-right:15px share"
|
105
|
+
share-network="share"
|
106
|
+
title="Share on share"
|
107
|
+
><i
|
108
|
+
class="height:20px fill:#505050"
|
109
|
+
src="/assets/svg/share-alt.svg"></i
|
110
|
+
></a>
|
35
111
|
</div>
|
36
112
|
</div>
|
37
|
-
<
|
113
|
+
<h1 class="max-width:500px margin:20px_0px">
|
114
|
+
A headless vinilla javascript micro component. Easy
|
115
|
+
configuration using HTML5 attributes or Javscript api.
|
116
|
+
</h1>
|
38
117
|
<div id="text-section" class="display:flex flex-wrap:wrap">
|
39
|
-
<div
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
118
|
+
<div
|
119
|
+
class="flex-grow:1 width:300px padding:0px_10px margin:20px_0px">
|
120
|
+
<h2
|
121
|
+
class="border-bottom:1px_solid_lightgrey padding:5px_0px">
|
122
|
+
Install
|
123
|
+
</h2>
|
124
|
+
<pre><code class="language-javascript">npm install cocreate-text</code></pre>
|
125
|
+
<p class="padding:10px_0px">Or you can use cdn link:</p>
|
126
|
+
<pre><code class="language-javascript">https://cdn.cocreate.app/CoCreate-text.min.js</code></pre>
|
44
127
|
|
45
|
-
|
128
|
+
<h2
|
129
|
+
class="border-bottom:1px_solid_lightgrey margin-top:80px padding:5px_0px">
|
130
|
+
Usage
|
131
|
+
</h2>
|
46
132
|
<div class="">
|
47
133
|
<p class="padding:10px_0px">This is text reference</p>
|
48
|
-
|
134
|
+
|
49
135
|
<div class="flex-grow:1 min-width:300px width:100%">
|
50
136
|
<pre>
|
51
137
|
<code><div></div></code>
|
@@ -54,52 +140,137 @@
|
|
54
140
|
<p class="padding:10px_0px">This is text reference</p>
|
55
141
|
<p class="padding:10px_0px">This is text reference</p>
|
56
142
|
</div>
|
57
|
-
<h2
|
58
|
-
|
59
|
-
|
60
|
-
|
143
|
+
<h2
|
144
|
+
class="border-bottom:1px_solid_lightgrey padding:5px_0px">
|
145
|
+
Attributes
|
146
|
+
</h2>
|
147
|
+
<ul class="list-style-type:none">
|
148
|
+
<li
|
149
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
150
|
+
<h4>
|
151
|
+
<span>text</span>
|
152
|
+
<span class="cocreate-badge success"
|
153
|
+
>string</span
|
154
|
+
>
|
155
|
+
<span class="cocreate-badge warning"
|
156
|
+
>optional</span
|
157
|
+
>
|
158
|
+
</h4>
|
61
159
|
<p>text-attribute</p>
|
62
160
|
</li>
|
63
|
-
<li
|
64
|
-
|
161
|
+
<li
|
162
|
+
class="padding:15px_0px border-bottom:1px_solid_lightgrey">
|
163
|
+
<h4>
|
164
|
+
<span>text</span>
|
165
|
+
<span class="cocreate-badge success"
|
166
|
+
>string</span
|
167
|
+
>
|
168
|
+
<span class="cocreate-badge warning"
|
169
|
+
>optional</span
|
170
|
+
>
|
171
|
+
</h4>
|
65
172
|
<p>text-attribute</p>
|
66
173
|
</li>
|
67
174
|
</ul>
|
68
175
|
</div>
|
69
|
-
|
70
|
-
<div
|
176
|
+
|
177
|
+
<div
|
178
|
+
class="flex-grow:1 width:300px padding:0px_10px margin:20px_0px border-bottom:1px_solid_lightgrey">
|
71
179
|
<!-- SandBox -->
|
72
|
-
<h2
|
73
|
-
|
180
|
+
<h2
|
181
|
+
class="border-bottom:1px_solid_lightgrey padding:5px_0px">
|
182
|
+
Demo
|
183
|
+
</h2>
|
184
|
+
<div
|
185
|
+
class="position:sticky top:0 padding:15px_0px height:100vh">
|
74
186
|
<!-- SandBox -->
|
75
|
-
<div
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
187
|
+
<div
|
188
|
+
class="display:flex flex-direction:column position:relative overflow:hidden card border-radius:2px width:auto height:600px margin-top:20px"
|
189
|
+
id="playground">
|
190
|
+
<div
|
191
|
+
id="demo-code"
|
192
|
+
resizable
|
193
|
+
class="position:relative height:50%">
|
194
|
+
<textarea
|
195
|
+
type="code"
|
196
|
+
lang="html"
|
197
|
+
collection="demos"
|
198
|
+
document_id=""
|
199
|
+
name="demo"
|
200
|
+
save="false"
|
201
|
+
id="demo"
|
202
|
+
input-target=".demopreview"
|
203
|
+
input-attribute="value"
|
204
|
+
input-events="input, onload"
|
205
|
+
class="height:100% width:100% outline:none border:none resize:none padding:5px"></textarea>
|
206
|
+
<div
|
207
|
+
resize="bottom"
|
208
|
+
class="background:lightgrey"></div>
|
80
209
|
</div>
|
81
|
-
|
82
|
-
<div
|
83
|
-
|
210
|
+
|
211
|
+
<div
|
212
|
+
id="demo-preview"
|
213
|
+
class="position:relative overflow:auto background-color:white">
|
214
|
+
<div class="demopreview padding:20px"></div>
|
84
215
|
</div>
|
85
|
-
|
86
|
-
<div
|
87
|
-
|
88
|
-
<a
|
89
|
-
|
90
|
-
|
91
|
-
|
216
|
+
|
217
|
+
<div
|
218
|
+
class="font-size:20px position:absolute top:10px right:10px opacity:0.6">
|
219
|
+
<a
|
220
|
+
class="margin-right:10px"
|
221
|
+
id="eye"
|
222
|
+
show="#eye-slash"
|
223
|
+
hide="#eye, #demo-preview"
|
224
|
+
toggle="code-height"
|
225
|
+
toggle-target="#demo-code"
|
226
|
+
><i
|
227
|
+
class="height:18px fill:#505050"
|
228
|
+
src="/assets/svg/eye.svg"></i
|
229
|
+
></a>
|
230
|
+
<a
|
231
|
+
class="margin-right:10px"
|
232
|
+
hidden
|
233
|
+
id="eye-slash"
|
234
|
+
show="#eye, #demo-preview"
|
235
|
+
hide="#eye-slash"
|
236
|
+
toggle="code-height"
|
237
|
+
toggle-target="#demo-code"
|
238
|
+
><i
|
239
|
+
class="height:20px fill:#505050"
|
240
|
+
src="/assets/svg/eye-slash.svg"></i
|
241
|
+
></a>
|
242
|
+
<a
|
243
|
+
class="margin-right:10px"
|
244
|
+
id="code"
|
245
|
+
show="#code-slash"
|
246
|
+
hide="#code, #demo-code"
|
247
|
+
><i
|
248
|
+
class="height:20px fill:#505050"
|
249
|
+
src="/assets/svg/code.svg"></i
|
250
|
+
></a>
|
251
|
+
<a
|
252
|
+
class="margin-right:10px"
|
253
|
+
hidden
|
254
|
+
id="code-slash"
|
255
|
+
show="#code, #demo-code"
|
256
|
+
hide="#code-slash"
|
257
|
+
><i
|
258
|
+
class="display:flex height:18px fill:#505050"
|
259
|
+
src="/assets/svg/code.svg"></i
|
260
|
+
></a>
|
261
|
+
<a
|
262
|
+
class="margin-right:5px"
|
263
|
+
fullscreen
|
264
|
+
fullscreen-target="#playground"></a>
|
92
265
|
</div>
|
93
|
-
|
94
266
|
</div>
|
95
267
|
<!-- End SandBox -->
|
96
|
-
|
268
|
+
</div>
|
97
269
|
</div>
|
98
|
-
|
99
|
-
</div>
|
270
|
+
</div>
|
100
271
|
</main>
|
101
|
-
|
102
|
-
|
103
|
-
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"
|
272
|
+
|
273
|
+
<script src="/apikey.js"></script>
|
274
|
+
<script src="https://cdn.cocreate.app/latest/CoCreate.min.js"></script>
|
104
275
|
</body>
|
105
|
-
</html>
|
276
|
+
</html>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cocreate/text",
|
3
|
-
"version": "1.20.
|
3
|
+
"version": "1.20.12",
|
4
4
|
"description": "A simple text component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.",
|
5
5
|
"keywords": [
|
6
6
|
"text",
|
@@ -59,15 +59,15 @@
|
|
59
59
|
"webpack-log": "^3.0.1"
|
60
60
|
},
|
61
61
|
"dependencies": {
|
62
|
-
"@cocreate/actions": "^1.8.
|
63
|
-
"@cocreate/crdt": "^1.18.
|
64
|
-
"@cocreate/crud-client": "^1.21.
|
65
|
-
"@cocreate/cursors": "^1.16.
|
66
|
-
"@cocreate/docs": "^1.7.
|
67
|
-
"@cocreate/hosting": "^1.10.
|
68
|
-
"@cocreate/observer": "^1.
|
69
|
-
"@cocreate/selection": "^1.6.
|
70
|
-
"@cocreate/utils": "^1.20.
|
71
|
-
"@cocreate/uuid": "^1.4.
|
62
|
+
"@cocreate/actions": "^1.8.12",
|
63
|
+
"@cocreate/crdt": "^1.18.11",
|
64
|
+
"@cocreate/crud-client": "^1.21.5",
|
65
|
+
"@cocreate/cursors": "^1.16.11",
|
66
|
+
"@cocreate/docs": "^1.7.13",
|
67
|
+
"@cocreate/hosting": "^1.10.5",
|
68
|
+
"@cocreate/observer": "^1.8.0",
|
69
|
+
"@cocreate/selection": "^1.6.10",
|
70
|
+
"@cocreate/utils": "^1.20.10",
|
71
|
+
"@cocreate/uuid": "^1.4.11"
|
72
72
|
}
|
73
73
|
}
|