fit-ui 2.7.1 → 2.8.2

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 (234) hide show
  1. package/dist/Documentation.html +3 -3
  2. package/dist/Fit.UI.css +180 -50
  3. package/dist/Fit.UI.js +754 -126
  4. package/dist/Fit.UI.min.css +1 -1
  5. package/dist/Fit.UI.min.js +1 -1
  6. package/dist/Resources/CKEditor/CHANGES.md +34 -3
  7. package/dist/Resources/CKEditor/LICENSE.md +3 -3
  8. package/dist/Resources/CKEditor/README.md +1 -1
  9. package/dist/Resources/CKEditor/adapters/jquery.js +1 -1
  10. package/dist/Resources/CKEditor/build-config.js +4 -5
  11. package/dist/Resources/CKEditor/ckeditor.js +336 -340
  12. package/dist/Resources/CKEditor/config.js +1 -1
  13. package/dist/Resources/CKEditor/contents.css +208 -208
  14. package/dist/Resources/CKEditor/lang/da.js +3 -3
  15. package/dist/Resources/CKEditor/lang/de.js +3 -3
  16. package/dist/Resources/CKEditor/lang/en.js +3 -3
  17. package/dist/Resources/CKEditor/plugins/autocomplete/skins/default.css +38 -38
  18. package/dist/Resources/CKEditor/plugins/clipboard/dialogs/paste.js +1 -1
  19. package/dist/Resources/CKEditor/plugins/dialog/dialogDefinition.js +1 -1
  20. package/dist/Resources/CKEditor/plugins/dialog/styles/dialog.css +18 -18
  21. package/dist/Resources/CKEditor/plugins/emoji/skins/default.css +237 -237
  22. package/dist/Resources/CKEditor/plugins/icons.png +0 -0
  23. package/dist/Resources/CKEditor/plugins/icons_hidpi.png +0 -0
  24. package/dist/Resources/CKEditor/plugins/link/dialogs/anchor.js +1 -1
  25. package/dist/Resources/CKEditor/plugins/link/dialogs/link.js +1 -1
  26. package/dist/Resources/CKEditor/plugins/pastefromword/filter/default.js +1 -1
  27. package/dist/Resources/CKEditor/plugins/pastetools/filter/common.js +1 -1
  28. package/dist/Resources/CKEditor/plugins/pastetools/filter/image.js +7 -7
  29. package/dist/Resources/CKEditor/skins/moono-lisa/dialog.css +5 -5
  30. package/dist/Resources/CKEditor/skins/moono-lisa/dialog_ie.css +5 -5
  31. package/dist/Resources/CKEditor/skins/moono-lisa/dialog_ie8.css +5 -5
  32. package/dist/Resources/CKEditor/skins/moono-lisa/dialog_iequirks.css +5 -5
  33. package/dist/Resources/CKEditor/skins/moono-lisa/editor.css +5 -5
  34. package/dist/Resources/CKEditor/skins/moono-lisa/editor_gecko.css +5 -5
  35. package/dist/Resources/CKEditor/skins/moono-lisa/editor_ie.css +5 -5
  36. package/dist/Resources/CKEditor/skins/moono-lisa/editor_ie8.css +5 -5
  37. package/dist/Resources/CKEditor/skins/moono-lisa/editor_iequirks.css +5 -5
  38. package/dist/Resources/CKEditor/skins/moono-lisa/icons.png +0 -0
  39. package/dist/Resources/CKEditor/skins/moono-lisa/icons_hidpi.png +0 -0
  40. package/dist/Resources/CKEditor/skins/moono-lisa/readme.md +1 -1
  41. package/dist/Resources/CKEditor/styles.js +137 -137
  42. package/dist/Resources/ckeditor_4.17.2_6f06412961d8.zip +0 -0
  43. package/package.json +1 -1
  44. package/types/index.d.ts +30 -1
  45. package/dist/Resources/CKEditor-autogrow-plugin-built-in/CHANGES.md +0 -2117
  46. package/dist/Resources/CKEditor-autogrow-plugin-built-in/LICENSE.md +0 -1436
  47. package/dist/Resources/CKEditor-autogrow-plugin-built-in/README-FitUiChanges.txt +0 -8
  48. package/dist/Resources/CKEditor-autogrow-plugin-built-in/README.md +0 -39
  49. package/dist/Resources/CKEditor-autogrow-plugin-built-in/adapters/jquery.js +0 -10
  50. package/dist/Resources/CKEditor-autogrow-plugin-built-in/build-config.js +0 -80
  51. package/dist/Resources/CKEditor-autogrow-plugin-built-in/ckeditor.js +0 -986
  52. package/dist/Resources/CKEditor-autogrow-plugin-built-in/config.js +0 -34
  53. package/dist/Resources/CKEditor-autogrow-plugin-built-in/contents.css +0 -208
  54. package/dist/Resources/CKEditor-autogrow-plugin-built-in/index.html +0 -36
  55. package/dist/Resources/CKEditor-autogrow-plugin-built-in/lang/da.js +0 -5
  56. package/dist/Resources/CKEditor-autogrow-plugin-built-in/lang/de.js +0 -5
  57. package/dist/Resources/CKEditor-autogrow-plugin-built-in/lang/en.js +0 -5
  58. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/autocomplete/skins/default.css +0 -38
  59. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/LICENSE.md +0 -1244
  60. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/README.md +0 -21
  61. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/dialogs/base64image.js +0 -766
  62. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/dialogs/base64image.original.js +0 -503
  63. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/icons/base64image.png +0 -0
  64. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/icons/hidpi/base64image.png +0 -0
  65. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/lang/da.js +0 -12
  66. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/lang/de.js +0 -12
  67. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/lang/en.js +0 -12
  68. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/plugin.js +0 -58
  69. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64imagepaste/plugin.js +0 -91
  70. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/clipboard/dialogs/paste.js +0 -11
  71. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dialog/dialogDefinition.js +0 -4
  72. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dialog/styles/dialog.css +0 -18
  73. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/LICENSE +0 -19
  74. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/_source.css +0 -85
  75. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/package.json +0 -19
  76. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/plugin.js +0 -395
  77. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/readme.md +0 -35
  78. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/emoji/assets/iconsall.png +0 -0
  79. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/emoji/assets/iconsall.svg +0 -58
  80. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/emoji/emoji.json +0 -1
  81. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/emoji/skins/default.css +0 -237
  82. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/icons.png +0 -0
  83. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/icons_hidpi.png +0 -0
  84. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/link/dialogs/anchor.js +0 -8
  85. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/link/dialogs/link.js +0 -30
  86. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/link/images/anchor.png +0 -0
  87. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/link/images/hidpi/anchor.png +0 -0
  88. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/pastefromword/filter/default.js +0 -42
  89. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/pastetools/filter/common.js +0 -24
  90. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/pastetools/filter/image.js +0 -12
  91. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog.css +0 -1
  92. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_ie.css +0 -1
  93. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_ie7.css +0 -1
  94. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_ie8.css +0 -1
  95. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_iequirks.css +0 -1
  96. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_opera.css +0 -1
  97. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor.css +0 -1
  98. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_gecko.css +0 -1
  99. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_ie.css +0 -1
  100. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_ie7.css +0 -1
  101. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_ie8.css +0 -1
  102. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_iequirks.css +0 -1
  103. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/icons.png +0 -0
  104. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/icons_hidpi.png +0 -0
  105. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/arrow.png +0 -0
  106. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/close.png +0 -0
  107. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/hidpi/close.png +0 -0
  108. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/hidpi/lock-open.png +0 -0
  109. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/hidpi/lock.png +0 -0
  110. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/hidpi/refresh.png +0 -0
  111. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/lock-open.png +0 -0
  112. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/lock.png +0 -0
  113. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/refresh.png +0 -0
  114. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/readme.md +0 -35
  115. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/skin.js +0 -10
  116. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/dialog.css +0 -5
  117. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/dialog_ie.css +0 -5
  118. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/dialog_ie8.css +0 -5
  119. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/dialog_iequirks.css +0 -5
  120. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor.css +0 -5
  121. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor_gecko.css +0 -5
  122. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor_ie.css +0 -5
  123. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor_ie8.css +0 -5
  124. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor_iequirks.css +0 -5
  125. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/icons.png +0 -0
  126. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/icons_hidpi.png +0 -0
  127. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/arrow.png +0 -0
  128. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/close.png +0 -0
  129. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/hidpi/close.png +0 -0
  130. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  131. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/hidpi/lock.png +0 -0
  132. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  133. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/lock-open.png +0 -0
  134. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/lock.png +0 -0
  135. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/refresh.png +0 -0
  136. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/spinner.gif +0 -0
  137. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/readme.md +0 -46
  138. package/dist/Resources/CKEditor-autogrow-plugin-built-in/styles.js +0 -137
  139. package/dist/Resources/CKEditor-autogrow-plugin-built-in/vendor/promise.js +0 -13
  140. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/CHANGES.md +0 -2117
  141. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/LICENSE.md +0 -1436
  142. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/README-FitUiChanges.txt +0 -8
  143. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/README.md +0 -39
  144. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/adapters/jquery.js +0 -10
  145. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/build-config.js +0 -79
  146. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/ckeditor.js +0 -983
  147. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/config.js +0 -34
  148. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/contents.css +0 -208
  149. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/lang/da.js +0 -5
  150. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/lang/de.js +0 -5
  151. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/lang/en.js +0 -5
  152. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/autocomplete/skins/default.css +0 -38
  153. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/autogrow/plugin.js +0 -234
  154. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/LICENSE.md +0 -1244
  155. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/README.md +0 -21
  156. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/dialogs/base64image.js +0 -766
  157. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/dialogs/base64image.original.js +0 -503
  158. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/icons/base64image.png +0 -0
  159. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/icons/hidpi/base64image.png +0 -0
  160. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/lang/da.js +0 -12
  161. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/lang/de.js +0 -12
  162. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/lang/en.js +0 -12
  163. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/plugin.js +0 -58
  164. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64imagepaste/plugin.js +0 -91
  165. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/clipboard/dialogs/paste.js +0 -11
  166. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dialog/dialogDefinition.js +0 -4
  167. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dialog/styles/dialog.css +0 -18
  168. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/LICENSE +0 -19
  169. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/_source.css +0 -85
  170. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/package.json +0 -19
  171. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/plugin.js +0 -395
  172. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/readme.md +0 -35
  173. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/emoji/assets/iconsall.png +0 -0
  174. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/emoji/assets/iconsall.svg +0 -58
  175. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/emoji/emoji.json +0 -1
  176. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/emoji/skins/default.css +0 -237
  177. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/icons.png +0 -0
  178. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/icons_hidpi.png +0 -0
  179. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/link/dialogs/anchor.js +0 -8
  180. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/link/dialogs/link.js +0 -30
  181. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/link/images/anchor.png +0 -0
  182. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/link/images/hidpi/anchor.png +0 -0
  183. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/pastefromword/filter/default.js +0 -42
  184. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/pastetools/filter/common.js +0 -24
  185. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/pastetools/filter/image.js +0 -12
  186. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog.css +0 -1
  187. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_ie.css +0 -1
  188. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_ie7.css +0 -1
  189. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_ie8.css +0 -1
  190. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_iequirks.css +0 -1
  191. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_opera.css +0 -1
  192. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor.css +0 -1
  193. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_gecko.css +0 -1
  194. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_ie.css +0 -1
  195. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_ie7.css +0 -1
  196. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_ie8.css +0 -1
  197. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_iequirks.css +0 -1
  198. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/icons.png +0 -0
  199. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/icons_hidpi.png +0 -0
  200. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/arrow.png +0 -0
  201. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/close.png +0 -0
  202. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/hidpi/close.png +0 -0
  203. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/hidpi/lock-open.png +0 -0
  204. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/hidpi/lock.png +0 -0
  205. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/hidpi/refresh.png +0 -0
  206. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/lock-open.png +0 -0
  207. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/lock.png +0 -0
  208. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/refresh.png +0 -0
  209. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/readme.md +0 -35
  210. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/skin.js +0 -10
  211. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/dialog.css +0 -5
  212. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/dialog_ie.css +0 -5
  213. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/dialog_ie8.css +0 -5
  214. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/dialog_iequirks.css +0 -5
  215. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor.css +0 -5
  216. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor_gecko.css +0 -5
  217. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor_ie.css +0 -5
  218. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor_ie8.css +0 -5
  219. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor_iequirks.css +0 -5
  220. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/icons.png +0 -0
  221. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/icons_hidpi.png +0 -0
  222. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/arrow.png +0 -0
  223. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/close.png +0 -0
  224. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/hidpi/close.png +0 -0
  225. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  226. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/hidpi/lock.png +0 -0
  227. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  228. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/lock-open.png +0 -0
  229. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/lock.png +0 -0
  230. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/refresh.png +0 -0
  231. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/spinner.gif +0 -0
  232. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/readme.md +0 -46
  233. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/styles.js +0 -137
  234. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/vendor/promise.js +0 -13
@@ -1,766 +0,0 @@
1
- /*
2
- * Created by ALL-INKL.COM - Neue Medien Muennich - 04. Feb 2014
3
- * Licensed under the terms of GPL, LGPL and MPL licenses.
4
- */
5
-
6
- /*
7
- * Improved by Jimmy Thomsen for CKEditor in Fit.UI (https://fitui.org), licensed under LGPL.
8
- * * Improvements to UI (positioning, dimensions, and input experience)
9
- * * Store images using blob storage which can greatly improve performance.
10
- * Simply add the following configuration where storage can be either "blob" or "base64" (default):
11
- * base64image: { storage: "blob", onImageAdded: function(args) {
12
- * var type = args.type; // Possible values: "blob", "base64", or "url"
13
- * var blob = args.blob; // File blob for type "blob" and "base64", null for type "url"
14
- * var url = args.url; // Image url (e.g. http(s):// for type "url", blob: for type "blob", and data: for type "base64")
15
- * var img = args.image; // <img> element added to CKEditor
16
- * }}
17
- * Notice that files in blob storage are not removed by plugin once added to CKEditor so make sure to
18
- * revoke blobs when no longer needed, either by reloading page or by calling URL.revokeObjectURL(imageUrl).
19
- * All images of type "blob" provided via onImageAdded(..) must be cleaned up when no longer needed.
20
- * * Memory freed up - no longer keeps an internal reference to last selected file and image data
21
- * * No longer applying invalid values to vspace, hspace, width, and height when specifying a unit - these are pixel values only
22
- * * Added support for em unit for dimensions (width, height, vspace, hspace, and border)
23
- * * Better preservation of aspect ratio with support for decimals (% and em)
24
- * * Dimensions are now restored if user enters an invalid value, rather than changing them to 0px x 0px
25
- * * Made sure image retains a minimum width and height of 10px so the images cannot accidentally become invisible or inaccessible
26
- * * Made OnChange fire when image attributes are changed
27
- */
28
-
29
- CKEDITOR.dialog.add("base64imageDialog", function(editor){
30
- var cfg = {
31
- storage: editor.config.base64image && editor.config.base64image.storage || "base64",
32
- onImageAdded: editor.config.base64image && editor.config.base64image.onImageAdded || null
33
- };
34
-
35
- var t = null,
36
- selectedImg = null,
37
- newImageBlob = null, // { url: string, blob: Blob | null, type: "blob" | "base64" | "url", preserve?: boolean }
38
- orgWidth = null, orgHeight = null, // Dimensions parsed from <img> tag - only used to initially set dimensions in dialog and to calculate imgScal
39
- prevValidWidth = null, prevValidHeight = null, // Dimensions parsed from <img> tag, or actual image dimensions if not defined in styles. Updated every time dimensions are changed to new valid values. Used to restore dimensions if user enters garbage.
40
- imgPreview = null, urlCB = null, urlI = null, fileCB = null, imgScal = 1, lock = true;
41
-
42
- /* Check File Reader Support */
43
- function fileSupport() {
44
- var r = false, n = null;
45
- try {
46
- if(FileReader) {
47
- var n = document.createElement("input");
48
- if(n && "files" in n) r = true;
49
- }
50
- } catch(e) { r = false; }
51
- n = null;
52
- return r;
53
- }
54
- var fsupport = fileSupport();
55
-
56
- /* Load preview image */
57
- function imagePreviewLoad(s) {
58
-
59
- /* no preview */
60
- if(typeof(s) != "string" || !s) {
61
- imgPreview.getElement().setHtml("");
62
- return;
63
- }
64
-
65
- /* Create image */
66
- var i = new Image();
67
-
68
- /* Display loading text in preview element */
69
- imgPreview.getElement().setHtml("Loading...");
70
-
71
- /* When image is loaded */
72
- i.onload = function() {
73
-
74
- // Use dimensions parsed from styles when dialog was opened, in case we are working with an image already found in the document,
75
- // or use the image's own dimensions in case the image was just added, or if no styles were defined for the image in the document.
76
- prevValidWidth = prevValidWidth || this.width.toString();
77
- prevValidHeight = prevValidHeight || this.height.toString();
78
-
79
- /* Remove preview */
80
- imgPreview.getElement().setHtml("");
81
-
82
- /* Set attributes */
83
- if(orgWidth == null || orgHeight == null) {
84
- t.setValueOf("tab-properties", "width", this.width);
85
- t.setValueOf("tab-properties", "height", this.height);
86
- imgScal = 1;
87
- if(this.height > 0 && this.width > 0) imgScal = this.width / this.height;
88
- if(imgScal <= 0) imgScal = 1;
89
- } else {
90
- orgWidth = null;
91
- orgHeight = null;
92
- }
93
- this.id = editor.id+"previewimage";
94
- this.setAttribute("style", "max-width:400px;max-height:100px;");
95
- this.setAttribute("alt", "");
96
-
97
- /* Insert preview image */
98
- try {
99
- var p = imgPreview.getElement().$;
100
- if(p) p.appendChild(this);
101
- } catch(e) {}
102
-
103
- };
104
-
105
- /* Error Function */
106
- i.onerror = function(){ imgPreview.getElement().setHtml(""); };
107
- i.onabort = function(){ imgPreview.getElement().setHtml(""); };
108
-
109
- /* Load image */
110
- i.src = s;
111
- }
112
-
113
- /* Change input values and preview image */
114
- function imagePreview(src){
115
-
116
- /* Remove preview */
117
- imgPreview.getElement().setHtml("");
118
-
119
- // Make sure to clean up blobs in case user selects an image more than once
120
- if (newImageBlob !== null && newImageBlob.type === "blob") {
121
- URL.revokeObjectURL(newImageBlob.url);
122
- }
123
-
124
- if(src == "base64" || src == "blob") {
125
-
126
- /* Disable Checkboxes */
127
- if(urlCB) urlCB.setValue(false, true);
128
- if(fileCB) fileCB.setValue(false, true);
129
-
130
- } else if(src == "url") {
131
-
132
- /* Ensable Image URL Checkbox */
133
- if(urlCB) urlCB.setValue(true, true);
134
- if(fileCB) fileCB.setValue(false, true);
135
-
136
- /* Load preview image */
137
- if(urlI) {
138
- newImageBlob = { url: urlI.getValue(), blob: null, type: "url" };
139
- imagePreviewLoad(urlI.getValue());
140
- }
141
-
142
- } else if(fsupport) {
143
-
144
- /* Ensable Image File Checkbox */
145
- if(urlCB) urlCB.setValue(false, true);
146
- if(fileCB) fileCB.setValue(true, true);
147
-
148
- /* Read file and load preview */
149
- // var fileI = t.getContentElement("tab-source", "file");
150
- // var n = null;
151
- // try { n = fileI.getInputElement().$; } catch(e) { n = null; }
152
- var n = document.querySelector("#" + editor.id + "_imagefilepicker"); // Returns null if file picker is not supported
153
- if(n && "files" in n && n.files && n.files.length > 0 && n.files[0]) {
154
- if("type" in n.files[0] && !n.files[0].type.match("image.*")) return;
155
- if(!FileReader) return;
156
- imgPreview.getElement().setHtml("Loading...");
157
- var file = n.files[0];
158
- if (URL.createObjectURL && cfg.storage === "blob") { // Browsers supporting blob storage
159
- var imageUrl = URL.createObjectURL(file); // WARNING: Images remain in blob storage until page is reloaded, closed, or until URL.revokeObjectURL(imageUrl) is invoked! Use onImageAdded callback to keep track of image blobs so they can be disposed when no longer needed!
160
- imagePreviewLoad(imageUrl);
161
- newImageBlob = { url: imageUrl, blob: file, type: "blob" };
162
- } else {
163
- var fr = new FileReader();
164
- fr.onload = (function(f) { return function(e) {
165
- imgPreview.getElement().setHtml("");
166
- imagePreviewLoad(e.target.result);
167
- newImageBlob = { url: e.target.result, blob: file, type: "base64" };
168
- }; })(file);
169
- fr.onerror = function(){ imgPreview.getElement().setHtml(""); };
170
- fr.onabort = function(){ imgPreview.getElement().setHtml(""); };
171
- fr.readAsDataURL(file);
172
- }
173
- }
174
- }
175
- };
176
-
177
- function roundWithDecimals(value, decimals) // Logic copied from Fit.UI: https://github.com/Jemt/Fit.UI/blob/51f3a2cd26e3b32d3e1cea83b2e27dc786ce4488/Core/Data.js#L131
178
- {
179
- var factor = 1;
180
- for (var i = 0 ; i < decimals || 0 ; i++) factor = factor * 10;
181
- return (value < 0 ? -1 : 1) * Math.round(Math.abs(value * factor)) / factor;
182
- }
183
-
184
- var getStyleSize = function(styles, propNameToGet)
185
- {
186
- // For debugging use https://regex101.com/r/5dVbPY/2
187
- // 0 = full match (or null), 1 = junk coming before width attribute, 2 = width (e.g. 2.2em), 3 = width decimals (e.g. .2), 4 = width unit (e.g. em)
188
- var regex = new RegExp("(^| |;)" + propNameToGet + " *: *(\\d+(\\.\\d+)?(px|em|%))", "i");
189
- var result = regex.exec(styles);
190
- return result && (result[4] === "px" ? Math.round(parseFloat(result[2])).toString() : result[2]);
191
- };
192
-
193
- var getMarginSize = function(styles, marginType)
194
- {
195
- // For debugging use https://regex101.com/r/2ITWa7/3/
196
- var regexEdge = new RegExp("(^| |;)margin-" + (marginType === "vertical" ? "top" : "left") + " *: *(\\d+(\\.\\d+)?(px|em|%))", "i"); // E.g. margin-top: 2.5em;
197
- var regexMargin1 = /(^| |;)margin *: *(\d+(\.\d+)?(px|em|%)) *(;|$)/i; // E.g. margin: 2.5em;
198
- var regexMargin2 = /(^| |;)margin *: *(\d+(\.\d+)?(px|em|%)) +(\d+(\.\d+)?(px|em|%)) *(;|$)/i; // E.g. margin: 2.5em 1.85em; (top/bottom left/right)
199
- var regexMargin3 = /(^| |;)margin *: *(\d+(\.\d+)?(px|em|%)) +(\d+(\.\d+)?(px|em|%)) +(\d+(\.\d+)?(px|em|%)) +(\d+(\.\d+)?(px|em|%)) *(;|$)/i; // E.g. margin: 2.5em 1.85em 2.5em 1.85em; (top right bottom left)
200
-
201
- var m1 = regexEdge.exec(styles); // 0 = Full match, ... 2 = margin size, ...
202
- var m2 = regexMargin1.exec(styles); // 0 = Full match, ... 2 = margin size, ...
203
- var m3 = regexMargin2.exec(styles); // 0 = Full match, ... 2 = margin size top/bottom, 5 = margin size left/right, ...
204
- var m4 = regexMargin3.exec(styles); // 0 = Full match, ... 2 = margin size top, 5 = margin size right, 8 = margin size bottom, 11 = margin size left ...
205
-
206
- var result = m1 && m1[2] || m2 && m2[2] || m3 && m3[marginType === "vertical" ? 2 : 5] || m4 && m4[marginType === "vertical" ? 2 : 11];
207
- return result && (result.indexOf("px") > -1 ? Math.round(parseFloat(result)).toString() : result);
208
- }
209
-
210
- /* Calculate image dimensions */
211
- function getImageDimensions() {
212
- var w = t.getContentElement("tab-properties", "width").getValue();
213
- var h = t.getContentElement("tab-properties", "height").getValue()
214
- var o = {
215
- "w" : w,
216
- "h" : h,
217
- "uw" : "px",
218
- "uh" : "px"
219
- };
220
- if(o.w.indexOf("%") >= 0) o.uw = "%";
221
- else if(o.w.indexOf("em") >= 0) o.uw = "em";
222
- if(o.h.indexOf("%") >= 0) o.uh = "%";
223
- else if(o.h.indexOf("em") >= 0) o.uh = "em";
224
- if (o.uw === "px") {
225
- o.w = parseInt(o.w, 10);
226
- } else {
227
- o.w = parseFloat(o.w);
228
- }
229
- if (o.uh === "px") {
230
- o.h = parseInt(o.h, 10);
231
- } else {
232
- o.h = parseFloat(o.h);
233
- }
234
- if(isNaN(o.w) || o.w + (o.uw !== "px" ? o.uw : "") !== w) { o.w = 0; o.err = true; };
235
- if(isNaN(o.h) || o.h + (o.uh !== "px" ? o.uh : "") !== h) { o.h = 0; o.err = true; };
236
- return o;
237
- }
238
-
239
- /* Set image dimensions */
240
- function imageDimensions(src, forceUpdate) {
241
- var o = getImageDimensions();
242
- if (o.err) { // User entered an invalid value - restore to latest valid values applied
243
- t.getContentElement("tab-properties", "width").setValue(prevValidWidth);
244
- t.getContentElement("tab-properties", "height").setValue(prevValidHeight);
245
- return;
246
- }
247
- if (lock) {
248
- var u = "px";
249
- if(src == "width") {
250
- if (forceUpdate !== true && prevValidWidth === o.w + (o.uw !== "px" ? o.uw : "")) return; // User did not change value - avoid decimal adjustment on tab navigation
251
- if(o.uw == "%") u = "%";
252
- else if(o.uw == "em") u = "em";
253
- if (u === "px") {
254
- o.h = Math.round(o.w / imgScal);
255
- } else { // em or % where values might be small so we need better precision to avoid stretching image (e.g. 2em x 0.5em)
256
- o.h = roundWithDecimals(o.w / imgScal, 2);
257
- }
258
- } else {
259
- if (forceUpdate !== true && prevValidHeight === o.h + (o.uh !== "px" ? o.uh : "")) return; // User did not change value - avoid decimal adjustment on tab navigation
260
- if(o.uh == "%") u = "%";
261
- else if(o.uh == "em") u = "em";
262
- if (u === "px") {
263
- o.w = Math.round(o.h * imgScal);
264
- } else { // em or % where values might be small so we need better precision to avoid stretching image (e.g. 2em x 0.5em)
265
- o.w = roundWithDecimals(o.h * imgScal, 2);
266
- }
267
- }
268
- if(u == "%") {
269
- o.w += "%";
270
- o.h += "%";
271
- }
272
- else if(u == "em") {
273
- o.w += "em";
274
- o.h += "em";
275
- }
276
- t.getContentElement("tab-properties", "width").setValue(o.w.toString());
277
- t.getContentElement("tab-properties", "height").setValue(o.h.toString());
278
- prevValidWidth = o.w.toString();
279
- prevValidHeight = o.h.toString();
280
- } else {
281
- prevValidWidth = o.w + (o.uw !== "px" ? o.uw : "");
282
- prevValidHeight = o.h + (o.uh !== "px" ? o.uh : "");
283
- }
284
- }
285
-
286
- /* Set number value */
287
- function setNumberValue(elem) {
288
- var v = elem.getValue(), u = "";
289
- if(v.indexOf("%") >= 0) u = "%";
290
- else if(v.indexOf("em") >= 0) u = "em";
291
- if (u === "") {
292
- v = parseInt(v, 10);
293
- if(isNaN(v)) v = 0;
294
- } else { // em or %
295
- v = parseFloat(v);
296
- if(!isNaN(v)) {
297
- v = roundWithDecimals(v, 2);
298
- } else {
299
- v = 0;
300
- }
301
- }
302
-
303
- elem.setValue(v+u);
304
- }
305
-
306
- if(fsupport) {
307
-
308
- /* Dialog with file and url image source */
309
- var sourceElements = [
310
- {
311
- type: "hbox",
312
- widths: ["70px"],
313
- children: [
314
- {
315
- type: "checkbox",
316
- id: "urlcheckbox",
317
- //style: "margin-top:5px",
318
- label: editor.lang.common.url+":"
319
- },
320
- {
321
- type: "text",
322
- id: "url",
323
- label: "",
324
- style: "margin-top: -5px",
325
- onChange: function(){ imagePreview("url"); }
326
- }
327
- ]
328
- },
329
- { // Spacer
330
- type: "hbox",
331
- children: []
332
- },
333
- {
334
- type: "hbox",
335
- widths: ["70px"],
336
- children: [
337
- {
338
- type: "checkbox",
339
- id: "filecheckbox",
340
- //style: "margin-top:5px",
341
- label: editor.lang.common.upload+":"
342
- },
343
- {
344
- //type: "file", // WARNING: Avoid using type:"file" as it wraps the file picker in an iframe which breaks if dialog is moved in DOM, because iframes reload in this case, resulting in dynamically created content being lost
345
- type: "html",
346
- html: "<input type='file' id='" + editor.id + "_imagefilepicker'>", // OnChange handler attached in onShow handler
347
- id: "file",
348
- label: "",
349
- style: "margin-top: -5px",
350
- //onChange: function(){ imagePreview("file"); } // Does not work with type:"html" - OnChange handler attached in onShow handler instead
351
- }
352
- ]
353
- },
354
- {
355
- type: "html",
356
- id: "preview",
357
- html: new CKEDITOR.template("<div style=\"text-align:center;\"></div>").output()
358
- }
359
- ];
360
-
361
- } else {
362
-
363
- /* Dialog with url image source */
364
- var sourceElements = [
365
- {
366
- type: "text",
367
- id: "url",
368
- label: editor.lang.common.url,
369
- onChange: function(){ imagePreview("url"); }
370
- },
371
- {
372
- type: "html",
373
- id: "preview",
374
- html: new CKEDITOR.template("<div style=\"text-align:center;\"></div>").output()
375
- }
376
- ];
377
- }
378
-
379
- /* Dialog */
380
- return {
381
- title: editor.lang.common.image,
382
- minWidth: 450,
383
- minHeight: 180,
384
- onLoad: function(){
385
-
386
- if(fsupport) {
387
-
388
- /* Get checkboxes */
389
- urlCB = this.getContentElement("tab-source", "urlcheckbox");
390
- fileCB = this.getContentElement("tab-source", "filecheckbox");
391
-
392
- /* Checkbox Events */
393
- urlCB.getInputElement().on("click", function(){ imagePreview("url"); });
394
- fileCB.getInputElement().on("click", function(){ imagePreview("file"); });
395
-
396
- }
397
-
398
- /* Get url input element */
399
- urlI = this.getContentElement("tab-source", "url");
400
-
401
- /* Get image preview element */
402
- imgPreview = this.getContentElement("tab-source", "preview");
403
-
404
- /* Constrain proportions or not */
405
- this.getContentElement("tab-properties", "lock").getInputElement().on("click", function(){
406
- if(this.getValue()) lock = true; else lock = false;
407
- imageDimensions("width", true);
408
- }, this.getContentElement("tab-properties", "lock"));
409
-
410
- /* Change Attributes Events */
411
- this.getContentElement("tab-properties", "width").getInputElement().on("blur", function(){ imageDimensions("width"); });
412
- this.getContentElement("tab-properties", "height").getInputElement().on("blur", function(){ imageDimensions("height"); });
413
- this.getContentElement("tab-properties", "vmargin").getInputElement().on("blur", function(){ setNumberValue(this); }, this.getContentElement("tab-properties", "vmargin"));
414
- this.getContentElement("tab-properties", "hmargin").getInputElement().on("blur", function(){ setNumberValue(this); }, this.getContentElement("tab-properties", "hmargin"));
415
- this.getContentElement("tab-properties", "border").getInputElement().on("blur", function(){ setNumberValue(this); }, this.getContentElement("tab-properties", "border"));
416
-
417
- },
418
- onShow: function(args){
419
-
420
- // NOTICE: IE11 on Win7+IE11 VM seems to be crashing a lot when opening the dialog to edit the properties
421
- // of an existing image. It seems to mainly happen when working with relative units (% and em),
422
- // and especially if assigning a border to the image. The original plugin had the same problem with %.
423
- // The problem can not be reproduced with Win7+IE10 though, nor when testing with IE11 on BrowserStack,
424
- // so this might be a problem with the VM or the specific build of IE11 being used.
425
-
426
- // Add OnChange handler to file picker
427
- var fp = args.sender.getElement().$.querySelector("#" + editor.id + "_imagefilepicker");
428
- if (fp) // Null if file picker is not supported
429
- {
430
- fp.onchange = function() { imagePreview("file"); };
431
- }
432
-
433
- /* Remove preview */
434
- imgPreview.getElement().setHtml("");
435
-
436
- t = this, newImageBlob = null, orgWidth = null, orgHeight = null, prevValidWidth = null, prevValidHeight = null, imgScal = 1, lock = true;
437
-
438
- /* selected image or null */
439
- selectedImg = editor.getSelection();
440
- if(selectedImg) selectedImg = selectedImg.getSelectedElement();
441
- if(!selectedImg || selectedImg.getName() !== "img") selectedImg = null;
442
-
443
- /* Set input values */
444
- t.setValueOf("tab-properties", "lock", lock);
445
- t.setValueOf("tab-properties", "vmargin", "0");
446
- t.setValueOf("tab-properties", "hmargin", "0");
447
- t.setValueOf("tab-properties", "border", "0");
448
- t.setValueOf("tab-properties", "align", "none");
449
- if(selectedImg) {
450
-
451
- /* Set input values from selected image */
452
- orgWidth = getStyleSize(selectedImg.getAttribute("style") || "", "width");
453
- orgHeight = getStyleSize(selectedImg.getAttribute("style") || "", "height");
454
- prevValidWidth = orgWidth;
455
- prevValidHeight = orgHeight;
456
- if((orgWidth == null || orgHeight == null) && selectedImg.$) {
457
- orgWidth = selectedImg.$.width;
458
- orgHeight = selectedImg.$.height;
459
- }
460
- if(orgWidth != null && orgHeight != null) {
461
- t.setValueOf("tab-properties", "width", orgWidth);
462
- t.setValueOf("tab-properties", "height", orgHeight);
463
- orgWidth = parseFloat(orgWidth);
464
- orgHeight = parseFloat(orgHeight);
465
- imgScal = 1;
466
- if(!isNaN(orgWidth) && !isNaN(orgHeight) && orgHeight > 0 && orgWidth > 0) imgScal = orgWidth / orgHeight;
467
- if(imgScal <= 0) imgScal = 1;
468
- }
469
-
470
- if(typeof(selectedImg.getAttribute("src")) == "string") {
471
- if(selectedImg.getAttribute("src").indexOf("data:") === 0) {
472
- imagePreview("base64");
473
- imagePreviewLoad(selectedImg.getAttribute("src"));
474
- } else if(selectedImg.getAttribute("src").indexOf("blob:") === 0) {
475
- imagePreview("blob");
476
- imagePreviewLoad(selectedImg.getAttribute("src"));
477
- } else {
478
- t.setValueOf("tab-source", "url", selectedImg.getAttribute("src"));
479
- }
480
- }
481
- if(typeof(selectedImg.getAttribute("alt")) == "string") t.setValueOf("tab-properties", "alt", selectedImg.getAttribute("alt"));
482
- t.setValueOf("tab-properties", "hmargin", getMarginSize(selectedImg.getAttribute("style"), "horizontal") || "0");
483
- t.setValueOf("tab-properties", "vmargin", getMarginSize(selectedImg.getAttribute("style"), "vertical") || "0");
484
- t.setValueOf("tab-properties", "border", getStyleSize(selectedImg.getAttribute("style"), "border") || "0");
485
- if(typeof(selectedImg.getAttribute("align")) == "string") {
486
- switch(selectedImg.getAttribute("align")) {
487
- case "top":
488
- case "text-top":
489
- t.setValueOf("tab-properties", "align", "top");
490
- break;
491
- case "baseline":
492
- case "bottom":
493
- case "text-bottom":
494
- t.setValueOf("tab-properties", "align", "bottom");
495
- break;
496
- case "left":
497
- t.setValueOf("tab-properties", "align", "left");
498
- break;
499
- case "right":
500
- t.setValueOf("tab-properties", "align", "right");
501
- break;
502
- }
503
- }
504
- t.selectPage("tab-properties");
505
- }
506
-
507
- },
508
- onHide: function(evArg) {
509
- if (newImageBlob !== null && newImageBlob.type === "blob" && newImageBlob.preserve !== true) {
510
- // Remove image from blob storage when dialog is canceled or dismissed to free up memory.
511
- // Initiator of CKEditor is responsible for cleaning up memory for images added to the CKEditor instance.
512
- // Use the onImageAdded event to receive references to images added.
513
- URL.revokeObjectURL(newImageBlob.url);
514
- }
515
-
516
- // Dialog lives on when closed - free up memory by making sure potentially large files are no longer referenced,
517
- // as recommended: https://chromium.googlesource.com/chromium/src/+/refs/heads/main/storage/browser/blob/README.md
518
- selectedImg = null;
519
- newImageBlob = null;
520
- //t.getContentElement("tab-source", "file").getInputElement().$.value = ""; // File picker
521
- (evArg.sender.getElement().$.querySelector("#" + editor.id + "_imagefilepicker") || {}).value = ""; // File picker (null if not supported)
522
- imgPreview.getElement().setHtml(""); // Image preview
523
- },
524
- onOk : function(evArg){
525
-
526
- // NOTICE: IE11 on BrowserStack seems to trigger OnOk twice when pressing ENTER, but this
527
- // does not happen when testing locally on a Win7+IE11 VM. The problem might be related
528
- // to how BrowserStack map keystrokes from Mac to their in-browser remote Windows session.
529
-
530
- var imgHtml = selectedImg ? selectedImg.$.outerHTML : "";
531
-
532
- /* Get image source */
533
- var src = "";
534
- try { src = CKEDITOR.document.getById(editor.id+"previewimage").$.src; } catch(e) { src = ""; }
535
- if(typeof(src) != "string" || src == null || src === "") return;
536
-
537
- /* selected image or new image */
538
- if(selectedImg) var newImg = selectedImg; else var newImg = editor.document.createElement("img");
539
-
540
- newImg.$.onload = function() // base64 images load immediately, but images from blob storage does not - we need to wait for it so we can determine the image's offsetWidth and offsetHeight further down
541
- {
542
- /* Set attributes */
543
- newImg.setAttribute("alt", t.getValueOf("tab-properties", "alt").replace(/^\s+/, "").replace(/\s+$/, ""));
544
- var attr = {
545
- "width" : ["width", "width:#;", "integer", 1],
546
- "height" : ["height", "height:#;", "integer", 1],
547
- "vmargin" : ["vspace", "margin-top:#;margin-bottom:#;", "integer", 0],
548
- "hmargin" : ["hspace", "margin-left:#;margin-right:#;", "integer", 0],
549
- "align" : ["align", ""],
550
- "border" : ["border", "border:# solid black;", "integer", 0]
551
- }, css = [], value, cssvalue, attrvalue, k;
552
- for(k in attr) {
553
-
554
- value = t.getValueOf("tab-properties", k);
555
- attrvalue = value;
556
- cssvalue = value;
557
- unit = "px";
558
-
559
- if(k == "align") {
560
- switch(value) {
561
- case "top":
562
- case "bottom":
563
- attr[k][1] = "vertical-align:#;";
564
- break;
565
- case "left":
566
- case "right":
567
- attr[k][1] = "float:#;";
568
- break;
569
- default:
570
- value = null;
571
- break;
572
- }
573
- }
574
-
575
- if(attr[k][2] == "integer") {
576
- if(value.indexOf("%") >= 0) unit = "%";
577
- else if(value.indexOf("em") >= 0) unit = "em";
578
- if (unit === "px") {
579
- value = parseInt(value, 10); // No need to validate - valid values are enforced in the dialog
580
- } else { // em or %
581
- value = parseFloat(value); // No need to validate - valid values are enforced in the dialog
582
- }
583
- if(value != null) {
584
- if(unit == "%") {
585
- attrvalue = ""; // The width and height attributes are pixel values - specifying a unit does not comply with the spec
586
- cssvalue = value+"%";
587
- } else if(unit == "em") {
588
- attrvalue = ""; // The width and height attributes are pixel values - specifying a unit does not comply with the spec
589
- cssvalue = value+"em";
590
- } else {
591
- attrvalue = value;
592
- cssvalue = value+"px";
593
- }
594
- }
595
- }
596
-
597
- if(value != null) {
598
- attrvalue && newImg.setAttribute(attr[k][0], attrvalue);
599
- css.push(attr[k][1].replace(/#/g, cssvalue));
600
- }
601
-
602
- }
603
- if(css.length > 0) newImg.setAttribute("style", css.join(""));
604
-
605
- /* Insert new image */
606
- if(!selectedImg) editor.insertElement(newImg);
607
-
608
- /* Resize image (https://github.com/nmmf/imageresize) */
609
- if(editor.plugins.imageresize) editor.plugins.imageresize.resize(editor, newImg, 800, 800);
610
-
611
- /* Make sure image cannot become hidden or inaccessible with very small width or height */
612
- var minWidth = 10, minHeight = 10; // Do not go below 10px! Too much precision is lost if we do, making it impossible to calculate an aspect ratio close to the original!
613
- if (newImg.$.offsetWidth < minWidth || newImg.$.offsetHeight < minHeight) { // Notice: .width and .height returns the image size while .offsetWidth and .offsetHeight includes the border applied
614
-
615
- var newMinWidth = minWidth;
616
- var newMinHeight = minHeight;
617
-
618
- if (newImg.$.width > newImg.$.height) { // landscape
619
- newMinHeight = minHeight;
620
- newMinWidth = newMinHeight * imgScal;
621
- } else { // portrait or square
622
- newMinWidth = minWidth;
623
- newMinHeight = newMinWidth / imgScal;
624
- }
625
-
626
- newMinWidth = Math.round(newMinWidth);
627
- newMinHeight = Math.round(newMinHeight);
628
-
629
- var newCss = [];
630
- for (var i = 0 ; i < css.length ; i++) {
631
- if (/^width|height/.test(css[i]) === false) {
632
- newCss.push(css[i]);
633
- }
634
- }
635
-
636
- newCss.push("width:" + newMinWidth + "px;");
637
- newCss.push("height:" + newMinHeight + "px;");
638
-
639
- newImg.setAttribute("width", newMinWidth.toString());
640
- newImg.setAttribute("height", newMinHeight.toString());
641
- newImg.setAttribute("style", newCss.join(""));
642
-
643
- //evArg.data.hide = false; // Prevent dialog from closing
644
- }
645
-
646
- // Let component using CKEditor know about images added so it can clean up
647
- // image blobs when no longer needed. While we could revoke an image
648
- // blob associated with 'selectedImg', it would not be sufficient. Images
649
- // can be removed directly from the editor, not just when replaced by this plugin.
650
- // So rather than doing partial cleanup, we leave it all to the component using
651
- // CKEditor and this plugin.
652
- // The component using CKEditor can use the onImageAdded event to track images
653
- // added, and remove blobs when no longer needed.
654
-
655
- if (!selectedImg && cfg.onImageAdded) {
656
- cfg.onImageAdded({
657
- type: newImageBlob.type, // "blob" | "base64" | "url" - component must revoke all URLs of type "blob" when no longer needed!
658
- image: newImg.$, // <img> element
659
- url: newImageBlob.url, // Image URL (http(s)://, data:, or blob:)
660
- blob: newImageBlob.blob // File blob when a file is selected from computer, null when image is provided as a URL
661
- });
662
- newImageBlob.preserve = true;
663
- }
664
-
665
- evArg.sender.hide(); // Close dialog
666
-
667
- if (imgHtml !== newImg.$.outerHTML) {
668
- editor.fire("change");
669
- }
670
- }
671
-
672
- newImg.setAttribute("src", src);
673
- src = null;
674
-
675
- evArg.data.hide = false; // Prevent dialog from closing - closed in image's onload handler above
676
- },
677
-
678
- /* Dialog form */
679
- contents: [
680
- {
681
- id: "tab-source",
682
- label: editor.lang.common.generalTab,
683
- elements: sourceElements
684
- },
685
- {
686
- id: "tab-properties",
687
- label: editor.lang.common.advancedTab,
688
- elements: [
689
- {
690
- type: "text",
691
- id: "alt",
692
- label: editor.lang.base64image.alt
693
- },
694
- {
695
- type: 'hbox',
696
- widths: ["15%", "15%", "70%"],
697
- children: [
698
- {
699
- type: "text",
700
- width: "70px",
701
- id: "width",
702
- label: editor.lang.common.width
703
- },
704
- {
705
- type: "text",
706
- width: "70px",
707
- id: "height",
708
- label: editor.lang.common.height
709
- },
710
- {
711
- type: 'hbox',
712
- style: "margin-top:26px;",
713
- children:
714
- [
715
- {
716
- type: "checkbox",
717
- id: "lock",
718
- label: editor.lang.base64image.lockRatio,
719
- //style: "margin-top:18px;"
720
- }
721
- ]
722
- }
723
- ]
724
- },
725
- {
726
- type: 'hbox',
727
- widths: ["23%", "30%", "30%", "17%"],
728
- style: "margin-top:10px;",
729
- children: [
730
- {
731
- type: "select",
732
- id: "align",
733
- label: editor.lang.common.align,
734
- items: [
735
- [editor.lang.common.notSet, "none"],
736
- [editor.lang.common.alignTop, "top"],
737
- [editor.lang.common.alignBottom, "bottom"],
738
- [editor.lang.common.alignLeft, "left"],
739
- [editor.lang.common.alignRight, "right"]
740
- ]
741
- },
742
- {
743
- type: "text",
744
- width: "70px",
745
- id: "vmargin",
746
- label: editor.lang.base64image.vSpace
747
- },
748
- {
749
- type: "text",
750
- width: "70px",
751
- id: "hmargin",
752
- label: editor.lang.base64image.hSpace
753
- },
754
- {
755
- type: "text",
756
- width: "70px",
757
- id: "border",
758
- label: editor.lang.base64image.border
759
- }
760
- ]
761
- }
762
- ]
763
- }
764
- ]
765
- };
766
- });