41
41
< h1 > Jodit Test Document</ h1 >
42
42
< form id ="form ">
43
43
< div id ="app "> </ div >
44
- < textarea id ="editorNative "> </ textarea >
44
+ < textarea id ="editorNative ">
45
+ Hello < a href ="https://xdsoft.net/jodit "> Jodit</ a > World!
46
+ </ textarea >
45
47
</ form >
46
48
</ div >
47
49
< script >
@@ -51,10 +53,59 @@ <h1>Jodit Test Document</h1>
51
53
// root.innerHTML = '<link rel="stylesheet" href="./build/es2021/jodit.fat.min.css"/><div id="edit"></div>';
52
54
// const editor = Jodit.make('root.getElementById('edit')', {
53
55
const editor = Jodit . make ( '#editorNative' , {
54
- toolbarInlineForSelection : true ,
55
- commandToHotkeys : {
56
- someCustomCommand : 'shift+space'
56
+ // readonly: true,
57
+ showXPathInStatusbar : false ,
58
+ placeholder : "Start typing..." ,
59
+ toolbar : true ,
60
+ askBeforePasteHTML : false ,
61
+ cleanHTML : {
62
+ pastedHTML : true ,
57
63
} ,
64
+ buttons : [
65
+ "fullsize" ,
66
+ ] ,
67
+ style : {
68
+ fontSize : "16px" ,
69
+ lineHeight : "1.5" ,
70
+ padding : "10px" ,
71
+ // minheight: "65vh",
72
+ maxheight : "65vh" ,
73
+ } ,
74
+ // iframe: true,
75
+ iframeCSS : `
76
+ body {
77
+ margin: 0;
78
+ padding: 0;
79
+ font-size: 16px;
80
+ line-height: 1.5;
81
+ }
82
+ table {
83
+ border-collapse: collapse !important;
84
+ width: 100% !important;
85
+ border: 2px solid #000 !important;
86
+ }
87
+ th, td {
88
+ border: 2px solid #000 !important;
89
+ padding: 8px !important;
90
+ text-align: left !important;
91
+ }
92
+ th {
93
+ background-color: #f2f2f2 !important;
94
+ }
95
+ ` ,
96
+ contentStyle : `
97
+ table {
98
+ border-collapse: collapse;
99
+ width: 100%;
100
+ border: 2px solid black !important;
101
+ }
102
+ th, td {
103
+ border: 2px solid black !important;
104
+ padding: 8px !important;
105
+ text-align: left;
106
+ }
107
+ ` ,
108
+ maxheight : "65vh" ,
58
109
// direction: 'rtl',
59
110
// tabIndex: 0,
60
111
// shadowRoot: root,
@@ -141,31 +192,6 @@ <h1>Jodit Test Document</h1>
141
192
} ,
142
193
} ,
143
194
} ) ;
144
-
145
- editor . value = '<p style="font-size: 16.5pt; margin: 0"><a href="stand.html"><img src="https://xdsoft.net/jodit/finder/files/pexels-arianna-jade-4006617.jpg" id="lio" alt="Tada" style="margin: 1px 2px 3px 4px; border: 2px solid #f00;" title="Ola ha" width="300"></a>Body Subtitle</p>\n' +
146
- '<table><tbody><tr><th>header</th><td>1</td></tr></tbody></table>' +
147
- '<p style="font-size: 10pt; line-height: normal; margin: 7px 0 0 0;">To modify this template, place it into your Outlook editor.</p>' ;
148
- editor . value = '' ;
149
- // editor.events.fire(
150
- // 'openImageProperties',
151
- // editor.editor.querySelector('img')
152
- // );
153
- btn . onclick = ( ) => {
154
- const start = performance . now ( ) ;
155
- for ( let i = 0 ; i < 100 ; i ++ ) {
156
- editor . toolbar . build ( editor . o . buttons ) ;
157
- }
158
- const res = performance . now ( ) - start ;
159
- form . appendChild (
160
- editor . create . fromHTML (
161
- '<input name="content" value="' + res + '">'
162
- )
163
- ) ;
164
- } ;
165
-
166
- // delete editor;
167
- // const box = new UIBox(editor1);
168
- // alert(box.container.outerHTML);
169
195
</ script >
170
196
< style >
171
197
.class1 {
0 commit comments