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