@instructure/canvas-rce 7.0.0 → 7.3.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 (152) hide show
  1. package/CHANGELOG.md +60 -1
  2. package/__tests__/common/indicate.test.js +5 -6
  3. package/es/bridge/Bridge.js +2 -4
  4. package/es/canvasFileBrowser/FileBrowser.js +2 -4
  5. package/es/defaultTinymceConfig.d.ts +1 -1
  6. package/es/defaultTinymceConfig.js +149 -114
  7. package/es/enhance-user-content/doc_previews.js +1 -14
  8. package/es/enhance-user-content/enhance_user_content.js +7 -1
  9. package/es/enhance-user-content/instructure_helper.js +4 -0
  10. package/es/enhance-user-content/youtube_overlay.d.ts +1 -0
  11. package/es/enhance-user-content/youtube_overlay.js +87 -0
  12. package/es/format-message.d.js +1 -0
  13. package/es/format-message.js +5 -0
  14. package/es/index.d.ts +2 -1
  15. package/es/index.js +2 -1
  16. package/es/rce/AlertMessageArea.d.ts +2 -2
  17. package/es/rce/AlertMessageArea.js +4 -6
  18. package/es/rce/RCE.d.ts +0 -1
  19. package/es/rce/RCE.js +5 -10
  20. package/es/rce/RCEGlobals.d.ts +2 -0
  21. package/es/rce/RCEGlobals.js +1 -0
  22. package/es/rce/RCEVariants.d.ts +8 -3
  23. package/es/rce/RCEVariants.js +31 -5
  24. package/es/rce/RCEWrapper.d.ts +16 -14
  25. package/es/rce/RCEWrapper.js +260 -244
  26. package/es/rce/RCEWrapperProps.d.ts +1 -1
  27. package/es/rce/ShowOnFocusButton/index.js +4 -2
  28. package/es/rce/StatusBar.js +61 -15
  29. package/es/rce/alertHandler.js +6 -7
  30. package/es/rce/plugins/instructure-ui-icons/plugin.js +2 -2
  31. package/es/rce/plugins/instructure_equation/EquationEditorModal/index.js +6 -10
  32. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Course.d.ts +5 -15
  33. package/es/rce/plugins/instructure_icon_maker/components/CreateIconMakerForm/ImageSection/Course.js +4 -10
  34. package/es/rce/plugins/instructure_image/ImageEmbedOptions.d.ts +7 -0
  35. package/es/rce/plugins/instructure_image/ImageEmbedOptions.js +45 -2
  36. package/es/rce/plugins/instructure_keyboard_shortcuts_header/clickCallback.d.ts +2 -0
  37. package/es/rce/plugins/instructure_keyboard_shortcuts_header/clickCallback.js +45 -0
  38. package/es/rce/plugins/instructure_keyboard_shortcuts_header/plugin.d.ts +1 -0
  39. package/es/rce/plugins/instructure_keyboard_shortcuts_header/plugin.js +43 -0
  40. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialog.d.ts +1 -8
  41. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialog.js +13 -33
  42. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.d.ts +1 -2
  43. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolDialog/ExternalToolDialogModal.js +2 -1
  44. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.d.ts +1 -1
  45. package/es/rce/plugins/instructure_rce_external_tools/components/ExternalToolSelectionDialog/ExternalToolSelectionDialog.js +25 -25
  46. package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.d.ts +1 -1
  47. package/es/rce/plugins/instructure_record/AudioOptionsTray/TrayController.js +2 -1
  48. package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.d.ts +1 -1
  49. package/es/rce/plugins/instructure_record/VideoOptionsTray/TrayController.js +2 -1
  50. package/es/rce/plugins/instructure_record/VideoOptionsTray/index.js +10 -7
  51. package/es/rce/plugins/instructure_record/mediaTranslations.js +1 -1
  52. package/es/rce/plugins/instructure_studio_media_options/plugin.js +109 -14
  53. package/es/rce/plugins/instructure_studio_media_options/studioToolbarIcons.d.ts +5 -0
  54. package/es/rce/plugins/instructure_studio_media_options/studioToolbarIcons.js +23 -0
  55. package/es/rce/plugins/instructure_wordcount_header/plugin.d.ts +1 -0
  56. package/es/rce/plugins/instructure_wordcount_header/plugin.js +75 -0
  57. package/es/rce/plugins/shared/ContentSelection.d.ts +1 -2
  58. package/es/rce/plugins/shared/ContentSelection.js +1 -18
  59. package/es/rce/plugins/shared/DimensionsInput/index.js +3 -3
  60. package/es/rce/plugins/shared/FixedContentTray.d.ts +7 -23
  61. package/es/rce/plugins/shared/FixedContentTray.js +7 -16
  62. package/es/rce/plugins/shared/ImageCropper/constants.d.ts +1 -1
  63. package/es/rce/plugins/shared/ImageCropper/constants.js +1 -1
  64. package/es/rce/plugins/shared/ImageCropper/controls/CustomNumberInput.js +1 -1
  65. package/es/rce/plugins/shared/PreviewIcon.js +1 -1
  66. package/es/rce/plugins/shared/StudioLtiSupportUtils.d.ts +9 -1
  67. package/es/rce/plugins/shared/StudioLtiSupportUtils.js +94 -1
  68. package/es/rce/plugins/shared/Upload/ComputerPanel.js +1 -1
  69. package/es/rce/plugins/shared/Upload/UploadFileModal.js +37 -4
  70. package/es/rce/plugins/shared/Upload/VideoUrlPanel.d.ts +15 -0
  71. package/es/rce/plugins/shared/Upload/VideoUrlPanel.js +51 -0
  72. package/es/rce/plugins/shared/Upload/videoValidationUtils.d.ts +7 -0
  73. package/es/rce/plugins/shared/Upload/videoValidationUtils.js +58 -0
  74. package/es/rce/plugins/shared/ai_tools/aiicons.d.ts +3 -3
  75. package/es/rce/plugins/shared/ai_tools/aiicons.js +11 -11
  76. package/es/rce/plugins/shared/iframeUtils.d.ts +1 -0
  77. package/es/rce/plugins/shared/iframeUtils.js +37 -0
  78. package/es/rce/plugins/tinymce-a11y-checker/components/checker.js +7 -1
  79. package/es/rce/plugins/tinymce-a11y-checker/utils/indicate.d.ts +1 -1
  80. package/es/rce/plugins/tinymce-a11y-checker/utils/indicate.js +1 -1
  81. package/es/rce/style.js +19 -17
  82. package/es/rce/tinyRCE.js +2 -0
  83. package/es/sidebar/actions/upload.d.ts +1 -0
  84. package/es/sidebar/actions/upload.js +56 -0
  85. package/es/sidebar/containers/sidebarHandlers.d.ts +1 -0
  86. package/es/sidebar/containers/sidebarHandlers.js +2 -1
  87. package/es/translations/locales/ar.js +44 -11
  88. package/es/translations/locales/ca.js +47 -14
  89. package/es/translations/locales/cy.js +44 -11
  90. package/es/translations/locales/da-x-k12.js +44 -11
  91. package/es/translations/locales/da.js +44 -11
  92. package/es/translations/locales/de.js +44 -11
  93. package/es/translations/locales/el.js +6 -0
  94. package/es/translations/locales/en-AU-x-unimelb.js +44 -11
  95. package/es/translations/locales/en-GB-x-ukhe.js +44 -11
  96. package/es/translations/locales/en.js +47 -11
  97. package/es/translations/locales/en_AU.js +44 -11
  98. package/es/translations/locales/en_CA.js +44 -11
  99. package/es/translations/locales/en_CY.js +44 -11
  100. package/es/translations/locales/en_GB.js +44 -11
  101. package/es/translations/locales/es.js +44 -11
  102. package/es/translations/locales/es_ES.js +44 -11
  103. package/es/translations/locales/fa_IR.js +6 -6
  104. package/es/translations/locales/fi.js +44 -11
  105. package/es/translations/locales/fr.js +44 -11
  106. package/es/translations/locales/fr_CA.js +49 -16
  107. package/es/translations/locales/ga.js +61 -28
  108. package/es/translations/locales/he.js +6 -0
  109. package/es/translations/locales/hi.js +44 -11
  110. package/es/translations/locales/ht.js +44 -11
  111. package/es/translations/locales/hu.js +6 -12
  112. package/es/translations/locales/hy.js +6 -0
  113. package/es/translations/locales/id.js +44 -11
  114. package/es/translations/locales/is.js +44 -11
  115. package/es/translations/locales/it.js +44 -11
  116. package/es/translations/locales/ja.js +44 -11
  117. package/es/translations/locales/ko.js +6 -0
  118. package/es/translations/locales/mi.js +44 -11
  119. package/es/translations/locales/ms.js +44 -11
  120. package/es/translations/locales/nb-x-k12.js +44 -11
  121. package/es/translations/locales/nb.js +44 -11
  122. package/es/translations/locales/nl.js +44 -11
  123. package/es/translations/locales/nn.js +6 -12
  124. package/es/translations/locales/pl.js +44 -11
  125. package/es/translations/locales/pt.js +44 -11
  126. package/es/translations/locales/pt_BR.js +44 -11
  127. package/es/translations/locales/ru.js +44 -11
  128. package/es/translations/locales/sl.js +44 -11
  129. package/es/translations/locales/sv-x-k12.js +44 -11
  130. package/es/translations/locales/sv.js +44 -11
  131. package/es/translations/locales/th.js +44 -11
  132. package/es/translations/locales/tr.js +6 -3
  133. package/es/translations/locales/uk_UA.js +6 -9
  134. package/es/translations/locales/vi.js +44 -11
  135. package/es/translations/locales/zh-Hans.js +44 -11
  136. package/es/translations/locales/zh-Hant.js +44 -11
  137. package/es/translations/locales/zh.js +44 -11
  138. package/es/translations/locales/zh_HK.js +44 -11
  139. package/es/util/contextHelper.d.ts +7 -0
  140. package/{testcafe/axe.test.js → es/util/contextHelper.js} +10 -21
  141. package/es/util/loadingPlaceholder.js +11 -11
  142. package/eslint.config.js +3 -25
  143. package/jest/jest-setup.js +27 -2
  144. package/jest.config.js +5 -1
  145. package/package.json +61 -84
  146. package/testcafe/RCEWrapper.test.js +0 -319
  147. package/testcafe/StatusBar.test.js +0 -108
  148. package/testcafe/enhanceUserContent.html +0 -58
  149. package/testcafe/enhanceUserContent.test.js +0 -44
  150. package/testcafe/entry.jsx +0 -77
  151. package/testcafe/testcafe.html +0 -14
  152. package/webpack.testcafe.config.js +0 -61
package/CHANGELOG.md CHANGED
@@ -5,13 +5,72 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 7.3.0 - 2025-10-16
9
+
10
+ ### Added
11
+ - Block Content Editor (BCE) support and improvements
12
+ - Media Embed by URL functionality
13
+ - A11y checker for block editor
14
+ - User choices to improved Studio toolbar options
15
+ - Feature flag for upcoming Studio embed improvements
16
+
17
+ ### Changed
18
+ - Upgrade to InstUI 10.26.2
19
+ - Unify image upload buttons
20
+ - Adjust the text block footer
21
+ - Remove documents from RCE's toolbar for BCE
22
+
23
+ ### Fixed
24
+ - Prevent setState from TinyMCE events after unmount
25
+ - Image upload modal for BCE
26
+ - Revert Alert conditional rendering
27
+ - Revert axios version upgrade
28
+
29
+ ### Removed
30
+ - Remove crocodoc from canvas
31
+
32
+ ### Localization
33
+ - Updated RCE translations for multiple locales
34
+
35
+ ## 7.2.0 - 2025-08-21
36
+
37
+ ### Added
38
+ - Block content editor RCE variant support
39
+ - YouTube video overlay
40
+ - Lightest colors and white included in color picker
41
+
42
+ ### Fixed
43
+ - Conditionally render screenReader-only Alert in RCEWrapper
44
+ - Canvas-rce translation warnings prevented
45
+ - Background color when RCE is fullscreen
46
+
47
+ ### Changed
48
+ - Upgraded to InstUI 10.24.2
49
+ - Upgraded crypto-es in canvas-rce package
50
+
51
+ ### Localization
52
+ - Updated RCE translations for multiple locales
53
+
54
+
55
+ ## 7.1.1 - 2025-07-08
56
+
57
+ ### Changed
58
+
59
+ - Change color_map to include tiny mce's default light colors and white
60
+
61
+ ## 7.1.0 - 2025-06-06
62
+
63
+ ### Changed
64
+
65
+ - Change color_map for more accessible default colors
66
+
8
67
  ## 7.0.0 - 2025-03-31
9
68
 
10
69
  ### Fixed
11
70
 
12
71
  - Screen readers for RCE toolbar on mobile platform
13
72
  - Axios CSRF vulnerability
14
- - Mailto link insertion
73
+ - Mailto link insertion
15
74
 
16
75
  ### Changed
17
76
 
@@ -16,14 +16,13 @@
16
16
  * with this program. If not, see <http://www.gnu.org/licenses/>.
17
17
  */
18
18
 
19
- import sinon from 'sinon'
20
19
  import indicate from '../../src/common/indicate'
21
20
 
22
21
  describe('indicate function', () => {
23
- let clock, region, margin, indicator
22
+ let region, margin, indicator
24
23
 
25
24
  beforeEach(() => {
26
- clock = sinon.useFakeTimers()
25
+ jest.useFakeTimers()
27
26
  region = {
28
27
  top: 10,
29
28
  left: 20,
@@ -36,7 +35,7 @@ describe('indicate function', () => {
36
35
  })
37
36
 
38
37
  afterEach(() => {
39
- clock.restore()
38
+ jest.useRealTimers()
40
39
  })
41
40
 
42
41
  it('appends a div to the body', () => {
@@ -44,7 +43,7 @@ describe('indicate function', () => {
44
43
  })
45
44
 
46
45
  it('removes the div after 2 seconds', () => {
47
- clock.tick(2000)
46
+ jest.advanceTimersByTime(2000)
48
47
  expect(indicator.parentNode).toBeNull()
49
48
  })
50
49
 
@@ -72,7 +71,7 @@ describe('indicate function', () => {
72
71
  })
73
72
 
74
73
  it('div has leave class after 900ms', () => {
75
- clock.tick(900)
74
+ jest.advanceTimersByTime(900)
76
75
  expect(/leave/.test(indicator.className)).toBeTruthy()
77
76
  })
78
77
 
@@ -41,6 +41,8 @@ export default class Bridge {
41
41
  console.warn('clicked sidebar link without a focused editor');
42
42
  }
43
43
  };
44
+ // insertFileLink is called from the FileBrowser when All files is chosen
45
+ // vs the above insertLink which is called from the other CanvasContentTray panels.
44
46
  this.insertFileLink = link => {
45
47
  const embedData = fileEmbed(link);
46
48
  if (embedData.type === 'image') {
@@ -192,10 +194,6 @@ export default class Bridge {
192
194
  }
193
195
  return false;
194
196
  }
195
-
196
- // insertFileLink is called from the FileBrowser when All files is chosen
197
- // vs the above insertLink which is called from the other CanvasContentTray panels.
198
-
199
197
  insertImage(image) {
200
198
  if (this.focusedEditor) {
201
199
  const result = this.focusedEditor.insertImage(image);
@@ -30,6 +30,8 @@ export const PENDING_MEDIA_ENTRY_ID = 'maybe';
30
30
  class FileBrowser extends React.Component {
31
31
  constructor(_props2) {
32
32
  super(_props2);
33
+ // Memoized function to fetch all subfolders
34
+ // of the given folder ID, handing pagination
33
35
  this.fetchSubFolders = _.memoize(id => {
34
36
  this.source.fetchBookmarkedData(this.source.fetchSubFolders.bind(this.source), {
35
37
  folderId: id,
@@ -214,10 +216,6 @@ class FileBrowser extends React.Component {
214
216
  this.populateCollectionsList([data], opts);
215
217
  this.getFolderData(data.id);
216
218
  }
217
-
218
- // Memoized function to fetch all subfolders
219
- // of the given folder ID, handing pagination
220
-
221
219
  fetchFiles(id) {
222
220
  this.source.fetchBookmarkedData(this.source.fetchFilesForFolder.bind(this.source), {
223
221
  searchString: this.props.searchString,
@@ -9,6 +9,7 @@ declare const defaultTinymceConfig: {
9
9
  menubar: undefined;
10
10
  menu: undefined;
11
11
  toolbar: undefined;
12
+ color_map: string[];
12
13
  plugins: undefined;
13
14
  branding: boolean;
14
15
  browser_spellcheck: boolean;
@@ -18,7 +19,6 @@ declare const defaultTinymceConfig: {
18
19
  language_load: boolean;
19
20
  language_url: string;
20
21
  toolbar_mode: string;
21
- toolbar_ticky: boolean;
22
22
  mobile: {
23
23
  theme: string;
24
24
  };
@@ -58,6 +58,42 @@ const defaultTinymceConfig = {
58
58
  menu: undefined,
59
59
  // any toolbar data here will be merged into the standard toolbars
60
60
  toolbar: undefined,
61
+ color_map: [
62
+ // First row
63
+ // tiny mce's default first row colors
64
+ '#BFEDD2', 'Light Green', '#FBEEB8', 'Light Orange', '#F8CAC6', 'Light Red', '#ECCAFA', 'Light Purple', '#C2E0F4', 'Light Blue',
65
+ // Second row
66
+ '#03893D',
67
+ // InstUI Green45
68
+ 'Green', '#CF4A00',
69
+ // InstUI Orange45
70
+ 'Orange', '#E62429',
71
+ // InstUI Red45
72
+ 'Red', '#9E58BD',
73
+ // InstUI Violet45
74
+ 'Purple', '#2B7ABC',
75
+ // InstUI Blue45
76
+ 'Blue',
77
+ // Third row
78
+ '#027634',
79
+ // InstUI Green57
80
+ 'Dark Green', '#B34000',
81
+ // InstUI Orange57
82
+ 'Dark Orange', '#C71F23',
83
+ // InstUI Red57
84
+ 'Dark Red', '#9242B4',
85
+ // InstUI Violet57
86
+ 'Dark Purple', '#0E68B3',
87
+ // InstUI Blue57
88
+ 'Dark Blue',
89
+ // Fourth row
90
+ '#FFFFFF', 'White', '#6A7883',
91
+ // InstUI Grey45
92
+ 'Light Gray', '#3F515E',
93
+ // InstUI Grey82
94
+ 'Gray', '#273540',
95
+ // InstUI Grey125
96
+ 'Dark Gray', '#000000', 'Black'],
61
97
  // plugins included here will be added to the standard set
62
98
  plugins: undefined,
63
99
  // ==================================================================================
@@ -69,11 +105,10 @@ const defaultTinymceConfig = {
69
105
  content_style: '',
70
106
  convert_urls: false,
71
107
  // fonts specified here need to either be web-safe or self-hosted and loaded in app/stylesheets/bundles/fonts.scss
72
- font_formats: "Lato Extended=Lato Extended,Helvetica Neue,Helvetica,Arial,sans-serif; Balsamiq Sans=Balsamiq Sans,Lato Extended,Helvetica Neue,Helvetica,Arial,sans-serif; Architect's Daughter=Architects Daughter,Lato Extended,Helvetica Neue,Helvetica,Arial,sans-serif; Arial=arial,helvetica,sans-serif; Arial Black=arial black,avant garde; Courier New=courier new,courier; Georgia=georgia,palatino; Tahoma=tahoma,arial,helvetica,sans-serif; Times New Roman=times new roman,times; Trebuchet MS=trebuchet ms,geneva; Verdana=verdana,geneva",
108
+ font_formats: "Lato Extended=Lato Extended,Helvetica Neue,Helvetica,Arial,sans-serif; Balsamiq Sans=Balsamiq Sans,Lato Extended,Helvetica Neue,Helvetica,Arial,sans-serif; Architect's Daughter=Architects Daughter,Lato Extended,Helvetica Neue,Helvetica,Arial,sans-serif; Arial=arial,helvetica,sans-serif; Arial Black=arial black,avant garde; Courier New=courier new,courier; Georgia=georgia,palatino; Tahoma=tahoma,arial,helvetica,sans-serif; Times New Roman=times new roman,times; Trebuchet MS=trebuchet ms,geneva; Verdana=verdana,geneva; Open Dyslexic=OpenDyslexic; Open Dyslexic Mono=OpenDyslexicMono, Monaco, Menlo, Consolas, Courier New, monospace;",
73
109
  language_load: false,
74
110
  language_url: 'none',
75
111
  toolbar_mode: 'floating',
76
- toolbar_ticky: true,
77
112
  mobile: {
78
113
  theme: 'silver'
79
114
  },
@@ -92,151 +127,151 @@ const defaultTinymceConfig = {
92
127
  // this list needs to be kept in sync with the list in gems/canvas_sanitize/lib/canvas_sanitize/canvas_sanitize.rb
93
128
  valid_elements: elemsToTinyStringConfig({
94
129
  '@': ['id', 'class', 'style', 'title', 'dir<ltr?rtl', 'lang', 'xml::lang', 'role'],
95
- 'a': ['rel', 'rev', 'charset', 'hreflang', 'tabindex', 'accesskey', 'type', 'name', 'href', 'target', 'title', 'class', 'data-old-link'],
130
+ a: ['rel', 'rev', 'charset', 'hreflang', 'tabindex', 'accesskey', 'type', 'name', 'href', 'target', 'title', 'class', 'data-old-link'],
96
131
  'strong/b': [],
97
132
  'em/i': [],
98
133
  'strike/s': [],
99
- 'u': [],
134
+ u: [],
100
135
  '#p': [],
101
136
  '-ol': ['type', 'compact'],
102
137
  '-ul': ['type', 'compact'],
103
138
  '-li': [],
104
- 'br': [],
105
- 'img': ['longdesc', 'usemap', 'src', 'border', 'alt', 'title', 'hspace', 'vspace', 'width', 'height', 'align', 'role', 'data-old-link'],
139
+ br: [],
140
+ img: ['longdesc', 'usemap', 'src', 'border', 'alt', 'title', 'hspace', 'vspace', 'width', 'height', 'align', 'role', 'data-old-link'],
106
141
  '-sub': [],
107
142
  '-sup': [],
108
143
  '-blockquote': ['cite'],
109
144
  '-table': [{
110
- 'border': '0'
145
+ border: '0'
111
146
  }, 'cellspacing', 'cellpadding', 'width', 'frame', 'rules', 'height', 'align', 'summary', 'bgcolor', 'background', 'bordercolor'],
112
147
  '-tr': ['rowspan', 'width', 'height', 'align', 'valign', 'bgcolor', 'background', 'bordercolor'],
113
- 'tbody': [],
114
- 'thead': [],
115
- 'tfoot': [],
148
+ tbody: [],
149
+ thead: [],
150
+ tfoot: [],
116
151
  '#td': ['colspan', 'rowspan', 'width', 'height', 'align', 'valign', 'bgcolor', 'background', 'bordercolor', 'scope'],
117
152
  '#th': ['colspan', 'rowspan', 'width', 'height', 'align', 'valign', 'scope'],
118
- 'caption': [],
153
+ caption: [],
119
154
  '-div': [],
120
155
  '-span': [],
121
156
  '-code': [],
122
157
  '-pre': [],
123
- 'address': [],
158
+ address: [],
124
159
  '-h1': [],
125
160
  '-h2': [],
126
161
  '-h3': [],
127
162
  '-h4': [],
128
163
  '-h5': [],
129
164
  '-h6': [],
130
- 'hr': ['size', 'noshade'],
165
+ hr: ['size', 'noshade'],
131
166
  '-font': ['face', 'size', 'color'],
132
- 'dd': [],
133
- 'dl': [],
134
- 'dt': [],
135
- 'cite': [],
136
- 'abbr': [],
137
- 'acronym': [],
138
- 'del': ['datetime', 'cite'],
139
- 'ins': ['datetime', 'cite'],
140
- 'object': ['classid', 'width', 'height', 'codebase', '*'],
141
- 'param': ['name', 'value', '_value'],
142
- 'embed': ['type', 'width', 'height', 'src', '*'],
143
- 'map': ['name'],
144
- 'area': ['shape', 'coords', 'href', 'alt', 'target'],
145
- 'bdo': [],
146
- 'col': ['align', 'char', 'charoff', 'span', 'valign', 'width'],
147
- 'colgroup': ['align', 'char', 'charoff', 'span', 'valign', 'width'],
148
- 'dfn': [],
149
- 'kbd': [],
150
- 'q': ['cite'],
151
- 'samp': [],
152
- 'small': [],
153
- 'tt': [],
154
- 'var': [],
155
- 'big': [],
156
- 'figure': [],
157
- 'figcaption': [],
158
- 'source': ['media', 'width', 'height', 'sizes', 'src', 'srcset', 'type', 'data-old-link'],
159
- 'track': [],
160
- 'mark': [],
161
- 'article': [],
162
- 'aside': [],
163
- 'details': [],
164
- 'footer': [],
165
- 'header': [],
166
- 'nav': [],
167
- 'section': [],
168
- 'summary': [],
169
- 'time': []
167
+ dd: [],
168
+ dl: [],
169
+ dt: [],
170
+ cite: [],
171
+ abbr: [],
172
+ acronym: [],
173
+ del: ['datetime', 'cite'],
174
+ ins: ['datetime', 'cite'],
175
+ object: ['classid', 'width', 'height', 'codebase', '*'],
176
+ param: ['name', 'value', '_value'],
177
+ embed: ['type', 'width', 'height', 'src', '*'],
178
+ map: ['name'],
179
+ area: ['shape', 'coords', 'href', 'alt', 'target'],
180
+ bdo: [],
181
+ col: ['align', 'char', 'charoff', 'span', 'valign', 'width'],
182
+ colgroup: ['align', 'char', 'charoff', 'span', 'valign', 'width'],
183
+ dfn: [],
184
+ kbd: [],
185
+ q: ['cite'],
186
+ samp: [],
187
+ small: [],
188
+ tt: [],
189
+ var: [],
190
+ big: [],
191
+ figure: [],
192
+ figcaption: [],
193
+ source: ['media', 'width', 'height', 'sizes', 'src', 'srcset', 'type', 'data-old-link'],
194
+ track: [],
195
+ mark: [],
196
+ article: [],
197
+ aside: [],
198
+ details: [],
199
+ footer: [],
200
+ header: [],
201
+ nav: [],
202
+ section: [],
203
+ summary: [],
204
+ time: []
170
205
  }),
171
206
  extended_valid_elements: elemsToTinyStringConfig({
172
207
  '@': ['id', 'accesskey', 'class', 'dir', 'lang', 'style', 'tabindex', 'title', 'contenteditable', 'contextmenu', 'draggable', 'dropzone', 'hidden', 'longdesc', 'spellcheck', 'translate', 'align', 'role', 'aria-labelledby', 'aria-atomic', 'aria-busy', 'aria-controls', 'aria-describedby', 'aria-description', 'aria-disabled', 'aria-dropeffect', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-label', 'aria-labelledby', 'aria-live', 'aria-owns', 'aria-relevant', 'aria-autocomplete', 'aria-checked', 'aria-disabled', 'aria-expanded', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-label', 'aria-level', 'aria-multiline', 'aria-multiselectable', 'aria-orientation', 'aria-pressed', 'aria-readonly', 'aria-required', 'aria-selected', 'aria-sort', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext'],
173
- 'iframe': ['id', 'data-media-type', 'title', 'src', 'width', 'height', 'name', 'align', 'style', 'class', 'sandbox', 'loading', 'allowfullscreen', 'webkitallowfullscreen', 'mozallowfullscreen', 'allow', 'data-old-link'],
174
- 'i': ['iclass'],
175
- 'a': ['hidden', 'href', 'target', 'rel', 'media', 'hreflang', 'type', 'charset', 'name', 'rev', 'shape', 'coords', 'download', 'alt'],
208
+ iframe: ['id', 'data-media-type', 'title', 'src', 'width', 'height', 'name', 'align', 'style', 'class', 'sandbox', 'loading', 'allowfullscreen', 'webkitallowfullscreen', 'mozallowfullscreen', 'allow', 'data-old-link'],
209
+ i: ['iclass'],
210
+ a: ['hidden', 'href', 'target', 'rel', 'media', 'hreflang', 'type', 'charset', 'name', 'rev', 'shape', 'coords', 'download', 'alt'],
176
211
  '#p': [],
177
- 'li': ['value'],
212
+ li: ['value'],
178
213
  '-ol': ['reversed', 'start', 'type', 'compact'],
179
- 'pre': ['width'],
180
- 'table': ['border', 'summary', 'width', 'frame', 'rules', 'cellspacing', 'cellpadding', 'bgcolor'],
181
- 'tbody': ['char', 'charoff', 'valign'],
182
- 'td': ['colspan', 'rowspan', 'headers', 'abbr', 'axis', 'scope', 'align', 'char', 'charoff', 'valign', 'nowrap', 'bgcolor', 'width', 'height'],
183
- 'tfoot': ['char', 'charoff', 'valign'],
184
- 'th': ['colspan', 'rowspan', 'headers', 'scope', 'abbr', 'axis', 'align', 'char', 'charoff', 'valign', 'nowrap', 'bgcolor', 'width', 'height'],
185
- 'thead': ['char', 'charoff', 'valign'],
186
- 'tr': ['char', 'charoff', 'valign', 'bgcolor'],
214
+ pre: ['width'],
215
+ table: ['border', 'summary', 'width', 'frame', 'rules', 'cellspacing', 'cellpadding', 'bgcolor'],
216
+ tbody: ['char', 'charoff', 'valign'],
217
+ td: ['colspan', 'rowspan', 'headers', 'abbr', 'axis', 'scope', 'align', 'char', 'charoff', 'valign', 'nowrap', 'bgcolor', 'width', 'height'],
218
+ tfoot: ['char', 'charoff', 'valign'],
219
+ th: ['colspan', 'rowspan', 'headers', 'scope', 'abbr', 'axis', 'align', 'char', 'charoff', 'valign', 'nowrap', 'bgcolor', 'width', 'height'],
220
+ thead: ['char', 'charoff', 'valign'],
221
+ tr: ['char', 'charoff', 'valign', 'bgcolor'],
187
222
  '-ul': ['compact'],
188
- 'video': ['name', 'src', 'allowfullscreen', 'muted', 'poster', 'width', 'height', 'controls', 'playsinline'],
189
- 'audio': ['name', 'src', 'muted', 'controls'],
190
- 'annotation': ['href', 'xref', 'definitionURL', 'encoding', 'cd', 'name', 'src'],
223
+ video: ['name', 'src', 'allowfullscreen', 'muted', 'poster', 'width', 'height', 'controls', 'playsinline'],
224
+ audio: ['name', 'src', 'muted', 'controls'],
225
+ annotation: ['href', 'xref', 'definitionURL', 'encoding', 'cd', 'name', 'src'],
191
226
  'annotation-xml': ['href', 'xref', 'definitionURL', 'encoding', 'cd', 'name', 'src'],
192
- 'maction': ['href', 'xref', 'mathcolor', 'mathbackground', 'actiontype', 'selection'],
193
- 'maligngroup': ['href', 'xref', 'mathcolor', 'mathbackground', 'groupalign'],
194
- 'malignmark': ['href', 'xref', 'mathcolor', 'mathbackground', 'edge'],
195
- 'math': ['xmlns', 'href', 'xref', 'display', 'maxwidth', 'overflow', 'altimg', 'altimg-width', 'altimg-height', 'altimg-valign', 'alttext', 'cdgroup', 'mathcolor', 'mathbackground', 'scriptlevel', 'displaystyle', 'scriptsizemultiplier', 'scriptminsize', 'infixlinebreakstyle', 'decimalpoint', 'mathvariant', 'mathsize', 'width', 'height', 'valign', 'form', 'fence', 'separator', 'lspace', 'rspace', 'stretchy', 'symmetric', 'maxsize', 'minsize', 'largeop', 'movablelimits', 'accent', 'linebreak', 'lineleading', 'linebreakstyle', 'linebreakmultchar', 'indentalign', 'indentshift', 'indenttarget', 'indentalignfirst', 'indentshiftfirst', 'indentalignlast', 'indentshiftlast', 'depth', 'lquote', 'rquote', 'linethickness', 'munalign', 'denomalign', 'bevelled', 'voffset', 'open', 'close', 'separators', 'notation', 'subscriptshift', 'superscriptshift', 'accentunder', 'align', 'rowalign', 'columnalign', 'groupalign', 'alignmentscope', 'columnwidth', 'rowspacing', 'columnspacing', 'rowlines', 'columnlines', 'frame', 'framespacing', 'equalrows', 'equalcolumns', 'side', 'minlabelspacing', 'rowspan', 'columnspan', 'edge', 'stackalign', 'charalign', 'charspacing', 'longdivstyle', 'position', 'shift', 'location', 'crossout', 'length', 'leftoverhang', 'rightoverhang', 'mslinethickness', 'selection'],
196
- 'menclose': ['href', 'xref', 'mathcolor', 'mathbackground', 'notation'],
197
- 'merror': ['href', 'xref', 'mathcolor', 'mathbackground'],
198
- 'mfenced': ['href', 'xref', 'mathcolor', 'mathbackground', 'open', 'close', 'separators'],
199
- 'mfrac': ['href', 'xref', 'mathcolor', 'mathbackground', 'linethickness', 'munalign', 'denomalign', 'bevelled'],
200
- 'mglyph': ['href', 'xref', 'mathcolor', 'mathbackground', 'src', 'alt', 'width', 'height', 'valign'],
201
- 'mi': ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize'],
202
- 'mlabeledtr': ['href', 'xref', 'mathcolor', 'mathbackground'],
203
- 'mlongdiv': ['href', 'xref', 'mathcolor', 'mathbackground', 'longdivstyle', 'align', 'stackalign', 'charalign', 'charspacing'],
204
- 'mmultiscripts': ['href', 'xref', 'mathcolor', 'mathbackground', 'subscriptshift', 'superscriptshift'],
205
- 'mn': ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize'],
206
- 'mo': ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize', 'form', 'fence', 'separator', 'lspace', 'rspace', 'stretchy', 'symmetric', 'maxsize', 'minsize', 'largeop', 'movablelimits', 'accent', 'linebreak', 'lineleading', 'linebreakstyle', 'linebreakmultchar', 'indentalign', 'indentshift', 'indenttarget', 'indentalignfirst', 'indentshiftfirst', 'indentalignlast', 'indentshiftlast'],
207
- 'mover': ['href', 'xref', 'mathcolor', 'mathbackground', 'accent', 'align'],
208
- 'mpadded': ['href', 'xref', 'mathcolor', 'mathbackground', 'height', 'depth', 'width', 'lspace', 'voffset'],
209
- 'mphantom': ['href', 'xref', 'mathcolor', 'mathbackground'],
210
- 'mprescripts': ['href', 'xref', 'mathcolor', 'mathbackground'],
211
- 'mroot': ['href', 'xref', 'mathcolor', 'mathbackground'],
212
- 'mrow': ['href', 'xref', 'mathcolor', 'mathbackground'],
213
- 'ms': ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize', 'lquote', 'rquote'],
214
- 'mscarries': ['href', 'xref', 'mathcolor', 'mathbackground', 'position', 'location', 'crossout', 'scriptsizemultiplier'],
215
- 'mscarry': ['href', 'xref', 'mathcolor', 'mathbackground', 'location', 'crossout'],
216
- 'msgroup': ['href', 'xref', 'mathcolor', 'mathbackground', 'position', 'shift'],
217
- 'msline': ['href', 'xref', 'mathcolor', 'mathbackground', 'position', 'length', 'leftoverhang', 'rightoverhang', 'mslinethickness'],
218
- 'mspace': ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize'],
219
- 'msqrt': ['href', 'xref', 'mathcolor', 'mathbackground'],
220
- 'msrow': ['href', 'xref', 'mathcolor', 'mathbackground', 'position'],
221
- 'mstack': ['href', 'xref', 'mathcolor', 'mathbackground', 'align', 'stackalign', 'charalign', 'charspacing'],
222
- 'mstyle': ['href', 'xref', 'mathcolor', 'mathbackground', 'scriptlevel', 'displaystyle', 'scriptsizemultiplier', 'scriptminsize', 'infixlinebreakstyle', 'decimalpoint', 'mathvariant', 'mathsize', 'width', 'height', 'valign', 'form', 'fence', 'separator', 'lspace', 'rspace', 'stretchy', 'symmetric', 'maxsize', 'minsize', 'largeop', 'movablelimits', 'accent', 'linebreak', 'lineleading', 'linebreakstyle', 'linebreakmultchar', 'indentalign', 'indentshift', 'indenttarget', 'indentalignfirst', 'indentshiftfirst', 'indentalignlast', 'indentshiftlast', 'depth', 'lquote', 'rquote', 'linethickness', 'munalign', 'denomalign', 'bevelled', 'voffset', 'open', 'close', 'separators', 'notation', 'subscriptshift', 'superscriptshift', 'accentunder', 'align', 'rowalign', 'columnalign', 'groupalign', 'alignmentscope', 'columnwidth', 'rowspacing', 'columnspacing', 'rowlines', 'columnlines', 'frame', 'framespacing', 'equalrows', 'equalcolumns', 'side', 'minlabelspacing', 'rowspan', 'columnspan', 'edge', 'stackalign', 'charalign', 'charspacing', 'longdivstyle', 'position', 'shift', 'location', 'crossout', 'length', 'leftoverhang', 'rightoverhang', 'mslinethickness', 'selection'],
223
- 'msub': ['href', 'xref', 'mathcolor', 'mathbackground', 'subscriptshift'],
224
- 'msubsup': ['href', 'xref', 'mathcolor', 'mathbackground', 'subscriptshift', 'superscriptshift'],
225
- 'msup': ['href', 'xref', 'mathcolor', 'mathbackground', 'superscriptshift'],
226
- 'mtable': ['href', 'xref', 'mathcolor', 'mathbackground', 'align', 'rowalign', 'columnalign', 'groupalign', 'alignmentscope', 'columnwidth', 'width', 'rowspacing', 'columnspacing', 'rowlines', 'columnlines', 'frame', 'framespacing', 'equalrows', 'equalcolumns', 'displaystyle', 'side', 'minlabelspacing'],
227
- 'mtd': ['href', 'xref', 'mathcolor', 'mathbackground', 'rowspan', 'columnspan', 'rowalign', 'columnalign', 'groupalign'],
228
- 'mtext': ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize', 'width', 'height', 'depth', 'linebreak'],
229
- 'mtr': ['href', 'xref', 'mathcolor', 'mathbackground', 'rowalign', 'columnalign', 'groupalign'],
230
- 'munder': ['href', 'xref', 'mathcolor', 'mathbackground', 'accentunder', 'align'],
231
- 'munderover': ['href', 'xref', 'mathcolor', 'mathbackground', 'accent', 'accentunder', 'align'],
232
- 'none': ['href', 'xref', 'mathcolor', 'mathbackground'],
233
- 'semantics': ['href', 'xref', 'definitionURL', 'encoding'],
234
- 'picture': [],
235
- 'ruby': [],
236
- 'rp': [],
237
- 'rt': [],
238
- 'g': ['*'],
239
- 'circle': ['*']
227
+ maction: ['href', 'xref', 'mathcolor', 'mathbackground', 'actiontype', 'selection'],
228
+ maligngroup: ['href', 'xref', 'mathcolor', 'mathbackground', 'groupalign'],
229
+ malignmark: ['href', 'xref', 'mathcolor', 'mathbackground', 'edge'],
230
+ math: ['xmlns', 'href', 'xref', 'display', 'maxwidth', 'overflow', 'altimg', 'altimg-width', 'altimg-height', 'altimg-valign', 'alttext', 'cdgroup', 'mathcolor', 'mathbackground', 'scriptlevel', 'displaystyle', 'scriptsizemultiplier', 'scriptminsize', 'infixlinebreakstyle', 'decimalpoint', 'mathvariant', 'mathsize', 'width', 'height', 'valign', 'form', 'fence', 'separator', 'lspace', 'rspace', 'stretchy', 'symmetric', 'maxsize', 'minsize', 'largeop', 'movablelimits', 'accent', 'linebreak', 'lineleading', 'linebreakstyle', 'linebreakmultchar', 'indentalign', 'indentshift', 'indenttarget', 'indentalignfirst', 'indentshiftfirst', 'indentalignlast', 'indentshiftlast', 'depth', 'lquote', 'rquote', 'linethickness', 'munalign', 'denomalign', 'bevelled', 'voffset', 'open', 'close', 'separators', 'notation', 'subscriptshift', 'superscriptshift', 'accentunder', 'align', 'rowalign', 'columnalign', 'groupalign', 'alignmentscope', 'columnwidth', 'rowspacing', 'columnspacing', 'rowlines', 'columnlines', 'frame', 'framespacing', 'equalrows', 'equalcolumns', 'side', 'minlabelspacing', 'rowspan', 'columnspan', 'edge', 'stackalign', 'charalign', 'charspacing', 'longdivstyle', 'position', 'shift', 'location', 'crossout', 'length', 'leftoverhang', 'rightoverhang', 'mslinethickness', 'selection'],
231
+ menclose: ['href', 'xref', 'mathcolor', 'mathbackground', 'notation'],
232
+ merror: ['href', 'xref', 'mathcolor', 'mathbackground'],
233
+ mfenced: ['href', 'xref', 'mathcolor', 'mathbackground', 'open', 'close', 'separators'],
234
+ mfrac: ['href', 'xref', 'mathcolor', 'mathbackground', 'linethickness', 'munalign', 'denomalign', 'bevelled'],
235
+ mglyph: ['href', 'xref', 'mathcolor', 'mathbackground', 'src', 'alt', 'width', 'height', 'valign'],
236
+ mi: ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize'],
237
+ mlabeledtr: ['href', 'xref', 'mathcolor', 'mathbackground'],
238
+ mlongdiv: ['href', 'xref', 'mathcolor', 'mathbackground', 'longdivstyle', 'align', 'stackalign', 'charalign', 'charspacing'],
239
+ mmultiscripts: ['href', 'xref', 'mathcolor', 'mathbackground', 'subscriptshift', 'superscriptshift'],
240
+ mn: ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize'],
241
+ mo: ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize', 'form', 'fence', 'separator', 'lspace', 'rspace', 'stretchy', 'symmetric', 'maxsize', 'minsize', 'largeop', 'movablelimits', 'accent', 'linebreak', 'lineleading', 'linebreakstyle', 'linebreakmultchar', 'indentalign', 'indentshift', 'indenttarget', 'indentalignfirst', 'indentshiftfirst', 'indentalignlast', 'indentshiftlast'],
242
+ mover: ['href', 'xref', 'mathcolor', 'mathbackground', 'accent', 'align'],
243
+ mpadded: ['href', 'xref', 'mathcolor', 'mathbackground', 'height', 'depth', 'width', 'lspace', 'voffset'],
244
+ mphantom: ['href', 'xref', 'mathcolor', 'mathbackground'],
245
+ mprescripts: ['href', 'xref', 'mathcolor', 'mathbackground'],
246
+ mroot: ['href', 'xref', 'mathcolor', 'mathbackground'],
247
+ mrow: ['href', 'xref', 'mathcolor', 'mathbackground'],
248
+ ms: ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize', 'lquote', 'rquote'],
249
+ mscarries: ['href', 'xref', 'mathcolor', 'mathbackground', 'position', 'location', 'crossout', 'scriptsizemultiplier'],
250
+ mscarry: ['href', 'xref', 'mathcolor', 'mathbackground', 'location', 'crossout'],
251
+ msgroup: ['href', 'xref', 'mathcolor', 'mathbackground', 'position', 'shift'],
252
+ msline: ['href', 'xref', 'mathcolor', 'mathbackground', 'position', 'length', 'leftoverhang', 'rightoverhang', 'mslinethickness'],
253
+ mspace: ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize'],
254
+ msqrt: ['href', 'xref', 'mathcolor', 'mathbackground'],
255
+ msrow: ['href', 'xref', 'mathcolor', 'mathbackground', 'position'],
256
+ mstack: ['href', 'xref', 'mathcolor', 'mathbackground', 'align', 'stackalign', 'charalign', 'charspacing'],
257
+ mstyle: ['href', 'xref', 'mathcolor', 'mathbackground', 'scriptlevel', 'displaystyle', 'scriptsizemultiplier', 'scriptminsize', 'infixlinebreakstyle', 'decimalpoint', 'mathvariant', 'mathsize', 'width', 'height', 'valign', 'form', 'fence', 'separator', 'lspace', 'rspace', 'stretchy', 'symmetric', 'maxsize', 'minsize', 'largeop', 'movablelimits', 'accent', 'linebreak', 'lineleading', 'linebreakstyle', 'linebreakmultchar', 'indentalign', 'indentshift', 'indenttarget', 'indentalignfirst', 'indentshiftfirst', 'indentalignlast', 'indentshiftlast', 'depth', 'lquote', 'rquote', 'linethickness', 'munalign', 'denomalign', 'bevelled', 'voffset', 'open', 'close', 'separators', 'notation', 'subscriptshift', 'superscriptshift', 'accentunder', 'align', 'rowalign', 'columnalign', 'groupalign', 'alignmentscope', 'columnwidth', 'rowspacing', 'columnspacing', 'rowlines', 'columnlines', 'frame', 'framespacing', 'equalrows', 'equalcolumns', 'side', 'minlabelspacing', 'rowspan', 'columnspan', 'edge', 'stackalign', 'charalign', 'charspacing', 'longdivstyle', 'position', 'shift', 'location', 'crossout', 'length', 'leftoverhang', 'rightoverhang', 'mslinethickness', 'selection'],
258
+ msub: ['href', 'xref', 'mathcolor', 'mathbackground', 'subscriptshift'],
259
+ msubsup: ['href', 'xref', 'mathcolor', 'mathbackground', 'subscriptshift', 'superscriptshift'],
260
+ msup: ['href', 'xref', 'mathcolor', 'mathbackground', 'superscriptshift'],
261
+ mtable: ['href', 'xref', 'mathcolor', 'mathbackground', 'align', 'rowalign', 'columnalign', 'groupalign', 'alignmentscope', 'columnwidth', 'width', 'rowspacing', 'columnspacing', 'rowlines', 'columnlines', 'frame', 'framespacing', 'equalrows', 'equalcolumns', 'displaystyle', 'side', 'minlabelspacing'],
262
+ mtd: ['href', 'xref', 'mathcolor', 'mathbackground', 'rowspan', 'columnspan', 'rowalign', 'columnalign', 'groupalign'],
263
+ mtext: ['href', 'xref', 'mathcolor', 'mathbackground', 'mathvariant', 'mathsize', 'width', 'height', 'depth', 'linebreak'],
264
+ mtr: ['href', 'xref', 'mathcolor', 'mathbackground', 'rowalign', 'columnalign', 'groupalign'],
265
+ munder: ['href', 'xref', 'mathcolor', 'mathbackground', 'accentunder', 'align'],
266
+ munderover: ['href', 'xref', 'mathcolor', 'mathbackground', 'accent', 'accentunder', 'align'],
267
+ none: ['href', 'xref', 'mathcolor', 'mathbackground'],
268
+ semantics: ['href', 'xref', 'definitionURL', 'encoding'],
269
+ picture: [],
270
+ ruby: [],
271
+ rp: [],
272
+ rt: [],
273
+ g: ['*'],
274
+ circle: ['*']
240
275
  }),
241
276
  non_empty_elements: 'td th iframe video audio object script a i area base basefont br col frame hr img input isindex link meta param embed source wbr track ruby',
242
277
  // tiny's external link create/edit dialog config
@@ -106,20 +106,7 @@ export function loadDocPreview($container, options) {
106
106
  });
107
107
  }
108
108
  }
109
- if (opts.crocodoc_session_url) {
110
- const sanitizedUrl = sanitizeUrl(opts.crocodoc_session_url);
111
- const iframe = document.createElement('iframe');
112
- iframe.setAttribute('src', sanitizedUrl);
113
- iframe.setAttribute('width', opts.width);
114
- iframe.setAttribute('height', opts.height);
115
- iframe.setAttribute('allowfullscreen', '1');
116
- iframe.id = opts.id;
117
- $container.appendChild(iframe);
118
- iframe.load(() => {
119
- tellAppIViewedThisInline('crocodoc');
120
- if (typeof opts.ready === 'function') opts.ready();
121
- });
122
- } else if (opts.canvadoc_session_url) {
109
+ if (opts.canvadoc_session_url) {
123
110
  const canvadocWrapper = document.createElement('div');
124
111
  canvadocWrapper.setAttribute('style', 'overflow: auto; resize: vertical; border: 1px solid transparent; height: 100%;');
125
112
  $container.appendChild(canvadocWrapper);
@@ -25,6 +25,7 @@ import { addParentFrameContextToUrl } from '../rce/plugins/instructure_rce_exter
25
25
  import { MathJaxDirective, Mathml } from './mathml';
26
26
  import { makeExternalLinkIcon } from './external_links';
27
27
  import getTranslations from '../getTranslations';
28
+ import { createOverlay } from './youtube_overlay';
28
29
 
29
30
  // in jest the es directory doesn't exist so stub the undefined svg
30
31
  const IconDownloadSVG = IconDownloadLine?.src || '<svg></svg>';
@@ -141,7 +142,8 @@ export function enhanceUserContent(container = document, opts = {}) {
141
142
  /**
142
143
  * Contingency plan in case new instfs media links cause problems in rich content.
143
144
  */
144
- replaceInstFSLinksWithOldLinks
145
+ replaceInstFSLinksWithOldLinks,
146
+ showYoutubeAdOverlay
145
147
  } = opts;
146
148
  getTranslations(locale).then(() => {
147
149
  formatMessage.setup({
@@ -155,6 +157,10 @@ export function enhanceUserContent(container = document, opts = {}) {
155
157
  canvasOrigin,
156
158
  disableGooglePreviews
157
159
  });
160
+ if (showYoutubeAdOverlay) {
161
+ const youtubeIframes = content.querySelectorAll(['.user_content:not(.enhanced) iframe[src*="youtube.com/embed/"]', '.user_content:not(.enhanced) iframe[src*="youtube-nocookie.com/embed/"]'].join(', '));
162
+ createOverlay(youtubeIframes);
163
+ }
158
164
  content.querySelectorAll('.user_content:not(.enhanced)').forEach(elem => {
159
165
  elem.classList.add('unenhanced');
160
166
  explicit_latex_typesetting && elem.classList.add(MathJaxDirective.Process);
@@ -93,6 +93,7 @@ export function showFilePreviewInOverlay(event, canvasOrigin) {
93
93
  const verifier = url?.searchParams.get('verifier');
94
94
  const access_token = url?.searchParams.get('access_token');
95
95
  const instfs_id = url?.searchParams.get('instfs_id');
96
+ const location = url?.searchParams.get('location');
96
97
  const file_id = matches[1];
97
98
  const params = {
98
99
  subject: 'preview_file',
@@ -103,6 +104,9 @@ export function showFilePreviewInOverlay(event, canvasOrigin) {
103
104
  params.access_token = access_token;
104
105
  params.instfs_id = instfs_id;
105
106
  }
107
+ if (location) {
108
+ params.location = location;
109
+ }
106
110
  // TODO:
107
111
  // 1. what window should we be using
108
112
  // 2. is that the right origin?
@@ -0,0 +1 @@
1
+ export declare const createOverlay: (iframes: NodeListOf<Element>) => void;