@ckeditor/ckeditor5-html-support 0.0.0-internal-20241017.0

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.
Files changed (312) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/LICENSE.md +21 -0
  3. package/README.md +26 -0
  4. package/build/html-support.js +5 -0
  5. package/build/translations/ar.js +1 -0
  6. package/build/translations/bg.js +1 -0
  7. package/build/translations/bn.js +1 -0
  8. package/build/translations/ca.js +1 -0
  9. package/build/translations/cs.js +1 -0
  10. package/build/translations/da.js +1 -0
  11. package/build/translations/de.js +1 -0
  12. package/build/translations/el.js +1 -0
  13. package/build/translations/en-au.js +1 -0
  14. package/build/translations/es.js +1 -0
  15. package/build/translations/et.js +1 -0
  16. package/build/translations/fi.js +1 -0
  17. package/build/translations/fr.js +1 -0
  18. package/build/translations/gl.js +1 -0
  19. package/build/translations/he.js +1 -0
  20. package/build/translations/hi.js +1 -0
  21. package/build/translations/hr.js +1 -0
  22. package/build/translations/hu.js +1 -0
  23. package/build/translations/id.js +1 -0
  24. package/build/translations/it.js +1 -0
  25. package/build/translations/ja.js +1 -0
  26. package/build/translations/jv.js +1 -0
  27. package/build/translations/ko.js +1 -0
  28. package/build/translations/lt.js +1 -0
  29. package/build/translations/lv.js +1 -0
  30. package/build/translations/ms.js +1 -0
  31. package/build/translations/nl.js +1 -0
  32. package/build/translations/no.js +1 -0
  33. package/build/translations/pl.js +1 -0
  34. package/build/translations/pt-br.js +1 -0
  35. package/build/translations/pt.js +1 -0
  36. package/build/translations/ro.js +1 -0
  37. package/build/translations/ru.js +1 -0
  38. package/build/translations/sk.js +1 -0
  39. package/build/translations/sr-latn.js +1 -0
  40. package/build/translations/sr.js +1 -0
  41. package/build/translations/sv.js +1 -0
  42. package/build/translations/th.js +1 -0
  43. package/build/translations/tr.js +1 -0
  44. package/build/translations/ug.js +1 -0
  45. package/build/translations/uk.js +1 -0
  46. package/build/translations/ur.js +1 -0
  47. package/build/translations/vi.js +1 -0
  48. package/build/translations/zh-cn.js +1 -0
  49. package/build/translations/zh.js +1 -0
  50. package/ckeditor5-metadata.json +60 -0
  51. package/dist/augmentation.d.ts +37 -0
  52. package/dist/converters.d.ts +64 -0
  53. package/dist/datafilter.d.ts +312 -0
  54. package/dist/dataschema.d.ts +191 -0
  55. package/dist/fullpage.d.ts +29 -0
  56. package/dist/generalhtmlsupport.d.ts +106 -0
  57. package/dist/generalhtmlsupportconfig.d.ts +81 -0
  58. package/dist/htmlcomment.d.ts +79 -0
  59. package/dist/htmlpagedataprocessor.d.ts +26 -0
  60. package/dist/index-content.css +4 -0
  61. package/dist/index-editor.css +51 -0
  62. package/dist/index.css +63 -0
  63. package/dist/index.css.map +1 -0
  64. package/dist/index.d.ts +29 -0
  65. package/dist/index.js +4040 -0
  66. package/dist/index.js.map +1 -0
  67. package/dist/integrations/codeblock.d.ts +31 -0
  68. package/dist/integrations/customelement.d.ts +35 -0
  69. package/dist/integrations/dualcontent.d.ts +53 -0
  70. package/dist/integrations/heading.d.ts +39 -0
  71. package/dist/integrations/image.d.ts +34 -0
  72. package/dist/integrations/integrationutils.d.ts +19 -0
  73. package/dist/integrations/list.d.ts +35 -0
  74. package/dist/integrations/mediaembed.d.ts +34 -0
  75. package/dist/integrations/script.d.ts +34 -0
  76. package/dist/integrations/style.d.ts +34 -0
  77. package/dist/integrations/table.d.ts +31 -0
  78. package/dist/schemadefinitions.d.ts +17 -0
  79. package/dist/translations/ar.d.ts +8 -0
  80. package/dist/translations/ar.js +5 -0
  81. package/dist/translations/ar.umd.js +11 -0
  82. package/dist/translations/bg.d.ts +8 -0
  83. package/dist/translations/bg.js +5 -0
  84. package/dist/translations/bg.umd.js +11 -0
  85. package/dist/translations/bn.d.ts +8 -0
  86. package/dist/translations/bn.js +5 -0
  87. package/dist/translations/bn.umd.js +11 -0
  88. package/dist/translations/ca.d.ts +8 -0
  89. package/dist/translations/ca.js +5 -0
  90. package/dist/translations/ca.umd.js +11 -0
  91. package/dist/translations/cs.d.ts +8 -0
  92. package/dist/translations/cs.js +5 -0
  93. package/dist/translations/cs.umd.js +11 -0
  94. package/dist/translations/da.d.ts +8 -0
  95. package/dist/translations/da.js +5 -0
  96. package/dist/translations/da.umd.js +11 -0
  97. package/dist/translations/de.d.ts +8 -0
  98. package/dist/translations/de.js +5 -0
  99. package/dist/translations/de.umd.js +11 -0
  100. package/dist/translations/el.d.ts +8 -0
  101. package/dist/translations/el.js +5 -0
  102. package/dist/translations/el.umd.js +11 -0
  103. package/dist/translations/en-au.d.ts +8 -0
  104. package/dist/translations/en-au.js +5 -0
  105. package/dist/translations/en-au.umd.js +11 -0
  106. package/dist/translations/en.d.ts +8 -0
  107. package/dist/translations/en.js +5 -0
  108. package/dist/translations/en.umd.js +11 -0
  109. package/dist/translations/es.d.ts +8 -0
  110. package/dist/translations/es.js +5 -0
  111. package/dist/translations/es.umd.js +11 -0
  112. package/dist/translations/et.d.ts +8 -0
  113. package/dist/translations/et.js +5 -0
  114. package/dist/translations/et.umd.js +11 -0
  115. package/dist/translations/fi.d.ts +8 -0
  116. package/dist/translations/fi.js +5 -0
  117. package/dist/translations/fi.umd.js +11 -0
  118. package/dist/translations/fr.d.ts +8 -0
  119. package/dist/translations/fr.js +5 -0
  120. package/dist/translations/fr.umd.js +11 -0
  121. package/dist/translations/gl.d.ts +8 -0
  122. package/dist/translations/gl.js +5 -0
  123. package/dist/translations/gl.umd.js +11 -0
  124. package/dist/translations/he.d.ts +8 -0
  125. package/dist/translations/he.js +5 -0
  126. package/dist/translations/he.umd.js +11 -0
  127. package/dist/translations/hi.d.ts +8 -0
  128. package/dist/translations/hi.js +5 -0
  129. package/dist/translations/hi.umd.js +11 -0
  130. package/dist/translations/hr.d.ts +8 -0
  131. package/dist/translations/hr.js +5 -0
  132. package/dist/translations/hr.umd.js +11 -0
  133. package/dist/translations/hu.d.ts +8 -0
  134. package/dist/translations/hu.js +5 -0
  135. package/dist/translations/hu.umd.js +11 -0
  136. package/dist/translations/id.d.ts +8 -0
  137. package/dist/translations/id.js +5 -0
  138. package/dist/translations/id.umd.js +11 -0
  139. package/dist/translations/it.d.ts +8 -0
  140. package/dist/translations/it.js +5 -0
  141. package/dist/translations/it.umd.js +11 -0
  142. package/dist/translations/ja.d.ts +8 -0
  143. package/dist/translations/ja.js +5 -0
  144. package/dist/translations/ja.umd.js +11 -0
  145. package/dist/translations/jv.d.ts +8 -0
  146. package/dist/translations/jv.js +5 -0
  147. package/dist/translations/jv.umd.js +11 -0
  148. package/dist/translations/ko.d.ts +8 -0
  149. package/dist/translations/ko.js +5 -0
  150. package/dist/translations/ko.umd.js +11 -0
  151. package/dist/translations/lt.d.ts +8 -0
  152. package/dist/translations/lt.js +5 -0
  153. package/dist/translations/lt.umd.js +11 -0
  154. package/dist/translations/lv.d.ts +8 -0
  155. package/dist/translations/lv.js +5 -0
  156. package/dist/translations/lv.umd.js +11 -0
  157. package/dist/translations/ms.d.ts +8 -0
  158. package/dist/translations/ms.js +5 -0
  159. package/dist/translations/ms.umd.js +11 -0
  160. package/dist/translations/nl.d.ts +8 -0
  161. package/dist/translations/nl.js +5 -0
  162. package/dist/translations/nl.umd.js +11 -0
  163. package/dist/translations/no.d.ts +8 -0
  164. package/dist/translations/no.js +5 -0
  165. package/dist/translations/no.umd.js +11 -0
  166. package/dist/translations/pl.d.ts +8 -0
  167. package/dist/translations/pl.js +5 -0
  168. package/dist/translations/pl.umd.js +11 -0
  169. package/dist/translations/pt-br.d.ts +8 -0
  170. package/dist/translations/pt-br.js +5 -0
  171. package/dist/translations/pt-br.umd.js +11 -0
  172. package/dist/translations/pt.d.ts +8 -0
  173. package/dist/translations/pt.js +5 -0
  174. package/dist/translations/pt.umd.js +11 -0
  175. package/dist/translations/ro.d.ts +8 -0
  176. package/dist/translations/ro.js +5 -0
  177. package/dist/translations/ro.umd.js +11 -0
  178. package/dist/translations/ru.d.ts +8 -0
  179. package/dist/translations/ru.js +5 -0
  180. package/dist/translations/ru.umd.js +11 -0
  181. package/dist/translations/sk.d.ts +8 -0
  182. package/dist/translations/sk.js +5 -0
  183. package/dist/translations/sk.umd.js +11 -0
  184. package/dist/translations/sr-latn.d.ts +8 -0
  185. package/dist/translations/sr-latn.js +5 -0
  186. package/dist/translations/sr-latn.umd.js +11 -0
  187. package/dist/translations/sr.d.ts +8 -0
  188. package/dist/translations/sr.js +5 -0
  189. package/dist/translations/sr.umd.js +11 -0
  190. package/dist/translations/sv.d.ts +8 -0
  191. package/dist/translations/sv.js +5 -0
  192. package/dist/translations/sv.umd.js +11 -0
  193. package/dist/translations/th.d.ts +8 -0
  194. package/dist/translations/th.js +5 -0
  195. package/dist/translations/th.umd.js +11 -0
  196. package/dist/translations/tr.d.ts +8 -0
  197. package/dist/translations/tr.js +5 -0
  198. package/dist/translations/tr.umd.js +11 -0
  199. package/dist/translations/ug.d.ts +8 -0
  200. package/dist/translations/ug.js +5 -0
  201. package/dist/translations/ug.umd.js +11 -0
  202. package/dist/translations/uk.d.ts +8 -0
  203. package/dist/translations/uk.js +5 -0
  204. package/dist/translations/uk.umd.js +11 -0
  205. package/dist/translations/ur.d.ts +8 -0
  206. package/dist/translations/ur.js +5 -0
  207. package/dist/translations/ur.umd.js +11 -0
  208. package/dist/translations/vi.d.ts +8 -0
  209. package/dist/translations/vi.js +5 -0
  210. package/dist/translations/vi.umd.js +11 -0
  211. package/dist/translations/zh-cn.d.ts +8 -0
  212. package/dist/translations/zh-cn.js +5 -0
  213. package/dist/translations/zh-cn.umd.js +11 -0
  214. package/dist/translations/zh.d.ts +8 -0
  215. package/dist/translations/zh.js +5 -0
  216. package/dist/translations/zh.umd.js +11 -0
  217. package/dist/utils.d.ts +76 -0
  218. package/lang/contexts.json +3 -0
  219. package/lang/translations/ar.po +22 -0
  220. package/lang/translations/bg.po +22 -0
  221. package/lang/translations/bn.po +22 -0
  222. package/lang/translations/ca.po +22 -0
  223. package/lang/translations/cs.po +22 -0
  224. package/lang/translations/da.po +22 -0
  225. package/lang/translations/de.po +22 -0
  226. package/lang/translations/el.po +22 -0
  227. package/lang/translations/en-au.po +22 -0
  228. package/lang/translations/en.po +22 -0
  229. package/lang/translations/es.po +22 -0
  230. package/lang/translations/et.po +22 -0
  231. package/lang/translations/fi.po +22 -0
  232. package/lang/translations/fr.po +22 -0
  233. package/lang/translations/gl.po +22 -0
  234. package/lang/translations/he.po +22 -0
  235. package/lang/translations/hi.po +22 -0
  236. package/lang/translations/hr.po +22 -0
  237. package/lang/translations/hu.po +22 -0
  238. package/lang/translations/id.po +22 -0
  239. package/lang/translations/it.po +22 -0
  240. package/lang/translations/ja.po +22 -0
  241. package/lang/translations/jv.po +22 -0
  242. package/lang/translations/ko.po +22 -0
  243. package/lang/translations/lt.po +22 -0
  244. package/lang/translations/lv.po +22 -0
  245. package/lang/translations/ms.po +22 -0
  246. package/lang/translations/nl.po +22 -0
  247. package/lang/translations/no.po +22 -0
  248. package/lang/translations/pl.po +22 -0
  249. package/lang/translations/pt-br.po +22 -0
  250. package/lang/translations/pt.po +22 -0
  251. package/lang/translations/ro.po +22 -0
  252. package/lang/translations/ru.po +22 -0
  253. package/lang/translations/sk.po +22 -0
  254. package/lang/translations/sr-latn.po +22 -0
  255. package/lang/translations/sr.po +22 -0
  256. package/lang/translations/sv.po +22 -0
  257. package/lang/translations/th.po +22 -0
  258. package/lang/translations/tr.po +22 -0
  259. package/lang/translations/ug.po +22 -0
  260. package/lang/translations/uk.po +22 -0
  261. package/lang/translations/ur.po +22 -0
  262. package/lang/translations/vi.po +22 -0
  263. package/lang/translations/zh-cn.po +22 -0
  264. package/lang/translations/zh.po +22 -0
  265. package/package.json +48 -0
  266. package/src/augmentation.d.ts +33 -0
  267. package/src/augmentation.js +5 -0
  268. package/src/converters.d.ts +60 -0
  269. package/src/converters.js +180 -0
  270. package/src/datafilter.d.ts +308 -0
  271. package/src/datafilter.js +755 -0
  272. package/src/dataschema.d.ts +187 -0
  273. package/src/dataschema.js +202 -0
  274. package/src/fullpage.d.ts +25 -0
  275. package/src/fullpage.js +86 -0
  276. package/src/generalhtmlsupport.d.ts +102 -0
  277. package/src/generalhtmlsupport.js +246 -0
  278. package/src/generalhtmlsupportconfig.d.ts +77 -0
  279. package/src/generalhtmlsupportconfig.js +5 -0
  280. package/src/htmlcomment.d.ts +75 -0
  281. package/src/htmlcomment.js +224 -0
  282. package/src/htmlpagedataprocessor.d.ts +22 -0
  283. package/src/htmlpagedataprocessor.js +67 -0
  284. package/src/index.d.ts +25 -0
  285. package/src/index.js +14 -0
  286. package/src/integrations/codeblock.d.ts +27 -0
  287. package/src/integrations/codeblock.js +107 -0
  288. package/src/integrations/customelement.d.ts +31 -0
  289. package/src/integrations/customelement.js +162 -0
  290. package/src/integrations/dualcontent.d.ts +49 -0
  291. package/src/integrations/dualcontent.js +125 -0
  292. package/src/integrations/heading.d.ts +35 -0
  293. package/src/integrations/heading.js +72 -0
  294. package/src/integrations/image.d.ts +30 -0
  295. package/src/integrations/image.js +195 -0
  296. package/src/integrations/integrationutils.d.ts +15 -0
  297. package/src/integrations/integrationutils.js +21 -0
  298. package/src/integrations/list.d.ts +31 -0
  299. package/src/integrations/list.js +185 -0
  300. package/src/integrations/mediaembed.d.ts +30 -0
  301. package/src/integrations/mediaembed.js +125 -0
  302. package/src/integrations/script.d.ts +30 -0
  303. package/src/integrations/script.js +65 -0
  304. package/src/integrations/style.d.ts +30 -0
  305. package/src/integrations/style.js +65 -0
  306. package/src/integrations/table.d.ts +27 -0
  307. package/src/integrations/table.js +169 -0
  308. package/src/schemadefinitions.d.ts +13 -0
  309. package/src/schemadefinitions.js +964 -0
  310. package/src/utils.d.ts +72 -0
  311. package/src/utils.js +139 -0
  312. package/theme/datafilter.css +56 -0
@@ -0,0 +1,964 @@
1
+ /**
2
+ * @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
+ */
5
+ /**
6
+ * @module html-support/schemadefinitions
7
+ */
8
+ // Skipped elements due to HTML deprecation:
9
+ // * noframes (not sure if we should provide support for this element. CKE4 is not supporting frameset and frame,
10
+ // but it will unpack <frameset><noframes>foobar</noframes></frameset> to <noframes>foobar</noframes>, so there
11
+ // may be some content loss. Although using noframes as a standalone element seems invalid)
12
+ // * keygen (this one is also empty)
13
+ // * applet (support is limited mostly to old IE)
14
+ // * basefont (this one is also empty)
15
+ // * isindex (basically no support for modern browsers at all)
16
+ //
17
+ // Skipped elements due to lack empty element support:
18
+ // * hr
19
+ // * area
20
+ // * br
21
+ // * command
22
+ // * map
23
+ // * wbr
24
+ // * colgroup -> col
25
+ //
26
+ // Skipped elements due to complexity:
27
+ // * datalist with option elements used as a data source for input[list] element
28
+ //
29
+ // Skipped elements as they are handled as an object content:
30
+ // * track
31
+ // * source
32
+ // * option
33
+ // * param
34
+ // * optgroup
35
+ //
36
+ // Skipped full page HTML elements:
37
+ // * body
38
+ // * html
39
+ // * title
40
+ // * head
41
+ // * meta
42
+ // * link
43
+ // * etc...
44
+ //
45
+ // Skipped hidden elements:
46
+ // noscript
47
+ export default {
48
+ block: [
49
+ // Existing features.
50
+ {
51
+ model: 'codeBlock',
52
+ view: 'pre'
53
+ },
54
+ {
55
+ model: 'paragraph',
56
+ view: 'p'
57
+ },
58
+ {
59
+ model: 'blockQuote',
60
+ view: 'blockquote'
61
+ },
62
+ {
63
+ model: 'listItem',
64
+ view: 'li'
65
+ },
66
+ {
67
+ model: 'pageBreak',
68
+ view: 'div'
69
+ },
70
+ {
71
+ model: 'rawHtml',
72
+ view: 'div'
73
+ },
74
+ {
75
+ model: 'table',
76
+ view: 'table'
77
+ },
78
+ {
79
+ model: 'tableRow',
80
+ view: 'tr'
81
+ },
82
+ {
83
+ model: 'tableCell',
84
+ view: 'td'
85
+ },
86
+ {
87
+ model: 'tableCell',
88
+ view: 'th'
89
+ },
90
+ {
91
+ model: 'tableColumnGroup',
92
+ view: 'colgroup'
93
+ },
94
+ {
95
+ model: 'tableColumn',
96
+ view: 'col'
97
+ },
98
+ {
99
+ model: 'caption',
100
+ view: 'caption'
101
+ },
102
+ {
103
+ model: 'caption',
104
+ view: 'figcaption'
105
+ },
106
+ {
107
+ model: 'imageBlock',
108
+ view: 'img'
109
+ },
110
+ {
111
+ model: 'imageInline',
112
+ view: 'img'
113
+ },
114
+ // Compatibility features.
115
+ {
116
+ model: 'htmlP',
117
+ view: 'p',
118
+ modelSchema: {
119
+ inheritAllFrom: '$block'
120
+ }
121
+ },
122
+ {
123
+ model: 'htmlBlockquote',
124
+ view: 'blockquote',
125
+ modelSchema: {
126
+ inheritAllFrom: '$container'
127
+ }
128
+ },
129
+ {
130
+ model: 'htmlTable',
131
+ view: 'table',
132
+ modelSchema: {
133
+ allowWhere: '$block',
134
+ isBlock: true
135
+ }
136
+ },
137
+ {
138
+ model: 'htmlTbody',
139
+ view: 'tbody',
140
+ modelSchema: {
141
+ allowIn: 'htmlTable',
142
+ isBlock: false
143
+ }
144
+ },
145
+ {
146
+ model: 'htmlThead',
147
+ view: 'thead',
148
+ modelSchema: {
149
+ allowIn: 'htmlTable',
150
+ isBlock: false
151
+ }
152
+ },
153
+ {
154
+ model: 'htmlTfoot',
155
+ view: 'tfoot',
156
+ modelSchema: {
157
+ allowIn: 'htmlTable',
158
+ isBlock: false
159
+ }
160
+ },
161
+ {
162
+ model: 'htmlCaption',
163
+ view: 'caption',
164
+ modelSchema: {
165
+ allowIn: 'htmlTable',
166
+ allowChildren: '$text',
167
+ isBlock: false
168
+ }
169
+ },
170
+ {
171
+ model: 'htmlColgroup',
172
+ view: 'colgroup',
173
+ modelSchema: {
174
+ allowIn: 'htmlTable',
175
+ allowChildren: 'col',
176
+ isBlock: false
177
+ }
178
+ },
179
+ {
180
+ model: 'htmlCol',
181
+ view: 'col',
182
+ modelSchema: {
183
+ allowIn: 'htmlColgroup',
184
+ isBlock: false
185
+ }
186
+ },
187
+ {
188
+ model: 'htmlTr',
189
+ view: 'tr',
190
+ modelSchema: {
191
+ allowIn: ['htmlTable', 'htmlThead', 'htmlTbody'],
192
+ isLimit: true
193
+ }
194
+ },
195
+ // TODO can also include text.
196
+ {
197
+ model: 'htmlTd',
198
+ view: 'td',
199
+ modelSchema: {
200
+ allowIn: 'htmlTr',
201
+ allowContentOf: '$container',
202
+ isLimit: true,
203
+ isBlock: false
204
+ }
205
+ },
206
+ // TODO can also include text.
207
+ {
208
+ model: 'htmlTh',
209
+ view: 'th',
210
+ modelSchema: {
211
+ allowIn: 'htmlTr',
212
+ allowContentOf: '$container',
213
+ isLimit: true,
214
+ isBlock: false
215
+ }
216
+ },
217
+ // TODO can also include text.
218
+ {
219
+ model: 'htmlFigure',
220
+ view: 'figure',
221
+ modelSchema: {
222
+ inheritAllFrom: '$container',
223
+ isBlock: false
224
+ }
225
+ },
226
+ // TODO can also include other block elements.
227
+ {
228
+ model: 'htmlFigcaption',
229
+ view: 'figcaption',
230
+ modelSchema: {
231
+ allowIn: 'htmlFigure',
232
+ allowChildren: '$text',
233
+ isBlock: false
234
+ }
235
+ },
236
+ // TODO can also include text.
237
+ {
238
+ model: 'htmlAddress',
239
+ view: 'address',
240
+ modelSchema: {
241
+ inheritAllFrom: '$container',
242
+ isBlock: false
243
+ }
244
+ },
245
+ // TODO can also include text.
246
+ {
247
+ model: 'htmlAside',
248
+ view: 'aside',
249
+ modelSchema: {
250
+ inheritAllFrom: '$container',
251
+ isBlock: false
252
+ }
253
+ },
254
+ // TODO can also include text.
255
+ {
256
+ model: 'htmlMain',
257
+ view: 'main',
258
+ modelSchema: {
259
+ inheritAllFrom: '$container',
260
+ isBlock: false
261
+ }
262
+ },
263
+ // TODO can also include text.
264
+ {
265
+ model: 'htmlDetails',
266
+ view: 'details',
267
+ modelSchema: {
268
+ inheritAllFrom: '$container',
269
+ isBlock: false
270
+ }
271
+ },
272
+ {
273
+ model: 'htmlSummary',
274
+ view: 'summary',
275
+ modelSchema: {
276
+ allowChildren: [
277
+ 'htmlH1',
278
+ 'htmlH2',
279
+ 'htmlH3',
280
+ 'htmlH4',
281
+ 'htmlH5',
282
+ 'htmlH6',
283
+ '$text'
284
+ ],
285
+ allowIn: 'htmlDetails',
286
+ isBlock: false
287
+ }
288
+ },
289
+ {
290
+ model: 'htmlDiv',
291
+ view: 'div',
292
+ paragraphLikeModel: 'htmlDivParagraph',
293
+ modelSchema: {
294
+ inheritAllFrom: '$container'
295
+ }
296
+ },
297
+ // TODO can also include text.
298
+ {
299
+ model: 'htmlFieldset',
300
+ view: 'fieldset',
301
+ modelSchema: {
302
+ inheritAllFrom: '$container',
303
+ isBlock: false
304
+ }
305
+ },
306
+ // TODO can also include h1-h6.
307
+ {
308
+ model: 'htmlLegend',
309
+ view: 'legend',
310
+ modelSchema: {
311
+ allowIn: 'htmlFieldset',
312
+ allowChildren: '$text'
313
+ }
314
+ },
315
+ // TODO can also include text.
316
+ {
317
+ model: 'htmlHeader',
318
+ view: 'header',
319
+ modelSchema: {
320
+ inheritAllFrom: '$container',
321
+ isBlock: false
322
+ }
323
+ },
324
+ // TODO can also include text.
325
+ {
326
+ model: 'htmlFooter',
327
+ view: 'footer',
328
+ modelSchema: {
329
+ inheritAllFrom: '$container',
330
+ isBlock: false
331
+ }
332
+ },
333
+ // TODO can also include text.
334
+ {
335
+ model: 'htmlForm',
336
+ view: 'form',
337
+ modelSchema: {
338
+ inheritAllFrom: '$container',
339
+ isBlock: true
340
+ }
341
+ },
342
+ {
343
+ model: 'htmlHgroup',
344
+ view: 'hgroup',
345
+ modelSchema: {
346
+ allowIn: ['$root', '$container'],
347
+ allowChildren: [
348
+ 'paragraph',
349
+ 'htmlP',
350
+ 'htmlH1',
351
+ 'htmlH2',
352
+ 'htmlH3',
353
+ 'htmlH4',
354
+ 'htmlH5',
355
+ 'htmlH6'
356
+ ],
357
+ isBlock: false
358
+ }
359
+ },
360
+ {
361
+ model: 'htmlH1',
362
+ view: 'h1',
363
+ modelSchema: {
364
+ inheritAllFrom: '$block'
365
+ }
366
+ },
367
+ {
368
+ model: 'htmlH2',
369
+ view: 'h2',
370
+ modelSchema: {
371
+ inheritAllFrom: '$block'
372
+ }
373
+ },
374
+ {
375
+ model: 'htmlH3',
376
+ view: 'h3',
377
+ modelSchema: {
378
+ inheritAllFrom: '$block'
379
+ }
380
+ },
381
+ {
382
+ model: 'htmlH4',
383
+ view: 'h4',
384
+ modelSchema: {
385
+ inheritAllFrom: '$block'
386
+ }
387
+ },
388
+ {
389
+ model: 'htmlH5',
390
+ view: 'h5',
391
+ modelSchema: {
392
+ inheritAllFrom: '$block'
393
+ }
394
+ },
395
+ {
396
+ model: 'htmlH6',
397
+ view: 'h6',
398
+ modelSchema: {
399
+ inheritAllFrom: '$block'
400
+ }
401
+ },
402
+ {
403
+ model: '$htmlList',
404
+ modelSchema: {
405
+ allowWhere: '$container',
406
+ allowChildren: ['$htmlList', 'htmlLi'],
407
+ isBlock: false
408
+ }
409
+ },
410
+ {
411
+ model: 'htmlDir',
412
+ view: 'dir',
413
+ modelSchema: {
414
+ inheritAllFrom: '$htmlList'
415
+ }
416
+ },
417
+ {
418
+ model: 'htmlMenu',
419
+ view: 'menu',
420
+ modelSchema: {
421
+ inheritAllFrom: '$htmlList'
422
+ }
423
+ },
424
+ {
425
+ model: 'htmlUl',
426
+ view: 'ul',
427
+ modelSchema: {
428
+ inheritAllFrom: '$htmlList'
429
+ }
430
+ },
431
+ {
432
+ model: 'htmlOl',
433
+ view: 'ol',
434
+ modelSchema: {
435
+ inheritAllFrom: '$htmlList'
436
+ }
437
+ },
438
+ // TODO can also include other block elements.
439
+ {
440
+ model: 'htmlLi',
441
+ view: 'li',
442
+ modelSchema: {
443
+ allowIn: '$htmlList',
444
+ allowChildren: '$text',
445
+ isBlock: false
446
+ }
447
+ },
448
+ {
449
+ model: 'htmlPre',
450
+ view: 'pre',
451
+ modelSchema: {
452
+ inheritAllFrom: '$block'
453
+ }
454
+ },
455
+ {
456
+ model: 'htmlArticle',
457
+ view: 'article',
458
+ modelSchema: {
459
+ inheritAllFrom: '$container',
460
+ isBlock: false
461
+ }
462
+ },
463
+ {
464
+ model: 'htmlSection',
465
+ view: 'section',
466
+ modelSchema: {
467
+ inheritAllFrom: '$container',
468
+ isBlock: false
469
+ }
470
+ },
471
+ // TODO can also include text.
472
+ {
473
+ model: 'htmlNav',
474
+ view: 'nav',
475
+ modelSchema: {
476
+ inheritAllFrom: '$container',
477
+ isBlock: false
478
+ }
479
+ },
480
+ {
481
+ model: 'htmlDivDl',
482
+ view: 'div',
483
+ modelSchema: {
484
+ allowChildren: ['htmlDt', 'htmlDd'],
485
+ allowIn: 'htmlDl'
486
+ }
487
+ },
488
+ {
489
+ model: 'htmlDl',
490
+ view: 'dl',
491
+ modelSchema: {
492
+ allowWhere: '$container',
493
+ allowChildren: ['htmlDt', 'htmlDd', 'htmlDivDl'],
494
+ isBlock: false
495
+ }
496
+ },
497
+ {
498
+ model: 'htmlDt',
499
+ view: 'dt',
500
+ modelSchema: {
501
+ allowChildren: '$block',
502
+ isBlock: false
503
+ }
504
+ },
505
+ {
506
+ model: 'htmlDd',
507
+ view: 'dd',
508
+ modelSchema: {
509
+ allowChildren: '$block',
510
+ isBlock: false
511
+ }
512
+ },
513
+ {
514
+ model: 'htmlCenter',
515
+ view: 'center',
516
+ modelSchema: {
517
+ inheritAllFrom: '$container',
518
+ isBlock: false
519
+ }
520
+ }
521
+ ],
522
+ inline: [
523
+ // Existing features (attribute set on an existing model element).
524
+ {
525
+ model: 'htmlLiAttributes',
526
+ view: 'li',
527
+ appliesToBlock: true,
528
+ coupledAttribute: 'listItemId'
529
+ },
530
+ {
531
+ model: 'htmlOlAttributes',
532
+ view: 'ol',
533
+ appliesToBlock: true,
534
+ coupledAttribute: 'listItemId'
535
+ },
536
+ {
537
+ model: 'htmlUlAttributes',
538
+ view: 'ul',
539
+ appliesToBlock: true,
540
+ coupledAttribute: 'listItemId'
541
+ },
542
+ {
543
+ model: 'htmlFigureAttributes',
544
+ view: 'figure',
545
+ appliesToBlock: 'table'
546
+ },
547
+ {
548
+ model: 'htmlTheadAttributes',
549
+ view: 'thead',
550
+ appliesToBlock: 'table'
551
+ },
552
+ {
553
+ model: 'htmlTbodyAttributes',
554
+ view: 'tbody',
555
+ appliesToBlock: 'table'
556
+ },
557
+ {
558
+ model: 'htmlFigureAttributes',
559
+ view: 'figure',
560
+ appliesToBlock: 'imageBlock'
561
+ },
562
+ // Compatibility features.
563
+ {
564
+ model: 'htmlAcronym',
565
+ view: 'acronym',
566
+ attributeProperties: {
567
+ copyOnEnter: true,
568
+ isFormatting: true
569
+ }
570
+ },
571
+ {
572
+ model: 'htmlTt',
573
+ view: 'tt',
574
+ attributeProperties: {
575
+ copyOnEnter: true,
576
+ isFormatting: true
577
+ }
578
+ },
579
+ {
580
+ model: 'htmlFont',
581
+ view: 'font',
582
+ attributeProperties: {
583
+ copyOnEnter: true,
584
+ isFormatting: true
585
+ }
586
+ },
587
+ {
588
+ model: 'htmlTime',
589
+ view: 'time',
590
+ attributeProperties: {
591
+ copyOnEnter: true,
592
+ isFormatting: true
593
+ }
594
+ },
595
+ {
596
+ model: 'htmlVar',
597
+ view: 'var',
598
+ attributeProperties: {
599
+ copyOnEnter: true,
600
+ isFormatting: true
601
+ }
602
+ },
603
+ {
604
+ model: 'htmlBig',
605
+ view: 'big',
606
+ attributeProperties: {
607
+ copyOnEnter: true,
608
+ isFormatting: true
609
+ }
610
+ },
611
+ {
612
+ model: 'htmlSmall',
613
+ view: 'small',
614
+ attributeProperties: {
615
+ copyOnEnter: true,
616
+ isFormatting: true
617
+ }
618
+ },
619
+ {
620
+ model: 'htmlSamp',
621
+ view: 'samp',
622
+ attributeProperties: {
623
+ copyOnEnter: true,
624
+ isFormatting: true
625
+ }
626
+ },
627
+ {
628
+ model: 'htmlQ',
629
+ view: 'q',
630
+ attributeProperties: {
631
+ copyOnEnter: true,
632
+ isFormatting: true
633
+ }
634
+ },
635
+ {
636
+ model: 'htmlOutput',
637
+ view: 'output',
638
+ attributeProperties: {
639
+ copyOnEnter: true,
640
+ isFormatting: true
641
+ }
642
+ },
643
+ {
644
+ model: 'htmlKbd',
645
+ view: 'kbd',
646
+ attributeProperties: {
647
+ copyOnEnter: true,
648
+ isFormatting: true
649
+ }
650
+ },
651
+ {
652
+ model: 'htmlBdi',
653
+ view: 'bdi',
654
+ attributeProperties: {
655
+ copyOnEnter: true,
656
+ isFormatting: true
657
+ }
658
+ },
659
+ {
660
+ model: 'htmlBdo',
661
+ view: 'bdo',
662
+ attributeProperties: {
663
+ copyOnEnter: true,
664
+ isFormatting: true
665
+ }
666
+ },
667
+ {
668
+ model: 'htmlAbbr',
669
+ view: 'abbr',
670
+ attributeProperties: {
671
+ copyOnEnter: true,
672
+ isFormatting: true
673
+ }
674
+ },
675
+ {
676
+ model: 'htmlA',
677
+ view: 'a',
678
+ priority: 5,
679
+ coupledAttribute: 'linkHref'
680
+ },
681
+ {
682
+ model: 'htmlStrong',
683
+ view: 'strong',
684
+ coupledAttribute: 'bold',
685
+ attributeProperties: {
686
+ copyOnEnter: true,
687
+ isFormatting: true
688
+ }
689
+ },
690
+ {
691
+ model: 'htmlB',
692
+ view: 'b',
693
+ coupledAttribute: 'bold',
694
+ attributeProperties: {
695
+ copyOnEnter: true,
696
+ isFormatting: true
697
+ }
698
+ },
699
+ {
700
+ model: 'htmlI',
701
+ view: 'i',
702
+ coupledAttribute: 'italic',
703
+ attributeProperties: {
704
+ copyOnEnter: true,
705
+ isFormatting: true
706
+ }
707
+ },
708
+ {
709
+ model: 'htmlEm',
710
+ view: 'em',
711
+ coupledAttribute: 'italic',
712
+ attributeProperties: {
713
+ copyOnEnter: true,
714
+ isFormatting: true
715
+ }
716
+ },
717
+ {
718
+ model: 'htmlS',
719
+ view: 's',
720
+ coupledAttribute: 'strikethrough',
721
+ attributeProperties: {
722
+ copyOnEnter: true,
723
+ isFormatting: true
724
+ }
725
+ },
726
+ // TODO According to HTML-spec can behave as div-like element, although CKE4 only handles it as an inline element.
727
+ {
728
+ model: 'htmlDel',
729
+ view: 'del',
730
+ coupledAttribute: 'strikethrough',
731
+ attributeProperties: {
732
+ copyOnEnter: true,
733
+ isFormatting: true
734
+ }
735
+ },
736
+ // TODO According to HTML-spec can behave as div-like element, although CKE4 only handles it as an inline element.
737
+ {
738
+ model: 'htmlIns',
739
+ view: 'ins',
740
+ attributeProperties: {
741
+ copyOnEnter: true,
742
+ isFormatting: true
743
+ }
744
+ },
745
+ {
746
+ model: 'htmlU',
747
+ view: 'u',
748
+ coupledAttribute: 'underline',
749
+ attributeProperties: {
750
+ copyOnEnter: true,
751
+ isFormatting: true
752
+ }
753
+ },
754
+ {
755
+ model: 'htmlSub',
756
+ view: 'sub',
757
+ coupledAttribute: 'subscript',
758
+ attributeProperties: {
759
+ copyOnEnter: true,
760
+ isFormatting: true
761
+ }
762
+ },
763
+ {
764
+ model: 'htmlSup',
765
+ view: 'sup',
766
+ coupledAttribute: 'superscript',
767
+ attributeProperties: {
768
+ copyOnEnter: true,
769
+ isFormatting: true
770
+ }
771
+ },
772
+ {
773
+ model: 'htmlCode',
774
+ view: 'code',
775
+ coupledAttribute: 'code',
776
+ attributeProperties: {
777
+ copyOnEnter: true,
778
+ isFormatting: true
779
+ }
780
+ },
781
+ {
782
+ model: 'htmlMark',
783
+ view: 'mark',
784
+ attributeProperties: {
785
+ copyOnEnter: true,
786
+ isFormatting: true
787
+ }
788
+ },
789
+ {
790
+ model: 'htmlSpan',
791
+ view: 'span',
792
+ attributeProperties: {
793
+ copyOnEnter: true,
794
+ isFormatting: true
795
+ }
796
+ },
797
+ {
798
+ model: 'htmlCite',
799
+ view: 'cite',
800
+ attributeProperties: {
801
+ copyOnEnter: true,
802
+ isFormatting: true
803
+ }
804
+ },
805
+ {
806
+ model: 'htmlLabel',
807
+ view: 'label',
808
+ attributeProperties: {
809
+ copyOnEnter: true,
810
+ isFormatting: true
811
+ }
812
+ },
813
+ {
814
+ model: 'htmlDfn',
815
+ view: 'dfn',
816
+ attributeProperties: {
817
+ copyOnEnter: true,
818
+ isFormatting: true
819
+ }
820
+ },
821
+ // Objects.
822
+ {
823
+ model: 'htmlObject',
824
+ view: 'object',
825
+ isObject: true,
826
+ modelSchema: {
827
+ inheritAllFrom: '$inlineObject'
828
+ }
829
+ },
830
+ {
831
+ model: 'htmlIframe',
832
+ view: 'iframe',
833
+ isObject: true,
834
+ modelSchema: {
835
+ inheritAllFrom: '$inlineObject'
836
+ }
837
+ },
838
+ {
839
+ model: 'htmlInput',
840
+ view: 'input',
841
+ isObject: true,
842
+ modelSchema: {
843
+ inheritAllFrom: '$inlineObject'
844
+ }
845
+ },
846
+ {
847
+ model: 'htmlButton',
848
+ view: 'button',
849
+ isObject: true,
850
+ modelSchema: {
851
+ inheritAllFrom: '$inlineObject'
852
+ }
853
+ },
854
+ {
855
+ model: 'htmlTextarea',
856
+ view: 'textarea',
857
+ isObject: true,
858
+ modelSchema: {
859
+ inheritAllFrom: '$inlineObject'
860
+ }
861
+ },
862
+ {
863
+ model: 'htmlSelect',
864
+ view: 'select',
865
+ isObject: true,
866
+ modelSchema: {
867
+ inheritAllFrom: '$inlineObject'
868
+ }
869
+ },
870
+ {
871
+ model: 'htmlVideo',
872
+ view: 'video',
873
+ isObject: true,
874
+ modelSchema: {
875
+ inheritAllFrom: '$inlineObject'
876
+ }
877
+ },
878
+ {
879
+ model: 'htmlEmbed',
880
+ view: 'embed',
881
+ isObject: true,
882
+ modelSchema: {
883
+ inheritAllFrom: '$inlineObject'
884
+ }
885
+ },
886
+ {
887
+ model: 'htmlOembed',
888
+ view: 'oembed',
889
+ isObject: true,
890
+ modelSchema: {
891
+ inheritAllFrom: '$inlineObject'
892
+ }
893
+ },
894
+ {
895
+ model: 'htmlAudio',
896
+ view: 'audio',
897
+ isObject: true,
898
+ modelSchema: {
899
+ inheritAllFrom: '$inlineObject'
900
+ }
901
+ },
902
+ {
903
+ model: 'htmlImg',
904
+ view: 'img',
905
+ isObject: true,
906
+ modelSchema: {
907
+ inheritAllFrom: '$inlineObject'
908
+ }
909
+ },
910
+ {
911
+ model: 'htmlCanvas',
912
+ view: 'canvas',
913
+ isObject: true,
914
+ modelSchema: {
915
+ inheritAllFrom: '$inlineObject'
916
+ }
917
+ },
918
+ // TODO it could be probably represented as non-object element, although it has graphical representation,
919
+ // so probably makes more sense to keep it as an object.
920
+ {
921
+ model: 'htmlMeter',
922
+ view: 'meter',
923
+ isObject: true,
924
+ modelSchema: {
925
+ inheritAllFrom: '$inlineObject'
926
+ }
927
+ },
928
+ // TODO it could be probably represented as non-object element, although it has graphical representation,
929
+ // so probably makes more sense to keep it as an object.
930
+ {
931
+ model: 'htmlProgress',
932
+ view: 'progress',
933
+ isObject: true,
934
+ modelSchema: {
935
+ inheritAllFrom: '$inlineObject'
936
+ }
937
+ },
938
+ {
939
+ model: 'htmlScript',
940
+ view: 'script',
941
+ modelSchema: {
942
+ allowWhere: ['$text', '$block'],
943
+ isInline: true
944
+ }
945
+ },
946
+ {
947
+ model: 'htmlStyle',
948
+ view: 'style',
949
+ modelSchema: {
950
+ allowWhere: ['$text', '$block'],
951
+ isInline: true
952
+ }
953
+ },
954
+ {
955
+ model: 'htmlCustomElement',
956
+ view: '$customElement',
957
+ modelSchema: {
958
+ allowWhere: ['$text', '$block'],
959
+ allowAttributesOf: '$inlineObject',
960
+ isInline: true
961
+ }
962
+ }
963
+ ]
964
+ };