fit-ui 2.7.1 → 2.8.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 (234) hide show
  1. package/dist/Documentation.html +3 -3
  2. package/dist/Fit.UI.css +176 -54
  3. package/dist/Fit.UI.js +708 -121
  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
package/dist/Fit.UI.js CHANGED
@@ -648,7 +648,7 @@ Fit._internal =
648
648
  {
649
649
  Core:
650
650
  {
651
- VersionInfo: { Major: 2, Minor: 7, Patch: 1 } // Do NOT modify format - version numbers are programmatically changed when releasing new versions - MUST be on a separate line!
651
+ VersionInfo: { Major: 2, Minor: 8, Patch: 0 } // Do NOT modify format - version numbers are programmatically changed when releasing new versions - MUST be on a separate line!
652
652
  }
653
653
  };
654
654
 
@@ -3223,7 +3223,10 @@ Fit.Controls.ControlBase = function(controlId)
3223
3223
  }
3224
3224
 
3225
3225
  /// <function container="Fit.Controls.ControlBase" name="Focused" access="public" returns="boolean">
3226
- /// <description> Get/set value indicating whether control has focus </description>
3226
+ /// <description>
3227
+ /// Get/set value indicating whether control has focus.
3228
+ /// Control must be rooted in DOM and be visible for control to gain focus.
3229
+ /// </description>
3227
3230
  /// <param name="value" type="boolean" default="undefined"> If defined, True assigns focus, False removes focus (blur) </param>
3228
3231
  /// </function>
3229
3232
  this.Focused = function(val)
@@ -4141,6 +4144,11 @@ Fit.Controls.ControlBase = function(controlId)
4141
4144
  if (me === null) // Disposed while focused (e.g. from an onscroll event handler)
4142
4145
  return;
4143
4146
 
4147
+ // Make sure OnBlur does not fire unless OnFocus was fired first. This prevents OnBlur from firing
4148
+ // if a disabled control allow some elements to gain focus such as links via tab navigation.
4149
+ if (hasFocus === false)
4150
+ return;
4151
+
4144
4152
  if (focusStateLocked === true)
4145
4153
  return;
4146
4154
 
@@ -4480,7 +4488,7 @@ Fit.Controls.DirtyCheckAll = function(scope)
4480
4488
  // visible when interacting with controls on the screen.
4481
4489
  // </member>
4482
4490
  // </container>
4483
- Fit._internal.ControlBase.ReduceDocumentRootPollution = true;
4491
+ Fit._internal.ControlBase.ReduceDocumentRootPollution = false;
4484
4492
  /// <container name="Fit.Cookies">
4485
4493
  /// Cookie functionality.
4486
4494
  /// Set/Get/Remove functions can be invoked as static members, or an instance of Fit.Cookies
@@ -11388,6 +11396,7 @@ Fit.Controls.Button = function(controlId)
11388
11396
  }
11389
11397
  else
11390
11398
  {
11399
+ me.Focused(false);
11391
11400
  Fit.Dom.Attribute(element, "tabindex", null);
11392
11401
  }
11393
11402
 
@@ -11812,6 +11821,7 @@ Fit.Controls.CheckBox = function(ctlId)
11812
11821
  }
11813
11822
  else
11814
11823
  {
11824
+ me.Focused(false);
11815
11825
  Fit.Dom.Attribute(me.GetDomElement(), "tabindex", null);
11816
11826
  }
11817
11827
 
@@ -14011,6 +14021,12 @@ Fit.Controls.DatePicker = function(ctlId)
14011
14021
 
14012
14022
  datepicker.datepicker("show");
14013
14023
 
14024
+ // Allow light dismissable panels/callouts to prevent close/dismiss
14025
+ // when interacting with calendar widget hosted outside of panels/callouts,
14026
+ // by detecting the presence of a data-disable-light-dismiss="true" attribute.
14027
+ var calendarWidget = document.getElementById("fitui-datepicker-div");
14028
+ Fit.Dom.Data(calendarWidget, "disable-light-dismiss", "true");
14029
+
14014
14030
  moveCalenderWidgetLocally();
14015
14031
 
14016
14032
  if (focused === inputTime)
@@ -20982,6 +20998,11 @@ Fit.Controls.FilePicker = function(ctlId)
20982
20998
  {
20983
20999
  me._internal.Data("enabled", val.toString());
20984
21000
 
21001
+ if (val === false)
21002
+ {
21003
+ me.Focused(false);
21004
+ }
21005
+
20985
21006
  if (inputs.length === 0) // Modern control
20986
21007
  {
20987
21008
  input.disabled = !val;
@@ -21618,12 +21639,25 @@ Fit.Controls.Input = function(ctlId)
21618
21639
  var input = null;
21619
21640
  var cmdResize = null;
21620
21641
  var designEditor = null;
21642
+ var designEditorDom = null; // DOM elements within CKEditor which we rely on - some <div> elements become <span> elements in older browsers
21643
+ /*{
21644
+ OuterContainer: null, // <div class="cke">
21645
+ InnerContainer: null, // <div class="cke_inner">
21646
+ Top: null, // <span class="cke_top">
21647
+ Content: null, // <div class="cke_contents">
21648
+ Editable: null, // <div class="cke_editable">
21649
+ Bottom: null // <span class="cke_bottom">
21650
+ }*/
21621
21651
  var designEditorDirty = false;
21622
21652
  var designEditorDirtyPending = false;
21623
21653
  var designEditorConfig = null;
21624
21654
  var designEditorRestoreButtonState = null;
21625
21655
  var designEditorSuppressPaste = false;
21626
21656
  var designEditorSuppressOnResize = false;
21657
+ var designEditorMustReloadWhenReady = false;
21658
+ var designEditorMustDisposeWhenReady = false;
21659
+ var designEditorUpdateSizeDebouncer = -1;
21660
+ var designEditorActiveToolbarPanel = null; // { DomElement: HTMLElement, UnlockFocusStateIfEmojiPanelIsClosed: function, CloseEmojiPanel: function }
21627
21661
  //var htmlWrappedInParagraph = false;
21628
21662
  var wasAutoChangedToMultiLineMode = false; // Used to revert to single line if multi line was automatically enabled along with DesignMode(true), Maximizable(true), or Resizable(true)
21629
21663
  var minimizeHeight = -1;
@@ -21632,13 +21666,13 @@ Fit.Controls.Input = function(ctlId)
21632
21666
  var maximizeHeightConfigured = -1;
21633
21667
  var resizable = Fit.Controls.InputResizing.Disabled;
21634
21668
  var nativeResizableAvailable = false; // Updated in init()
21635
- var mutationObserverId = -1;
21636
- var rootedEventId = -1;
21637
- var createWhenReadyIntervalId = -1;
21669
+ var mutationObserverId = -1; // Specific to DesignMode
21670
+ var rootedEventId = -1; // Specific to DesignMode
21671
+ var createWhenReadyIntervalId = -1; // Specific to DesignMode
21638
21672
  var isIe8 = (Fit.Browser.GetInfo().Name === "MSIE" && Fit.Browser.GetInfo().Version === 8);
21639
21673
  var debounceOnChangeTimeout = -1;
21640
21674
  var debouncedOnChange = null;
21641
- var imageBlobUrls = [];
21675
+ var imageBlobUrls = []; // Specific to DesignMode
21642
21676
 
21643
21677
  // ============================================
21644
21678
  // Init
@@ -21671,7 +21705,7 @@ Fit.Controls.Input = function(ctlId)
21671
21705
  // Scroll to bottom if nearby, to make sure text does not collide with maximize button.
21672
21706
  // Extra padding-bottom is added inside control to allow for spacing between text and maximize button.
21673
21707
 
21674
- var scrollContainer = designEditor !== null ? designEditor.container.$.querySelector("div.cke_editable") : input;
21708
+ var scrollContainer = designEditorDom && designEditorDom.Editable || input;
21675
21709
  var autoScrollToBottom = scrollContainer.scrollTop + scrollContainer.clientHeight > scrollContainer.scrollHeight - 15; // True when at bottom or very close (15px buffer)
21676
21710
 
21677
21711
  if (autoScrollToBottom === true)
@@ -21701,7 +21735,6 @@ Fit.Controls.Input = function(ctlId)
21701
21735
  me._internal.Data("maximized", "false");
21702
21736
  me._internal.Data("resizable", resizable.toLowerCase());
21703
21737
  me._internal.Data("resized", "false");
21704
- me._internal.Data("autogrow", "false");
21705
21738
  me._internal.Data("designmode", "false");
21706
21739
 
21707
21740
  Fit.Internationalization.OnLocaleChanged(localize);
@@ -21719,18 +21752,22 @@ Fit.Controls.Input = function(ctlId)
21719
21752
  }
21720
21753
 
21721
21754
  fireOnChange(); // Only fires OnChange if value has actually changed
21755
+ });
21722
21756
 
21723
- // Restore editor's toolbar buttons in case they were temporarily disabled
21724
-
21725
- if (designEditor !== null)
21726
- {
21727
- restoreDesignEditorButtons();
21728
- }
21757
+ me.OnFocus(function()
21758
+ {
21759
+ restoreHiddenToolbarInDesignEditor(); // Make toolbar appear if currently hidden
21760
+ updateDesignEditorPlaceholder(true); // Clear placeholder text
21761
+ });
21762
+ me.OnBlur(function()
21763
+ {
21764
+ restoreDesignEditorButtons(); // Restore (enable) editor's toolbar buttons in case they were temporarily disabled
21765
+ updateDesignEditorPlaceholder(); // Show placeholder text if control value is empty
21729
21766
  });
21730
21767
 
21731
21768
  Fit.Events.AddHandler(me.GetDomElement(), "paste", true, function(e)
21732
21769
  {
21733
- if (designEditor !== null && designEditorSuppressPaste === true)
21770
+ if (me.DesignMode() === true && designEditorSuppressPaste === true)
21734
21771
  {
21735
21772
  Fit.Events.Stop(e);
21736
21773
  }
@@ -21758,14 +21795,27 @@ Fit.Controls.Input = function(ctlId)
21758
21795
  {
21759
21796
  me._internal.Data("enabled", val === true ? "true" : "false");
21760
21797
 
21798
+ if (val === false)
21799
+ {
21800
+ me.Focused(false);
21801
+ }
21802
+
21761
21803
  input.disabled = val === false;
21762
21804
 
21763
- if (designEditor !== null && designEditor._isReadyForInteraction === true) // ReadOnly mode will be set when instance is ready, if not ready at this time
21805
+ if (designModeEnabledAndReady() === true) // ReadOnly mode will be set when instance is ready, if not ready at this time
21764
21806
  {
21765
21807
  designEditor.setReadOnly(input.disabled);
21766
21808
 
21767
- // Unfortunately there is no API for changing the tabIndex
21768
- designEditor.container.$.querySelector("[contenteditable]").tabIndex = input.disabled === true ? -1 : 0;
21809
+ // Set tabindex to allow or disallow focus. Unfortunately there is no editor API for changing the tabindex.
21810
+ // Preventing focus is only possible by nullifying DOM attribute (these does not work: delete elm.tabIndex; elm.tabIndex = null|undefined|-1).
21811
+ Fit.Dom.Attribute(designEditorDom.Editable, "tabindex", input.disabled === true ? null : "0");
21812
+
21813
+ // Prevent control from losing focus when HTML editor is initialized,
21814
+ // e.g. if Design Mode is enabled when ordinary input control gains focus.
21815
+ // This also prevents control from losing focus if toolbar is clicked without
21816
+ // hitting a button. A value of -1 makes it focusable, but keeps it out of
21817
+ // tab flow (keyboard navigation). Also set when DesignMode(true) is called.
21818
+ Fit.Dom.Attribute(me.GetDomElement(), "tabindex", input.disabled !== true && me.DesignMode() === true ? "-1" : null); // Remove tabindex used to prevent control from losing focus when clicking toolbar buttons, as it will allow control to gain focus when clicked using the mouse
21769
21819
  }
21770
21820
 
21771
21821
  me._internal.UpdateInternalState();
@@ -21780,7 +21830,19 @@ Fit.Controls.Input = function(ctlId)
21780
21830
  {
21781
21831
  Fit.Validation.ExpectBoolean(focus, true);
21782
21832
 
21783
- var elm = ((designEditor !== null) ? designEditor : input); // Notice: designEditor is an instance of CKEditor, not a DOM element
21833
+ elm = input;
21834
+
21835
+ if (me.DesignMode() === true)
21836
+ {
21837
+ if (designModeEnabledAndReady() === true)
21838
+ {
21839
+ elm = designEditor; // Notice: designEditor is an instance of CKEditor, not a DOM element, but it does expose a focus() function
21840
+ }
21841
+ else
21842
+ {
21843
+ elm = me.GetDomElement(); // Editor not loaded yet - focus control container temporarily - focus is later moved to editable area once instanceReady handler is invoked
21844
+ }
21845
+ }
21784
21846
 
21785
21847
  if (Fit.Validation.IsSet(focus) === true)
21786
21848
  {
@@ -21797,7 +21859,7 @@ Fit.Controls.Input = function(ctlId)
21797
21859
  }
21798
21860
  else // Remove focus
21799
21861
  {
21800
- if (designEditor !== null)
21862
+ if (designModeEnabledAndReady() === true)
21801
21863
  {
21802
21864
  if (Fit._internal.Controls.Input.ActiveEditorForDialog === me)
21803
21865
  {
@@ -21841,6 +21903,11 @@ Fit.Controls.Input = function(ctlId)
21841
21903
  }
21842
21904
  else
21843
21905
  {
21906
+ if (designEditorActiveToolbarPanel !== null)
21907
+ {
21908
+ designEditorActiveToolbarPanel.CloseEmojiPanel(); // Returns focus to editor and nullifies designEditorActiveToolbarPanel
21909
+ }
21910
+
21844
21911
  // Make sure this control is focused so that one control instance can not
21845
21912
  // be used to accidentially remove focus from another control instance.
21846
21913
  if (Fit.Dom.Contained(me.GetDomElement(), Fit.Dom.GetFocused()) === true)
@@ -21857,7 +21924,7 @@ Fit.Controls.Input = function(ctlId)
21857
21924
  }
21858
21925
  }
21859
21926
 
21860
- if (designEditor !== null)
21927
+ if (me.DesignMode() === true)
21861
21928
  {
21862
21929
  // If a dialog is open and it belongs to this control instance, and focus is found within dialog, then control is considered having focus.
21863
21930
  // However, if <body> is focused while dialog is open, control is also considered to have focus, since dialog temporarily assigns focus to
@@ -21865,7 +21932,12 @@ Fit.Controls.Input = function(ctlId)
21865
21932
  if (Fit._internal.Controls.Input.ActiveEditorForDialog === me && (Fit.Dom.Contained(Fit._internal.Controls.Input.ActiveDialogForEditor.getElement().$, Fit.Dom.GetFocused()) === true || Fit.Dom.GetFocused() === document.body))
21866
21933
  return true;
21867
21934
 
21868
- return Fit.Dom.Contained(me.GetDomElement(), Fit.Dom.GetFocused());
21935
+ // If a toolbar dialog/callout is open and contains the element currently having focus, then control is considered having focus.
21936
+ // If the dialog/callout contains an iframe in which an element has focus, then the iframe is considered focused in the main window.
21937
+ if (designEditorActiveToolbarPanel !== null && Fit.Dom.Contained(designEditorActiveToolbarPanel.DomElement, Fit.Dom.GetFocused()) === true)
21938
+ return true;
21939
+
21940
+ return Fit.Dom.GetFocused() === me.GetDomElement() || Fit.Dom.Contained(me.GetDomElement(), Fit.Dom.GetFocused());
21869
21941
  }
21870
21942
 
21871
21943
  return (Fit.Dom.GetFocused() === elm);
@@ -21889,7 +21961,7 @@ Fit.Controls.Input = function(ctlId)
21889
21961
  /*if (val.indexOf("<p>") === 0)
21890
21962
  htmlWrappedInParagraph = true; // Indicates that val is comparable with value from CKEditor which wraps content in paragraphs*/
21891
21963
 
21892
- if (designEditor !== null)
21964
+ if (designModeEnabledAndReady() === true)
21893
21965
  {
21894
21966
  // NOTICE: Invalid HTML is removed, so an all invalid HTML string will be discarded
21895
21967
  // by the editor, resulting in the editor's getData() function returning an empty string.
@@ -21900,6 +21972,8 @@ Fit.Controls.Input = function(ctlId)
21900
21972
  {
21901
21973
  CKEDITOR.instances[me.GetId() + "_DesignMode"].setData(val);
21902
21974
  });
21975
+
21976
+ updateDesignEditorPlaceholder();
21903
21977
  }
21904
21978
  else
21905
21979
  {
@@ -21930,7 +22004,7 @@ Fit.Controls.Input = function(ctlId)
21930
22004
  me._internal.FireOnChange();
21931
22005
  }
21932
22006
 
21933
- if (designEditor !== null)
22007
+ if (designModeEnabledAndReady() === true)
21934
22008
  {
21935
22009
  // If user has not changed value, then return the value initially set.
21936
22010
  // CKEditor may change (optimize) HTML when applied, but we always want
@@ -21963,7 +22037,7 @@ Fit.Controls.Input = function(ctlId)
21963
22037
  // See documentation on ControlBase
21964
22038
  this.UserValue = Fit.Core.CreateOverride(this.UserValue, function(val)
21965
22039
  {
21966
- if (Fit.Validation.IsSet(val) === true && designEditor !== null)
22040
+ if (Fit.Validation.IsSet(val) === true && me.DesignMode() === true)
21967
22041
  {
21968
22042
  designEditorDirtyPending = true;
21969
22043
  }
@@ -21974,7 +22048,7 @@ Fit.Controls.Input = function(ctlId)
21974
22048
  // See documentation on ControlBase
21975
22049
  this.IsDirty = function()
21976
22050
  {
21977
- if (designEditor !== null)
22051
+ if (me.DesignMode() === true)
21978
22052
  {
21979
22053
  // Never do value comparison in DesignMode.
21980
22054
  // A value such as "Hello world" could have been provided,
@@ -22008,6 +22082,38 @@ Fit.Controls.Input = function(ctlId)
22008
22082
  {
22009
22083
  // This will destroy control - it will no longer work!
22010
22084
 
22085
+ if (me.DesignMode() === true && designModeEnabledAndReady() === false) // DesignMode is enabled but editor is not done loading/initializing
22086
+ {
22087
+ // WARNING: This has the potential to leak memory if editor never loads and resumes task of disposing control!
22088
+ designEditorMustDisposeWhenReady = true;
22089
+
22090
+ // Editor was disposed while loading/initializing.
22091
+ // Postpone destruction of control to make sure we can clean up resources
22092
+ // reliably once editor is ready. We know that CKEditor does not dispose properly
22093
+ // unless fully loaded (it may leave an instance on the global CKEDITOR object or even fail).
22094
+ Fit.Browser.Debug("WARNING: Attempting to dispose Input control '" + me.GetId() + "' while initializing DesignMode! Control will be disposed later.");
22095
+
22096
+ // Do not keep control in user interface when disposed.
22097
+ // Mount control in document root and move it off screen (outside visible
22098
+ // viewport area). CKEditor will fail initialization if not mounted in DOM.
22099
+ me.Render(document.body);
22100
+ me.GetDomElement().style.position = "fixed";
22101
+ me.GetDomElement().style.left = "0px";
22102
+ me.GetDomElement().style.bottom = "-100px";
22103
+ me.GetDomElement().style.maxHeight = "100px";
22104
+
22105
+ // Detect memory leak
22106
+ /* setTimeout(function()
22107
+ {
22108
+ if (me !== null)
22109
+ {
22110
+ Fit.Browser.Debug("WARNING: Input in DesignMode was not properly disposed in time - potential memory leak detected");
22111
+ }
22112
+ }, 5000); // Usually the load time for an editor is barely measurable, so 5 seconds seems sufficient */
22113
+
22114
+ return;
22115
+ }
22116
+
22011
22117
  var curVal = designEditorConfig !== null && designEditorConfig.Plugins && designEditorConfig.Plugins.Images && designEditorConfig.Plugins.Images.RevokeBlobUrlsOnDispose === "UnreferencedOnly" ? me.Value() : null;
22012
22118
 
22013
22119
  if (Fit._internal.Controls.Input.ActiveEditorForDialog === me)
@@ -22051,11 +22157,16 @@ Fit.Controls.Input = function(ctlId)
22051
22157
  // Fit._internal.Controls.Input.ActiveDialogForEditor;
22052
22158
  // Fit._internal.Controls.Input.ActiveDialogForEditorCanceled;
22053
22159
 
22054
- designEditor.destroy();
22160
+ destroyDesignEditorInstance(); // Destroys editor and stops related mutation observers, timers, etc.
22055
22161
  }
22056
22162
 
22057
22163
  Fit.Internationalization.RemoveOnLocaleChanged(localize);
22058
22164
 
22165
+ /*if (designEditorUpdateSizeDebouncer !== -1)
22166
+ {
22167
+ clearTimeout(designEditorUpdateSizeDebouncer);
22168
+ }
22169
+
22059
22170
  if (mutationObserverId !== -1)
22060
22171
  {
22061
22172
  Fit.Events.RemoveMutationObserver(mutationObserverId);
@@ -22069,7 +22180,7 @@ Fit.Controls.Input = function(ctlId)
22069
22180
  if (createWhenReadyIntervalId !== -1)
22070
22181
  {
22071
22182
  clearInterval(createWhenReadyIntervalId);
22072
- }
22183
+ }*/
22073
22184
 
22074
22185
  if (debouncedOnChange !== null)
22075
22186
  {
@@ -22094,7 +22205,7 @@ Fit.Controls.Input = function(ctlId)
22094
22205
  });
22095
22206
  }
22096
22207
 
22097
- me = orgVal = preVal = input = cmdResize = designEditor = designEditorDirty = designEditorDirtyPending = designEditorConfig = designEditorRestoreButtonState = designEditorSuppressPaste = designEditorSuppressOnResize /*= htmlWrappedInParagraph*/ = wasAutoChangedToMultiLineMode = minimizeHeight = maximizeHeight = minMaxUnit = maximizeHeightConfigured = resizable = nativeResizableAvailable = mutationObserverId = rootedEventId = createWhenReadyIntervalId = isIe8 = debounceOnChangeTimeout = debouncedOnChange = imageBlobUrls = null;
22208
+ me = orgVal = preVal = input = cmdResize = designEditor = designEditorDom = designEditorDirty = designEditorDirtyPending = designEditorConfig = designEditorRestoreButtonState = designEditorSuppressPaste = designEditorSuppressOnResize = designEditorMustReloadWhenReady = designEditorMustDisposeWhenReady = designEditorUpdateSizeDebouncer = designEditorActiveToolbarPanel /*= htmlWrappedInParagraph*/ = wasAutoChangedToMultiLineMode = minimizeHeight = maximizeHeight = minMaxUnit = maximizeHeightConfigured = resizable = nativeResizableAvailable = mutationObserverId = rootedEventId = createWhenReadyIntervalId = isIe8 = debounceOnChangeTimeout = debouncedOnChange = imageBlobUrls = null;
22098
22209
 
22099
22210
  base();
22100
22211
  });
@@ -22132,20 +22243,37 @@ Fit.Controls.Input = function(ctlId)
22132
22243
  }
22133
22244
 
22134
22245
  me._internal.Data("resized", "false");
22135
- me._internal.Data("autogrow", "false");
22246
+ me._internal.Data("autogrow", me.DesignMode() === true ? "false" : null);
22136
22247
 
22137
- if (val === -1 && designEditor !== null) // Enable auto grow
22248
+ var autoGrowEnabled = false;
22249
+ if (val === -1 && designModeEnabledAndReady() === true) // Enable auto grow if editor is loaded and ready - otherwise enabled in instanceReady handler
22138
22250
  {
22139
22251
  // A value of -1 is used to reset control height (assume default height).
22140
22252
  // In DesignMode we want the control height to adjust to the content of the editor in this case.
22141
22253
  // The editor's ability to adjust to the HTML content is handled in updateDesignEditorSize() below.
22142
22254
  // Auto grow can also be enabled using configuration object passed to DesignMode(true, config).
22143
22255
  me._internal.Data("autogrow", "true"); // Make control container adjust to editor's height
22256
+ autoGrowEnabled = true;
22257
+ }
22258
+
22259
+ var hideToolbarAgain = false;
22260
+ if (isToolbarHiddenInDesignEditor() === true)
22261
+ {
22262
+ // If in DesignMode, temporarily restore toolbar to allow update to height.
22263
+ // When toolbar is hidden, a fixed height is set on the editable area which
22264
+ // prevent changes to control height.
22265
+ restoreHiddenToolbarInDesignEditor();
22266
+ hideToolbarAgain = true;
22144
22267
  }
22145
22268
 
22146
22269
  var h = base(val, unit);
22147
22270
  updateDesignEditorSize();
22148
22271
 
22272
+ if (hideToolbarAgain === true)
22273
+ {
22274
+ hideToolbarInDesignMode();
22275
+ }
22276
+
22149
22277
  // Calculate new maximize height if control is maximizable
22150
22278
  if (me.Maximizable() === true && suppressMinMax !== true)
22151
22279
  {
@@ -22154,7 +22282,7 @@ Fit.Controls.Input = function(ctlId)
22154
22282
  minMaxUnit = h.Unit;
22155
22283
  }
22156
22284
 
22157
- if (val === -1 && designEditor !== null) // Auto grow enabled
22285
+ if (autoGrowEnabled === true) // Repaint in case auto grow was enabled above
22158
22286
  {
22159
22287
  repaint();
22160
22288
  }
@@ -22178,6 +22306,7 @@ Fit.Controls.Input = function(ctlId)
22178
22306
  if (Fit.Validation.IsSet(val) === true)
22179
22307
  {
22180
22308
  input.placeholder = val;
22309
+ updateDesignEditorPlaceholder();
22181
22310
  }
22182
22311
 
22183
22312
  return (input.placeholder ? input.placeholder : "");
@@ -22291,6 +22420,12 @@ Fit.Controls.Input = function(ctlId)
22291
22420
 
22292
22421
  if (Fit.Validation.IsSet(val) === true)
22293
22422
  {
22423
+ if (me.DesignMode() === true && designModeEnabledAndReady() === false)
22424
+ {
22425
+ console.error("MultiLine(boolean) is not allowed for Input control '" + me.GetId() + "' while DesignMode editor is initializing!");
22426
+ return false; // Return current un-modified state - Input control is not in MultiLine mode when DesignMode is enabled
22427
+ }
22428
+
22294
22429
  if (me.DesignMode() === true)
22295
22430
  me.DesignMode(false);
22296
22431
 
@@ -22385,7 +22520,7 @@ Fit.Controls.Input = function(ctlId)
22385
22520
  }
22386
22521
  }
22387
22522
 
22388
- return (input.tagName === "TEXTAREA" && designEditor === null);
22523
+ return (input.tagName === "TEXTAREA" && me.DesignMode() === false);
22389
22524
  }
22390
22525
 
22391
22526
  /// <function container="Fit.Controls.Input" name="Resizable" access="public" returns="Fit.Controls.InputResizing">
@@ -22413,7 +22548,7 @@ Fit.Controls.Input = function(ctlId)
22413
22548
  //Fit.Browser.Log("Maximizable disabled as Resizable was enabled!");
22414
22549
  }
22415
22550
 
22416
- if (me.MultiLine() === false && designEditor === null)
22551
+ if (me.MultiLine() === false && me.DesignMode() === false)
22417
22552
  {
22418
22553
  me.MultiLine(true);
22419
22554
  wasAutoChangedToMultiLineMode = true;
@@ -22481,7 +22616,7 @@ Fit.Controls.Input = function(ctlId)
22481
22616
  //Fit.Browser.Log("Resizable disabled as Maximizable was enabled!");
22482
22617
  }
22483
22618
 
22484
- if (me.MultiLine() === false && designEditor === null)
22619
+ if (me.MultiLine() === false && me.DesignMode() === false)
22485
22620
  {
22486
22621
  me.MultiLine(true);
22487
22622
  wasAutoChangedToMultiLineMode = true;
@@ -22550,7 +22685,7 @@ Fit.Controls.Input = function(ctlId)
22550
22685
  {
22551
22686
  Fit.Validation.ExpectBoolean(val, true);
22552
22687
 
22553
- var autoGrowEnabled = me.Height().Value === -1 && designEditor !== null;
22688
+ var autoGrowEnabled = me.Height().Value === -1 && me.DesignMode() === true;
22554
22689
 
22555
22690
  if (Fit.Validation.IsSet(val) === true && me.Maximizable() === true && autoGrowEnabled === false)
22556
22691
  {
@@ -22615,10 +22750,13 @@ Fit.Controls.Input = function(ctlId)
22615
22750
  /// <member name="Links" type="boolean" default="undefined"> Enable links (defaults to True) </member>
22616
22751
  /// <member name="Emojis" type="boolean" default="undefined"> Enable emoji button (defaults to False) </member>
22617
22752
  /// <member name="Images" type="boolean" default="undefined"> Enable image button (defaults to false) </member>
22753
+ /// <member name="Position" type="'Top' | 'Bottom'" default="undefined"> Toolbar position (defaults to Top) </member>
22754
+ /// <member name="Sticky" type="boolean" default="undefined"> Make toolbar stick to edge of scroll container on supported browsers when scrolling (defaults to False) </member>
22755
+ /// <member name="HideInitially" type="boolean" default="undefined"> Hide toolbar until control gains focus (defaults to False) </member>
22618
22756
  /// </container>
22619
22757
 
22620
22758
  /// <container name="Fit.Controls.InputTypeDefs.DesignModeConfigInfoPanel">
22621
- /// <description> Information panel at the bottom of the editor </description>
22759
+ /// <description> Information panel at the top or bottom of the editor, depending on the location of the toolbar </description>
22622
22760
  /// <member name="Text" type="string" default="undefined"> Text to display </member>
22623
22761
  /// <member name="Alignment" type="'Left' | 'Center' | 'Right'" default="undefined"> Text alignment - defaults to Center </member>
22624
22762
  /// </container>
@@ -22740,6 +22878,7 @@ Fit.Controls.Input = function(ctlId)
22740
22878
  /// <member name="Enabled" type="boolean"> Flag indicating whether auto grow feature is enabled or not - on by default if no height is set, or if Height(-1) is set </member>
22741
22879
  /// <member name="MinimumHeight" type="{ Value: number, Unit?: Fit.TypeDefs.CssUnit }" default="undefined"> Minimum height of editable area </member>
22742
22880
  /// <member name="MaximumHeight" type="{ Value: number, Unit?: Fit.TypeDefs.CssUnit }" default="undefined"> Maximum height of editable area </member>
22881
+ /// <member name="PreventResizeBeyondMaximumHeight" type="boolean" default="undefined"> Prevent user from resizing editor beyond maximum height (see MaximumHeight property - defaults to False) </member>
22743
22882
  /// </container>
22744
22883
 
22745
22884
  /// <container name="Fit.Controls.InputTypeDefs.DesignModeConfig">
@@ -22779,6 +22918,9 @@ Fit.Controls.Input = function(ctlId)
22779
22918
  Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Links, true);
22780
22919
  Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Emojis, true);
22781
22920
  Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Images, true);
22921
+ Fit.Validation.ExpectStringValue(((editorConfig || {}).Toolbar || {}).Position, true);
22922
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Sticky, true);
22923
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).HideInitially, true);
22782
22924
  Fit.Validation.ExpectObject((editorConfig || {}).InfoPanel, true);
22783
22925
  Fit.Validation.ExpectString(((editorConfig || {}).InfoPanel || {}).Text, true);
22784
22926
  Fit.Validation.ExpectString(((editorConfig || {}).InfoPanel || {}).Alignment, true);
@@ -22791,6 +22933,7 @@ Fit.Controls.Input = function(ctlId)
22791
22933
  Fit.Validation.ExpectObject(((editorConfig || {}).AutoGrow || {}).MaximumHeight, true);
22792
22934
  Fit.Validation.ExpectNumber((((editorConfig || {}).AutoGrow || {}).MaximumHeight || {}).Value, true);
22793
22935
  Fit.Validation.ExpectStringValue((((editorConfig || {}).AutoGrow || {}).MaximumHeight || {}).Unit, true);
22936
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).AutoGrow || {}).PreventResizeBeyondMaximumHeight, true);
22794
22937
 
22795
22938
  if (editorConfig && editorConfig.Tags)
22796
22939
  {
@@ -22819,7 +22962,7 @@ Fit.Controls.Input = function(ctlId)
22819
22962
  {
22820
22963
  if (Fit.Validation.IsSet(editorConfig) === true)
22821
22964
  {
22822
- designEditorConfig = editorConfig;
22965
+ designEditorConfig = Fit.Core.Clone(editorConfig); // Clone to prevent external code from making changes later
22823
22966
  }
22824
22967
 
22825
22968
  if (Fit._internal.Controls.Input.ActiveEditorForDialog === me)
@@ -22837,6 +22980,27 @@ Fit.Controls.Input = function(ctlId)
22837
22980
  wasAutoChangedToMultiLineMode = true;
22838
22981
  }
22839
22982
 
22983
+ me._internal.Data("designmode", "true");
22984
+ me._internal.Data("toolbar", designEditorConfig !== null && designEditorConfig.Toolbar && designEditorConfig.Toolbar.HideInitially === true ? "false" : "true");
22985
+ me._internal.Data("toolbar-position", designEditorConfig !== null && designEditorConfig.Toolbar && designEditorConfig.Toolbar.Position === "Bottom" ? "bottom" : "top");
22986
+ me._internal.Data("toolbar-sticky", designEditorConfig !== null && designEditorConfig.Toolbar && designEditorConfig.Toolbar.Sticky === true ? "true" : "false");
22987
+
22988
+ // Prevent control from losing focus when HTML editor is initialized,
22989
+ // e.g. if Design Mode is enabled when ordinary input control gains focus.
22990
+ // This also prevents control from losing focus if toolbar is clicked without
22991
+ // hitting a button. A value of -1 makes it focusable, but keeps it out of
22992
+ // tab flow (keyboard navigation). Also set when Enabled(true) is called.
22993
+ me.GetDomElement().tabIndex = -1; // TabIndex is removed if DesignMode is disabled (DesignMode(false)) or if control is disabled (Enabled(false))
22994
+
22995
+ if (me.Focused() === true)
22996
+ {
22997
+ // Move focus from input to control's outer container (tabindex
22998
+ // set above) to keep focus while editor is loading/initializing.
22999
+ // Focus is moved to editor once initialization is complete - see
23000
+ // instanceReady handler.
23001
+ me.GetDomElement().focus();
23002
+ }
23003
+
22840
23004
  input.id = me.GetId() + "_DesignMode";
22841
23005
 
22842
23006
  if (window.CKEDITOR === undefined)
@@ -22936,6 +23100,21 @@ Fit.Controls.Input = function(ctlId)
22936
23100
  return;
22937
23101
  }
22938
23102
 
23103
+ // Allow light dismissable panels/callouts to prevent close/dismiss
23104
+ // when interacting with editor dialogs hosted outside of these panels/callouts,
23105
+ // by detecting the presence of the data-disable-light-dismiss="true" attribute.
23106
+
23107
+ var ckeDialogElement = this.getElement().$;
23108
+ Fit.Dom.Data(ckeDialogElement, "disable-light-dismiss", "true");
23109
+
23110
+ var bgModalLayer = document.querySelector("div.cke_dialog_background_cover"); // Shared among instances
23111
+ if (bgModalLayer !== null) // Better safe than sorry
23112
+ {
23113
+ Fit.Dom.Data(bgModalLayer, "disable-light-dismiss", "true");
23114
+ }
23115
+
23116
+ // Reduce pollution of document root
23117
+
22939
23118
  if (Fit._internal.ControlBase.ReduceDocumentRootPollution === true)
22940
23119
  {
22941
23120
  // Move dialog to control - otherwise placed in the root of the document where it pollutes,
@@ -22955,6 +23134,41 @@ Fit.Controls.Input = function(ctlId)
22955
23134
  // 2nd+ time dialog is opened it remains invisible - make it appear and position it
22956
23135
  ckeDialogElement.style.display = !CKEDITOR.env.ie || CKEDITOR.env.edge ? "flex" : ""; // https://github.com/ckeditor/ckeditor4/blob/8b208d05d1338d046cdc8f971c9faf21604dd75d/plugins/dialog/plugin.js#L152
22957
23136
  this.layout(); // 'this' is the dialog instance - layout() positions dialog
23137
+
23138
+ // Temporarily move modal background layer next to control to ensure it is part of same
23139
+ // stacking context as control and dialog. Otherwise it might stay on top of a panel containing
23140
+ // the editor, if that panel has position:fixed (which creates a separate stacking context)
23141
+ // and a lower z-index than the background layer.
23142
+ // Be aware that the background layer also has position:fixed so it will "escape" a parent
23143
+ // container that also has position:fixed, still making it stretch from the upper left corner
23144
+ // of the screen to the lower right corner of the screen. However, if a parent is using
23145
+ // CSS transform, it will prevent the background layer from escaping, instead positioning it
23146
+ // and making it stretch from the upper left corner of the container using transform, to the
23147
+ // lower right corner of that container.
23148
+ // Also be aware that the use of transform will cause minor problems when moving/dragging dialog,
23149
+ // although that is not related to remounting of the background layer.
23150
+ var bgModalLayer = document.querySelector("div.cke_dialog_background_cover");
23151
+ if (bgModalLayer !== null) // Better safe than sorry
23152
+ {
23153
+ Fit.Dom.InsertAfter(Fit._internal.Controls.Input.ActiveEditorForDialog.GetDomElement(), bgModalLayer);
23154
+ }
23155
+
23156
+ if (ev.sender.definition.title === "Image")
23157
+ {
23158
+ // Hide image resize handles placed in the root of the document.
23159
+ // When the modal background layer above is rooted next to the control,
23160
+ // it becomes impossible to ensure the resize handles remains hidden behind
23161
+ // the background layer, since the control may be part of a stacking context
23162
+ // different from the one containing the image resize handles (document root).
23163
+ // It would require dynamic z-index values to achieve this. Therefore the
23164
+ // resize handles are temporarily hidden instead.
23165
+
23166
+ var imageResizeHandlersContainer = document.querySelector("#ckimgrsz");
23167
+ if (imageResizeHandlersContainer !== null) // Better safe than sorry
23168
+ {
23169
+ imageResizeHandlersContainer.style.display = "none";
23170
+ }
23171
+ }
22958
23172
  }
22959
23173
  });
22960
23174
 
@@ -22970,6 +23184,29 @@ Fit.Controls.Input = function(ctlId)
22970
23184
  delete Fit._internal.Controls.Input.ActiveDialogForEditor;
22971
23185
  delete Fit._internal.Controls.Input.ActiveDialogForEditorCanceled;
22972
23186
 
23187
+ if (Fit._internal.ControlBase.ReduceDocumentRootPollution === true)
23188
+ {
23189
+ // Return modal background layer to document root - it was temporarily moved
23190
+ // next to control to ensure it works properly with current stacking context.
23191
+ // See comments regarding this in dialog "show" handler registered above.
23192
+ // The background layer will not work for other editor instances if not moved back.
23193
+ var bgModalLayer = document.querySelector("div.cke_dialog_background_cover");
23194
+ if (bgModalLayer !== null) // Better safe than sorry
23195
+ {
23196
+ Fit.Dom.Add(document.body, bgModalLayer);
23197
+ }
23198
+
23199
+ // Allow image resize handlers to show up again (hidden in "show" handler registered above)
23200
+ if (ev.sender.definition.title === "Image")
23201
+ {
23202
+ var imageResizeHandlersContainer = document.querySelector("#ckimgrsz");
23203
+ if (imageResizeHandlersContainer !== null) // Better safe than sorry
23204
+ {
23205
+ imageResizeHandlersContainer.style.display = "";
23206
+ }
23207
+ }
23208
+ }
23209
+
22973
23210
  // Disable focus lock - let ControlBase handle OnFocus and OnBlur automatically again.
22974
23211
  // This is done postponed since unlocking it immediately will cause OnFocus to fire when
22975
23212
  // dialog returns focus to the editor.
@@ -23065,24 +23302,22 @@ Fit.Controls.Input = function(ctlId)
23065
23302
  me.Maximized(false);
23066
23303
  }
23067
23304
 
23068
- if (enableAutoGrow === true && me.Height().Value !== -1)
23069
- {
23070
- me.Height(-1); // Enables auto grow
23071
- }
23072
-
23073
- me._internal.Data("designmode", "true");
23074
- me._internal.Data("autogrow", enableAutoGrow === true ? "true" : "false"); // Ensure proper value in case Height(..), which is responsible for updating data-autogrow, is never called
23075
23305
  repaint();
23076
23306
  }
23077
23307
  else if (val === false && designMode === true)
23078
23308
  {
23309
+ if (designModeEnabledAndReady() === false)
23310
+ {
23311
+ console.error("DesignMode(false) is not allowed for Input control '" + me.GetId() + "' while DesignMode editor is initializing!");
23312
+ return true; // Return current un-modified state - DesignMode remains enabled
23313
+ }
23314
+
23079
23315
  var focused = me.Focused();
23080
23316
 
23081
23317
  if (Fit._internal.Controls.Input.ActiveEditorForDialog === me)
23082
23318
  {
23083
23319
  if (Fit._internal.Controls.Input.ActiveDialogForEditor !== null)
23084
23320
  {
23085
- focused = true; // Always considered focused when a dialog is open - Focused() returns False which is actually the truth
23086
23321
  Fit._internal.Controls.Input.ActiveDialogForEditor.hide(); // Fires dialog's OnHide event
23087
23322
  }
23088
23323
  else
@@ -23109,19 +23344,25 @@ Fit.Controls.Input = function(ctlId)
23109
23344
  }
23110
23345
  }
23111
23346
 
23347
+ if (designEditorActiveToolbarPanel !== null)
23348
+ {
23349
+ designEditorActiveToolbarPanel.CloseEmojiPanel();
23350
+ }
23351
+
23112
23352
  // Destroy editor - content is automatically synchronized to input control.
23113
23353
  // Calling destroy() fires OnHide for any dialog currently open, which in turn
23114
23354
  // disables locked focus state and returns focus to the control.
23115
- if (designEditor !== null) // Will be null if DesignMode is being disabled while CKEditor resources are loading, in which case editor has not yet been created - e.g. DesignMode(true); DesignMode(false);
23116
- {
23117
- designEditor.destroy();
23118
- designEditor = null;
23119
- }
23355
+ destroyDesignEditorInstance();
23120
23356
 
23121
23357
  me._internal.Data("designmode", "false");
23122
- me._internal.Data("autogrow", "false");
23123
23358
  Fit.Dom.Data(me.GetDomElement(), "resized", "false");
23124
23359
 
23360
+ // Remove DesignMode specific data attributes
23361
+ me._internal.Data("autogrow", null);
23362
+ me._internal.Data("toolbar", null);
23363
+ me._internal.Data("toolbar-position", null);
23364
+ me._internal.Data("toolbar-sticky", null);
23365
+
23125
23366
  revertToSingleLineIfNecessary();
23126
23367
 
23127
23368
  // Remove tabindex used to prevent control from losing focus when clicking toolbar buttons
@@ -23407,22 +23648,39 @@ Fit.Controls.Input = function(ctlId)
23407
23648
  item.name = item.Title;
23408
23649
  });
23409
23650
 
23410
- resolve(items);
23651
+ resolve(items); // Opens context menu immediately if array contain elements, unless user managed to add a space after the search value while waiting for a response, in which case the context menu will not be opened
23411
23652
 
23412
- if (items.length > 0 && Fit._internal.ControlBase.ReduceDocumentRootPollution === true)
23653
+ if (items.length > 0)
23413
23654
  {
23414
- // Calling resolve(..) above immediately opens the context menu from which
23415
- // a tag can be selected. However, it is placed in the root of the document
23416
- // where it pollutes the global scope. Move it next to the Fit.UI control.
23417
- // We do not mount it within the Fit.UI control as it could cause Fit.UI styles
23418
- // to take effect on the context menu.
23655
+ // Calling resolve(..) above immediately opens the context menu from which a tag can be selected
23419
23656
 
23420
23657
  // Get the autocomplete context menu currently open. There can be only one
23421
23658
  // such menu open at any time. Each editor can declare multiple autocomplete
23422
23659
  // context menus since each tag marker is associated with its own context menu.
23423
23660
  var ctm = document.querySelector("ul.cke_autocomplete_opened");
23424
- ctm.style.position = "fixed"; // Has position:absolute by default, but this may be affected by a positioned container (offsetParent) - downside: it no longer sticks to the editor when scrolling
23425
- Fit.Dom.InsertAfter(me.GetDomElement(), ctm);
23661
+
23662
+ if (ctm !== null) // Null if user managed to enter a space after tag search value, before response was received - in this case resolve(..) above will not open the context menu
23663
+ {
23664
+ // Allow light dismissable panels/callouts to prevent close/dismiss
23665
+ // when interacting with tags context menu hosted outside of these panels/callouts,
23666
+ // by detecting the presence of the data-disable-light-dismiss="true" attribute.
23667
+ Fit.Dom.Data(ctm, "disable-light-dismiss", "true");
23668
+
23669
+ if (Fit._internal.ControlBase.ReduceDocumentRootPollution === true)
23670
+ {
23671
+ // Tags context menu is placed in the root of the document where
23672
+ // it pollutes the global scope. Move it next to the Fit.UI control.
23673
+ // We do not mount it within the Fit.UI control as it could cause Fit.UI styles
23674
+ // to take effect on the context menu.
23675
+
23676
+ // Has position:absolute by default, but this may be affected by a positioned
23677
+ // container (offsetParent), so we change it to position:fixed. Downside:
23678
+ // It no longer sticks to the editor when scrolling. However, if a container has CSS
23679
+ // transform set, the context menu's position will be affected and become inaccurate.
23680
+ ctm.style.position = "fixed";
23681
+ Fit.Dom.InsertAfter(me.GetDomElement(), ctm);
23682
+ }
23683
+ }
23426
23684
  }
23427
23685
  };
23428
23686
 
@@ -23518,19 +23776,6 @@ Fit.Controls.Input = function(ctlId)
23518
23776
  });
23519
23777
  }
23520
23778
 
23521
- // Prevent control from losing focus when HTML editor is initialized,
23522
- // e.g. if Design Mode is enabled when ordinary input control gains focus.
23523
- // This also prevents control from losing focus if toolbar is clicked without
23524
- // hitting a button. A value of -1 makes it focusable, but keeps it out of
23525
- // tab flow (keyboard navigation).
23526
- me.GetDomElement().tabIndex = -1; // TabIndex is removed if DesignMode is disabled
23527
-
23528
- var focused = me.Focused();
23529
- if (focused === true)
23530
- {
23531
- me.GetDomElement().focus(); // Outer container is focusable - tabIndex set above
23532
- }
23533
-
23534
23779
  var onImageAdded = function(args)
23535
23780
  {
23536
23781
  if (args.type === "blob")
@@ -23569,6 +23814,8 @@ Fit.Controls.Input = function(ctlId)
23569
23814
 
23570
23815
  designEditor = CKEDITOR.replace(me.GetId() + "_DesignMode",
23571
23816
  {
23817
+ toolbarLocation: designEditorConfig !== null && designEditorConfig.Toolbar && designEditorConfig.Toolbar.Position === "Bottom" ? "bottom" : "top",
23818
+ uiColor: Fit._internal.Controls.Input.Editor.Skin === "moono-lisa" || Fit._internal.Controls.Input.Editor.Skin === null ? "#FFFFFF" : undefined,
23572
23819
  //allowedContent: true, // http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules and http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent
23573
23820
  extraAllowedContent: "a[data-tag-type,data-tag-id,data-tag-data]", // https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraAllowedContent
23574
23821
  language: lang,
@@ -23578,7 +23825,7 @@ Fit.Controls.Input = function(ctlId)
23578
23825
  title: "",
23579
23826
  width: "100%", // Assume width of container
23580
23827
  height: me.Height().Value > -1 ? me.Height().Value + me.Height().Unit : "100%", // Height of content area - toolbar and bottom panel takes up additional space - once editor is loaded, the outer dimensions are accurately set using updateDesignEditorSize() - a height of 100% enables auto grow
23581
- startupFocus: focused === true ? "end" : false,
23828
+ startupFocus: me.Focused() === true ? "end" : false, // Doesn't work when editor is hidden while initializing to avoid flickering - focus is set again when editor is made visible in instanceReady handler, at which point it will place cursor at the end of the editor if startupFocus is set to "end"
23582
23829
  extraPlugins: plugins.join(","),
23583
23830
  clipboard_handleImages: false, // Disable native support for image pasting - allow base64imagepaste plugin to handle image data if loaded
23584
23831
  base64image: // Custom property used by base64image plugin if loaded
@@ -23596,72 +23843,189 @@ Fit.Controls.Input = function(ctlId)
23596
23843
  toolbar: toolbar,
23597
23844
  removeButtons: "", // Set to empty string to prevent CKEditor from removing buttons such as Underline
23598
23845
  mentions: mentions,
23846
+ emoji_minChars: 9999, // Impossible requirement to number of search characters to "disable" emoji auto complete menu - we cannot make it work properly with light dismissable panels/callouts since we have no event available for registering the data-disable-light-dismiss="true" attribute, and it's not very useful in any case
23599
23847
  on:
23600
23848
  {
23601
23849
  instanceReady: function()
23602
23850
  {
23603
- Fit.Dom.Data(designEditor.container.$, "skin", CKEDITOR.config.skin); // Add e.g. data-skin="bootstrapck" to editor - used in Input.css
23604
-
23605
- // Enabled state might have been changed while loading.
23606
- // Unfortunately there is no API for changing the tabIndex.
23607
- designEditor.setReadOnly(me.Enabled() === false);
23608
- designEditor.container.$.querySelector("[contenteditable]").tabIndex = me.Enabled() === false ? -1 : 0;
23851
+ designEditorDom = // Object assignment will make designModeEnabledAndReady() return True, so it must be assigned immediately
23852
+ {
23853
+ OuterContainer: designEditor.container.$,
23854
+ InnerContainer: designEditor.container.$.querySelector(".cke_inner"),
23855
+ Top: designEditor.container.$.querySelector(".cke_top"), // Null if toolbar is placed at the bottom
23856
+ Content: designEditor.container.$.querySelector(".cke_contents"),
23857
+ Editable: designEditor.container.$.querySelector(".cke_editable"),
23858
+ Bottom: designEditor.container.$.querySelector(".cke_bottom") // Only exist if editor is resizable or toolbar is placed at the bottom
23859
+ }
23609
23860
 
23610
- if (focused === true)
23861
+ // Make sure expected DOM elements are present, so we do not have to perform null checks anywhere else in the code.
23862
+ // Notice that designEditorDom.Top is null if toolbar is placed at the bottom, and designEditorDom.Bottom is null
23863
+ // unless toolbar is placed at the bottom, or editor is resizable, which adds a resize handled in the lower right corner.
23864
+ if (designEditorDom.InnerContainer === null || designEditorDom.Content === null || designEditorDom.Editable === null || (designEditorDom.Top === null && designEditorDom.Bottom === null))
23611
23865
  {
23612
- me.Focused(true); // Focus actual input area rather than outer container temporarily focused further up
23866
+ throw "One or more editor DOM elements are missing"; // This should only happen if CKEditor changes its DOM structure
23613
23867
  }
23614
23868
 
23615
- var maximized = me.Maximized(); // Call to Height(..) below will minimize control
23869
+ if (designEditorMustDisposeWhenReady === true)
23870
+ {
23871
+ Fit.Browser.Debug("WARNING: Input control '" + me.GetId() + "' was disposed while initializing DesignMode - now resuming disposal");
23872
+ me.Dispose();
23873
+ return;
23874
+ }
23616
23875
 
23617
- if (maximized === true)
23876
+ if (designEditorMustReloadWhenReady === true)
23618
23877
  {
23619
- me.Maximized(false); // Minimize to allow editor to initially assume normal height - maximized again afterwards
23878
+ Fit.Browser.Debug("WARNING: Editor for Input control '" + me.GetId() + "' finished loading, but properties affecting editor has changed while initializing - reloading to adjust to changes");
23879
+ reloadEditor(true);
23880
+ return;
23620
23881
  }
23621
23882
 
23883
+ updateDesignEditorPlaceholder(); // Show/hide placeholder - value might have been set/removed while initializing editor
23884
+
23885
+ Fit.Dom.Data(designEditorDom.OuterContainer, "skin", CKEDITOR.config.skin); // Add e.g. data-skin="bootstrapck" to editor - used in Input.css
23886
+
23887
+ // Enabled state might have been changed while loading.
23888
+ // Unfortunately there is no API for changing the tabIndex.
23889
+ // Similar logic is found in Enabled(..) function.
23890
+ designEditor.setReadOnly(me.Enabled() === false);
23891
+ Fit.Dom.Attribute(designEditorDom.Editable, "tabindex", me.Enabled() === false ? null : "0"); // Preventing focus is only possible by nullifying DOM attribute (these does not work: delete elm.tabIndex; elm.tabIndex = null|undefined|-1)
23892
+
23622
23893
  if (me.Height().Value === -1 || (designEditorConfig !== null && designEditorConfig.AutoGrow && designEditorConfig.AutoGrow.Enabled === true))
23623
23894
  {
23624
- // Enable auto grow
23895
+ // Enable auto grow - this is done late to allow an initial static height on the outer control which prevents "flickering" while loading
23625
23896
 
23626
- if (me.Height().Value !== -1) // Enable auto grow if not already enabled
23627
- {
23628
- me.Height(-1);
23629
- }
23897
+ me.Height(-1); // Make sure auto grow is enabled since it is unlikely external code has done so explicitely by calling Height(-1)
23630
23898
 
23631
23899
  // Make necessary adjustments to editor DOM for auto grow's min/max height to work
23632
23900
 
23633
- var editorContainer = designEditor.container.$;
23634
- var editableDiv = editorContainer.querySelector("div.cke_wysiwyg_div");
23635
- editableDiv.style.minHeight = config.AutoGrow && config.AutoGrow.MinimumHeight ? config.AutoGrow.MinimumHeight.Value + (config.AutoGrow.MinimumHeight.Unit || "px") : ""; // NOTICE: Minimum height of editable area, not control
23636
- editableDiv.style.maxHeight = config.AutoGrow && config.AutoGrow.MaximumHeight ? config.AutoGrow.MaximumHeight.Value + (config.AutoGrow.MaximumHeight.Unit || "px") : ""; // NOTICE: Maximum height of editable area, not control
23637
- }
23901
+ var editableDiv = designEditorDom.Editable;
23902
+ editableDiv.style.minHeight = designEditorConfig !== null && designEditorConfig.AutoGrow && designEditorConfig.AutoGrow.MinimumHeight ? designEditorConfig.AutoGrow.MinimumHeight.Value + (designEditorConfig.AutoGrow.MinimumHeight.Unit || "px") : ""; // NOTICE: Minimum height of editable area, not control
23903
+ editableDiv.style.maxHeight = designEditorConfig !== null && designEditorConfig.AutoGrow && designEditorConfig.AutoGrow.MaximumHeight ? designEditorConfig.AutoGrow.MaximumHeight.Value + (designEditorConfig.AutoGrow.MaximumHeight.Unit || "px") : ""; // NOTICE: Maximum height of editable area, not control
23638
23904
 
23639
- if (maximized === true)
23640
- {
23641
- me.Maximized(true);
23905
+ // Restrict resizing:
23906
+ // Make sure user cannot resize editor beyond max height of editable area.
23907
+ // Editable area will not "follow" since it is restricted using maxHeight set above.
23908
+ // If we do not want resizing to be restricted, then unset minHeight and maxHeight set
23909
+ // above, when resizing occur (see CKEditor's resize event handler).
23910
+ if (editableDiv.style.maxHeight !== "" && designEditorConfig.AutoGrow.PreventResizeBeyondMaximumHeight === true)
23911
+ {
23912
+ var contents = designEditorDom.Content;
23913
+ contents.style.maxHeight = editableDiv.style.maxHeight;
23914
+ }
23642
23915
  }
23643
23916
 
23644
- if (config.InfoPanel && config.InfoPanel.Text)
23917
+ if (designEditorConfig !== null && designEditorConfig.InfoPanel && designEditorConfig.InfoPanel.Text)
23645
23918
  {
23646
23919
  var infoPanel = document.createElement("div");
23647
23920
  infoPanel.className = "FitUiControlInputInfoPanel";
23648
- infoPanel.innerHTML = config.InfoPanel.Text;
23649
- infoPanel.style.cssText = "text-align: " + (config.InfoPanel.Alignment ? config.InfoPanel.Alignment.toLowerCase() : "center");
23921
+ infoPanel.innerHTML = designEditorConfig.InfoPanel.Text;
23922
+ infoPanel.style.cssText = "text-align: " + (designEditorConfig.InfoPanel.Alignment ? designEditorConfig.InfoPanel.Alignment.toLowerCase() : "center");
23923
+
23924
+ if (designEditorConfig !== null && designEditorConfig.Toolbar && designEditorConfig.Toolbar.Position === "Bottom")
23925
+ {
23926
+ Fit.Dom.InsertBefore(designEditorDom.Content, infoPanel);
23927
+ }
23928
+ else
23929
+ {
23930
+ Fit.Dom.InsertAfter(designEditorDom.Content, infoPanel);
23931
+ }
23932
+ }
23933
+
23934
+ // Register necessary events with emoji panel when opened
23650
23935
 
23651
- var ckEditorInner = designEditor.container.$.querySelector(".cke_inner"); // Div in modern browsers, span in legacy IE
23652
- var ckEditorBottom = designEditor.container.$.querySelector(".cke_inner span.cke_bottom"); // Only present if resize handle is enable
23936
+ var emojiButton = designEditor.container.$.querySelector("a.cke_button__emojipanel");
23653
23937
 
23654
- if (ckEditorInner !== null)
23938
+ if (emojiButton !== null) // Better safe than sorry
23939
+ {
23940
+ Fit.Events.AddHandler(emojiButton, "click", function(e)
23655
23941
  {
23656
- if (ckEditorBottom !== null)
23942
+ // Make sure OnFocus fires before locking focus state
23943
+
23944
+ if (me.Focused() === false)
23657
23945
  {
23658
- Fit.Dom.InsertBefore(ckEditorBottom, infoPanel);
23946
+ // Control not focused - make sure OnFocus fires when emoji button is clicked,
23947
+ // and make sure ControlBase internally considers itself focused, so there is
23948
+ // no risk of OnFocus being fired twice without OnBlur firing in between,
23949
+ // when focus state is unlocked, and focus is perhaps re-assigned to another
23950
+ // DOM element within the control, which will be the case if the design editor
23951
+ // is switched back to an ordinary input field (e.g. using DesignMode(false)).
23952
+ me.Focused(true);
23659
23953
  }
23660
- else
23954
+
23955
+ // Prevent control from firing OnBlur when emoji dialog is opened.
23956
+ // Notice that locking the focus state will also prevent OnFocus
23957
+ // from being fired automatically.
23958
+ me._internal.FocusStateLocked(true);
23959
+
23960
+ setTimeout(function() // Postpone - emoji panel is made visible after click event
23661
23961
  {
23662
- Fit.Dom.Add(ckEditorInner, infoPanel);
23663
- }
23664
- }
23962
+ // Allow light dismissable panels/callouts to prevent close/dismiss
23963
+ // when interacting with emoji widget hosted outside of panels/callouts,
23964
+ // by detecting the presence of a data-disable-light-dismiss="true" attribute.
23965
+ var emojiPanel = document.querySelector("div.cke_emoji-panel"); // Shared among instances
23966
+
23967
+ if (emojiPanel !== null) // Better safe than sorry
23968
+ {
23969
+ Fit.Dom.Data(emojiPanel, "disable-light-dismiss", "true");
23970
+
23971
+ emojiPanel._associatedFitUiControl = me;
23972
+
23973
+ designEditorActiveToolbarPanel =
23974
+ {
23975
+ DomElement: emojiPanel,
23976
+ UnlockFocusStateIfEmojiPanelIsClosed: function() // Function called regularly via interval timer while emoji panel is open to make sure focus state is unlocked when emoji panel is closed, e.g. by pressing ESC, clicking outside of emoji panel, or by choosing an emoji
23977
+ {
23978
+ if (designModeEnabledAndReady() === false /* No longer in DesignMode */ || Fit.Dom.IsVisible(emojiPanel) === false /* Emoji panel closed */ || emojiPanel._associatedFitUiControl !== me /* Emoji panel now opened from another editor */)
23979
+ {
23980
+ designEditorActiveToolbarPanel = null;
23981
+
23982
+ // Disable focus lock - let ControlBase handle OnFocus and OnBlur automatically again
23983
+ me._internal.FocusStateLocked(false);
23984
+
23985
+ // Fire OnBlur in case user changed focus while emoji panel was open.
23986
+ // OnBlur does not fire automatically when focus state is locked.
23987
+ if (me.Focused() === false)
23988
+ {
23989
+ me._internal.FireOnBlur();
23990
+ }
23991
+ }
23992
+ },
23993
+ CloseEmojiPanel: function()
23994
+ {
23995
+ if (emojiPanel._associatedFitUiControl === me && Fit.Dom.IsVisible(emojiPanel) === true && Fit.Dom.Contained(emojiPanel, Fit.Dom.GetFocused()) === true)
23996
+ {
23997
+ designEditor.focus();
23998
+ designEditorActiveToolbarPanel.UnlockFocusStateIfEmojiPanelIsClosed();
23999
+ }
24000
+ }
24001
+ }
24002
+ }
24003
+
24004
+ var checkClosedId = setInterval(function()
24005
+ {
24006
+ // Invoke cleanup function regularly to make sure
24007
+ // focus lock is relased when emoji panel is closed,
24008
+ // and to fire OnBlur if another control was focused
24009
+ // while emoji panel was open.
24010
+
24011
+ if (me === null)
24012
+ {
24013
+ clearInterval(checkClosedId);
24014
+ return;
24015
+ }
24016
+
24017
+ if (designEditorActiveToolbarPanel !== null)
24018
+ {
24019
+ designEditorActiveToolbarPanel.UnlockFocusStateIfEmojiPanelIsClosed(); // Nullfies designEditorActiveToolbarPanel if emoji panel is closed
24020
+ }
24021
+
24022
+ if (designEditorActiveToolbarPanel === null)
24023
+ {
24024
+ clearInterval(checkClosedId);
24025
+ }
24026
+ }, 250);
24027
+ }, 0);
24028
+ });
23665
24029
  }
23666
24030
 
23667
24031
  // DISABLED: Doesn't work! Emoji panel contains an iFrame. When it is re-mounted
@@ -23695,14 +24059,40 @@ Fit.Controls.Input = function(ctlId)
23695
24059
  }
23696
24060
  }*/
23697
24061
 
23698
- designEditor._isReadyForInteraction = true;
23699
-
23700
24062
  // Make editor assume configured width and height.
23701
24063
  // Notice that using config.width and config.height
23702
24064
  // (https://ckeditor.com/docs/ckeditor4/latest/features/size.html)
23703
24065
  // results in editor becoming too high since the toolbar height is not
23704
24066
  // substracted. This problem does not occur when using updateDesignEditorSize().
23705
- updateDesignEditorSize(); // Important: Make sure designEditor._isReadyForInteraction is set first (see above)
24067
+ updateDesignEditorSize();
24068
+
24069
+ if (me.Focused() === false)
24070
+ {
24071
+ // Hide editor toolbar if configured to do so
24072
+ hideToolbarInDesignMode();
24073
+ }
24074
+ else
24075
+ {
24076
+ // Remove placeholder if initially focused
24077
+ updateDesignEditorPlaceholder(true);
24078
+ }
24079
+
24080
+ // Make editor visible - postpone to allow editor to first calculate auto grow height
24081
+ // so the user will not see the chrome (borders) of the editor increase its height.
24082
+ setTimeout(function()
24083
+ {
24084
+ designEditorDom.OuterContainer.style.visibility = "visible";
24085
+
24086
+ // Because editor is hidden while initializing, startupFocus
24087
+ // (https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-startupFocus)
24088
+ // won't be able to place focus in the editor. We resolve this by assigning focus again
24089
+ // once editor is visible (visibility set above). Because startupFocus was set, it will
24090
+ // place focus at the end of the editor as expected.
24091
+ if (me.Focused() === true)
24092
+ {
24093
+ designEditor.focus();
24094
+ }
24095
+ }, 0);
23706
24096
  },
23707
24097
  change: function() // CKEditor bug: not fired in Opera 12 (possibly other old versions as well)
23708
24098
  {
@@ -23727,16 +24117,43 @@ Fit.Controls.Input = function(ctlId)
23727
24117
  {
23728
24118
  if (designEditorSuppressOnResize === false) // Only set data-resized="true" when resized using resize handle
23729
24119
  {
24120
+ // Disable Min/Max height configured with auto grow feature so user can resize it freely, unless PreventResizeBeyondMaximumHeight is enabled
24121
+ if (designEditorConfig !== null && designEditorConfig.AutoGrow && designEditorConfig.AutoGrow.Enabled === true && designEditorConfig.AutoGrow.PreventResizeBeyondMaximumHeight !== true)
24122
+ {
24123
+ var editableDiv = designEditorDom.Editable;
24124
+ editableDiv.style.minHeight = "";
24125
+ editableDiv.style.maxHeight = "";
24126
+
24127
+ var contents = designEditorDom.Content;
24128
+ contents.style.maxHeight = "";
24129
+ }
24130
+
23730
24131
  me._internal.Data("resized", "true");
23731
24132
  repaint();
23732
24133
  }
23733
24134
  },
23734
24135
  selectionChange: function(ev)
23735
24136
  {
23736
- // Disable/enable toolbar buttons, depending on whether a tag/mention is selected
23737
-
23738
24137
  var elm = ev.data.selection.getStartElement().$;
23739
24138
 
24139
+ // Allow light dismissable panels/callouts to prevent close/dismiss
24140
+ // when interacting with image resize handles hosted outside of panels/callouts,
24141
+ // by detecting the presence of a data-disable-light-dismiss="true" attribute.
24142
+
24143
+ if (elm.tagName === "IMG")
24144
+ {
24145
+ setTimeout(function() // Postpone - wait for image resize plugin to add image resize handles
24146
+ {
24147
+ var imageResizeHandlesContainer = document.querySelector("#ckimgrsz");
24148
+ if (imageResizeHandlesContainer !== null) // Better safe than sorry
24149
+ {
24150
+ Fit.Dom.Data(imageResizeHandlesContainer, "disable-light-dismiss", "true");
24151
+ }
24152
+ }, 0);
24153
+ }
24154
+
24155
+ // Disable/enable toolbar buttons, depending on whether a tag/mention is selected
24156
+
23740
24157
  if (elm.tagName === "A" && Fit.Dom.Data(elm, "tag-id") !== null)
23741
24158
  {
23742
24159
  designEditorSuppressPaste = true;
@@ -23916,9 +24333,15 @@ Fit.Controls.Input = function(ctlId)
23916
24333
 
23917
24334
  function updateDesignEditorSize()
23918
24335
  {
23919
- if (designEditor !== null)
24336
+ if (me.DesignMode() === true)
23920
24337
  {
23921
- if (designEditor._isReadyForInteraction !== true)
24338
+ if (designEditorUpdateSizeDebouncer !== -1)
24339
+ {
24340
+ clearTimeout(designEditorUpdateSizeDebouncer);
24341
+ designEditorUpdateSizeDebouncer = -1;
24342
+ }
24343
+
24344
+ if (designModeEnabledAndReady() === false)
23922
24345
  {
23923
24346
  // Postpone, editor is not ready yet.
23924
24347
  // This may happen when editor is created and Width(..) is
@@ -23927,7 +24350,12 @@ Fit.Controls.Input = function(ctlId)
23927
24350
  // This is a problem because CKEditor uses setTimeout(..) to for instance
23928
24351
  // allow early registration of events, and because resources are loaded
23929
24352
  // in an async. manner.
23930
- setTimeout(updateDesignEditorSize, 100);
24353
+ designEditorUpdateSizeDebouncer = setTimeout(function()
24354
+ {
24355
+ designEditorUpdateSizeDebouncer = -1;
24356
+ updateDesignEditorSize();
24357
+ }, 100);
24358
+
23931
24359
  return;
23932
24360
  }
23933
24361
 
@@ -23970,6 +24398,97 @@ Fit.Controls.Input = function(ctlId)
23970
24398
  }
23971
24399
  }
23972
24400
 
24401
+ function isToolbarHiddenInDesignEditor() // Returns True if editor is fully loaded and toolbar is hidden
24402
+ {
24403
+ var toolbarContainer = designModeEnabledAndReady() === true ? designEditorDom.Top || designEditorDom.Bottom : null; // Top is null if editor is placed at the bottom
24404
+ return (toolbarContainer !== null && toolbarContainer.style.display === "none");
24405
+ }
24406
+
24407
+ function hideToolbarInDesignMode() // Editor must be fully loaded before calling this function!
24408
+ {
24409
+ if (designEditorConfig !== null && designEditorConfig.Toolbar && designEditorConfig.Toolbar.HideInitially === true)
24410
+ {
24411
+ var toolbarContainer = designEditorDom.Top || designEditorDom.Bottom; // Top is null if editor is placed at the bottom
24412
+
24413
+ if (toolbarContainer.style.display === "none")
24414
+ {
24415
+ return; // Already hidden
24416
+ }
24417
+
24418
+ // Prevent editor from increasing its height when toolbar is shown.
24419
+ // This is not ideal. We use the top/bottom's (toolbar's) height but it might change
24420
+ // if window is resized, which will cause buttons to "word wrap". But that is
24421
+ // acceptable. In this case the editor might change dimensions when toolbar is
24422
+ // shown and static height on content area is removed in OnFocus handler registered
24423
+ // in init().
24424
+
24425
+ var content = designEditorDom.Editable;
24426
+ content.style.height = toolbarContainer.offsetHeight + content.offsetHeight + "px";
24427
+
24428
+ // Hide toolbar
24429
+
24430
+ toolbarContainer.style.display = "none";
24431
+
24432
+ // Make editable area adjust to take up space previously consumed by toolbar
24433
+ updateDesignEditorSize();
24434
+ }
24435
+ }
24436
+
24437
+ function restoreHiddenToolbarInDesignEditor()
24438
+ {
24439
+ if (designModeEnabledAndReady() === true && designEditorConfig !== null && designEditorConfig.Toolbar && designEditorConfig.Toolbar.HideInitially === true)
24440
+ {
24441
+ // Toolbar has been initially hidden - make it appear again
24442
+
24443
+ var toolbarContainer = designEditorDom.Top || designEditorDom.Bottom; // Top is null if editor is placed at the bottom
24444
+
24445
+ if (toolbarContainer.style.display === "")
24446
+ {
24447
+ return; // Already restored - no longer hidden
24448
+ }
24449
+
24450
+ toolbarContainer.style.display = "";
24451
+
24452
+ // Hiding the toolbar will cause the editor to decrease its height, while displaying the toolbar again
24453
+ // will cause it to increase its height. To avoid this "flickering" a fixed height (toolbar height + content height)
24454
+ // was applied when toolbar was hidden. But now that the toolbar is once again visible, we remove the fixed height
24455
+ // again - otherwise resizing and auto grow will not work.
24456
+
24457
+ var content = designEditorDom.Editable;
24458
+ content.style.height = "";
24459
+
24460
+ me._internal.Data("toolbar", "true");
24461
+
24462
+ // Update size of editable area in case auto grow is not enabled, in which case
24463
+ // toolbar will now have taken up space outside of control's container (overflowing).
24464
+ // Make editable area fit control container again.
24465
+ updateDesignEditorSize();
24466
+ }
24467
+ }
24468
+
24469
+ function updateDesignEditorPlaceholder(clearPlaceholder)
24470
+ {
24471
+ Fit.Validation.ExpectBoolean(clearPlaceholder, true);
24472
+
24473
+ if (designModeEnabledAndReady() === true)
24474
+ {
24475
+ if (Fit.Browser.GetBrowser() === "MSIE" && Fit.Browser.GetVersion() < 10)
24476
+ {
24477
+ // Native support for placeholders (using the real placeholder attribute) was
24478
+ // introduced in IE10, so we want to ensure consistent behaviour for all controls,
24479
+ // as e.g. Input and DatePicker uses the native placeholder implementation.
24480
+ return;
24481
+ }
24482
+
24483
+ // WARNING: Retrieving value from editor is expensive! Do not
24484
+ // call updateDesignEditorPlaceholder() too often (e.g. OnChange).
24485
+ // Simply make sure placeholder is updated OnFocus and OnBlur.
24486
+
24487
+ var val = clearPlaceholder !== true && me.Value() === "" ? me.Placeholder() : "";
24488
+ Fit.Dom.Data(designEditorDom.Editable, "placeholder", val || null);
24489
+ }
24490
+ }
24491
+
23973
24492
  function revertToSingleLineIfNecessary()
23974
24493
  {
23975
24494
  if (wasAutoChangedToMultiLineMode === true && me.Maximizable() === false && me.Resizable() === Fit.Controls.InputResizing.Disabled && me.DesignMode() === false)
@@ -24009,8 +24528,20 @@ Fit.Controls.Input = function(ctlId)
24009
24528
  }
24010
24529
  }
24011
24530
 
24012
- function reloadEditor()
24531
+ function reloadEditor(force)
24013
24532
  {
24533
+ Fit.Validation.ExpectBoolean(force, true);
24534
+
24535
+ if (force !== true && (designModeEnabledAndReady() === false || designEditorMustReloadWhenReady === true))
24536
+ {
24537
+ // Attempting to reload editor while initializing - postpone until editor is fully loaded,
24538
+ // since we cannot guarantee reliable behavior with CKEditor if it's disposed while loading.
24539
+ designEditorMustReloadWhenReady = true;
24540
+ return;
24541
+ }
24542
+
24543
+ designEditorMustReloadWhenReady = false;
24544
+
24014
24545
  // Disabling DesignMode brings it back to input or textarea mode.
24015
24546
  // If reverting to input mode, Height is reset, so we need to preserve that.
24016
24547
 
@@ -24026,6 +24557,62 @@ Fit.Controls.Input = function(ctlId)
24026
24557
  wasAutoChangedToMultiLineMode = currentWasAutoChangedToMultiLineMode;
24027
24558
  }
24028
24559
 
24560
+ function destroyDesignEditorInstance()
24561
+ {
24562
+ // Destroying editor also fires OnHide event for any dialog currently open, which will clean up:
24563
+ // Fit._internal.Controls.Input.ActiveEditorForDialog;
24564
+ // Fit._internal.Controls.Input.ActiveEditorForDialogDestroyed;
24565
+ // Fit._internal.Controls.Input.ActiveEditorForDialogDisabledPostponed;
24566
+ // Fit._internal.Controls.Input.ActiveDialogForEditor;
24567
+ // Fit._internal.Controls.Input.ActiveDialogForEditorCanceled;
24568
+
24569
+ // Calling destroy() fires OnHide for any dialog currently open, which
24570
+ // in turn disables locked focus state and returns focus to the control.
24571
+
24572
+ designEditor.destroy();
24573
+
24574
+ designEditor = null;
24575
+ designEditorDom = null;
24576
+ designEditorDirty = false;
24577
+ designEditorDirtyPending = false;
24578
+ //designEditorConfig = null; // Do NOT nullify this! We need it, in case DesignMode is toggled!
24579
+ designEditorRestoreButtonState = null;
24580
+ designEditorSuppressPaste = false;
24581
+ designEditorSuppressOnResize = false;
24582
+ designEditorMustReloadWhenReady = false;
24583
+ designEditorMustDisposeWhenReady = false;
24584
+ designEditorActiveToolbarPanel = null;
24585
+
24586
+ if (designEditorUpdateSizeDebouncer !== -1)
24587
+ {
24588
+ clearTimeout(designEditorUpdateSizeDebouncer);
24589
+ designEditorUpdateSizeDebouncer = -1;
24590
+ }
24591
+
24592
+ if (mutationObserverId !== -1)
24593
+ {
24594
+ Fit.Events.RemoveMutationObserver(mutationObserverId);
24595
+ mutationObserverId = -1;
24596
+ }
24597
+
24598
+ if (rootedEventId !== -1)
24599
+ {
24600
+ Fit.Events.RemoveHandler(me.GetDomElement(), rootedEventId);
24601
+ rootedEventId = -1;
24602
+ }
24603
+
24604
+ if (createWhenReadyIntervalId !== -1)
24605
+ {
24606
+ clearInterval(createWhenReadyIntervalId);
24607
+ createWhenReadyIntervalId = -1;
24608
+ }
24609
+ }
24610
+
24611
+ function designModeEnabledAndReady()
24612
+ {
24613
+ return designEditorDom !== null; // Editor is fully loaded when editor DOM is made available
24614
+ }
24615
+
24029
24616
  function localize()
24030
24617
  {
24031
24618
  if (me.DesignMode() === true)