fit-ui 2.5.7 → 2.7.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 (225) hide show
  1. package/dist/Documentation.html +3 -3
  2. package/dist/Fit.UI.css +120 -6
  3. package/dist/Fit.UI.js +854 -152
  4. package/dist/Fit.UI.min.css +1 -1
  5. package/dist/Fit.UI.min.js +1 -1
  6. package/dist/Resources/CKEditor/build-config.js +7 -3
  7. package/dist/Resources/CKEditor/ckeditor.js +93 -5
  8. package/dist/Resources/CKEditor/contents.css +208 -208
  9. package/dist/Resources/CKEditor/lang/da.js +2 -2
  10. package/dist/Resources/CKEditor/lang/de.js +2 -2
  11. package/dist/Resources/CKEditor/lang/en.js +2 -2
  12. package/dist/Resources/CKEditor/plugins/autocomplete/skins/default.css +38 -0
  13. package/dist/Resources/CKEditor/plugins/dialog/styles/dialog.css +18 -18
  14. package/dist/Resources/CKEditor/plugins/emoji/assets/iconsall.png +0 -0
  15. package/dist/Resources/CKEditor/plugins/emoji/assets/iconsall.svg +58 -0
  16. package/dist/Resources/CKEditor/plugins/emoji/emoji.json +1 -0
  17. package/dist/Resources/CKEditor/plugins/emoji/skins/default.css +237 -0
  18. package/dist/Resources/CKEditor/plugins/icons.png +0 -0
  19. package/dist/Resources/CKEditor/plugins/icons_hidpi.png +0 -0
  20. package/dist/Resources/CKEditor/skins/moono-lisa/dialog.css +4 -4
  21. package/dist/Resources/CKEditor/skins/moono-lisa/dialog_ie.css +4 -4
  22. package/dist/Resources/CKEditor/skins/moono-lisa/dialog_ie8.css +4 -4
  23. package/dist/Resources/CKEditor/skins/moono-lisa/dialog_iequirks.css +4 -4
  24. package/dist/Resources/CKEditor/skins/moono-lisa/editor.css +5 -5
  25. package/dist/Resources/CKEditor/skins/moono-lisa/editor_gecko.css +5 -5
  26. package/dist/Resources/CKEditor/skins/moono-lisa/editor_ie.css +5 -5
  27. package/dist/Resources/CKEditor/skins/moono-lisa/editor_ie8.css +5 -5
  28. package/dist/Resources/CKEditor/skins/moono-lisa/editor_iequirks.css +5 -5
  29. package/dist/Resources/CKEditor/skins/moono-lisa/icons.png +0 -0
  30. package/dist/Resources/CKEditor/skins/moono-lisa/icons_hidpi.png +0 -0
  31. package/dist/Resources/CKEditor/styles.js +137 -137
  32. package/dist/Resources/CKEditor-autogrow-plugin-built-in/CHANGES.md +2117 -0
  33. package/dist/Resources/CKEditor-autogrow-plugin-built-in/LICENSE.md +1436 -0
  34. package/dist/Resources/CKEditor-autogrow-plugin-built-in/README-FitUiChanges.txt +8 -0
  35. package/dist/Resources/CKEditor-autogrow-plugin-built-in/README.md +39 -0
  36. package/dist/Resources/CKEditor-autogrow-plugin-built-in/adapters/jquery.js +10 -0
  37. package/dist/Resources/CKEditor-autogrow-plugin-built-in/build-config.js +80 -0
  38. package/dist/Resources/CKEditor-autogrow-plugin-built-in/ckeditor.js +986 -0
  39. package/dist/Resources/CKEditor-autogrow-plugin-built-in/config.js +34 -0
  40. package/dist/Resources/CKEditor-autogrow-plugin-built-in/contents.css +208 -0
  41. package/dist/Resources/{CKEditor → CKEditor-autogrow-plugin-built-in}/index.html +0 -0
  42. package/dist/Resources/CKEditor-autogrow-plugin-built-in/lang/da.js +5 -0
  43. package/dist/Resources/CKEditor-autogrow-plugin-built-in/lang/de.js +5 -0
  44. package/dist/Resources/CKEditor-autogrow-plugin-built-in/lang/en.js +5 -0
  45. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/autocomplete/skins/default.css +38 -0
  46. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/LICENSE.md +1244 -0
  47. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/README.md +21 -0
  48. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/dialogs/base64image.js +766 -0
  49. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/dialogs/base64image.original.js +503 -0
  50. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/icons/base64image.png +0 -0
  51. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/icons/hidpi/base64image.png +0 -0
  52. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/lang/da.js +12 -0
  53. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/lang/de.js +12 -0
  54. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/lang/en.js +12 -0
  55. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64image/plugin.js +58 -0
  56. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/base64imagepaste/plugin.js +91 -0
  57. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/clipboard/dialogs/paste.js +11 -0
  58. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dialog/dialogDefinition.js +4 -0
  59. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dialog/styles/dialog.css +18 -0
  60. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/LICENSE +19 -0
  61. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/_source.css +85 -0
  62. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/package.json +19 -0
  63. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/plugin.js +395 -0
  64. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/dragresize/readme.md +35 -0
  65. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/emoji/assets/iconsall.png +0 -0
  66. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/emoji/assets/iconsall.svg +58 -0
  67. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/emoji/emoji.json +1 -0
  68. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/emoji/skins/default.css +237 -0
  69. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/icons.png +0 -0
  70. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/icons_hidpi.png +0 -0
  71. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/link/dialogs/anchor.js +8 -0
  72. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/link/dialogs/link.js +30 -0
  73. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/link/images/anchor.png +0 -0
  74. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/link/images/hidpi/anchor.png +0 -0
  75. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/pastefromword/filter/default.js +42 -0
  76. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/pastetools/filter/common.js +24 -0
  77. package/dist/Resources/CKEditor-autogrow-plugin-built-in/plugins/pastetools/filter/image.js +12 -0
  78. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog.css +1 -0
  79. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_ie.css +1 -0
  80. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_ie7.css +1 -0
  81. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_ie8.css +1 -0
  82. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_iequirks.css +1 -0
  83. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/dialog_opera.css +1 -0
  84. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor.css +1 -0
  85. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_gecko.css +1 -0
  86. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_ie.css +1 -0
  87. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_ie7.css +1 -0
  88. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_ie8.css +1 -0
  89. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/editor_iequirks.css +1 -0
  90. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/icons.png +0 -0
  91. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/icons_hidpi.png +0 -0
  92. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/arrow.png +0 -0
  93. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/close.png +0 -0
  94. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/hidpi/close.png +0 -0
  95. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/hidpi/lock-open.png +0 -0
  96. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/hidpi/lock.png +0 -0
  97. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/hidpi/refresh.png +0 -0
  98. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/lock-open.png +0 -0
  99. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/lock.png +0 -0
  100. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/images/refresh.png +0 -0
  101. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/readme.md +35 -0
  102. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/bootstrapck/skin.js +10 -0
  103. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/dialog.css +5 -0
  104. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/dialog_ie.css +5 -0
  105. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/dialog_ie8.css +5 -0
  106. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/dialog_iequirks.css +5 -0
  107. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor.css +5 -0
  108. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor_gecko.css +5 -0
  109. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor_ie.css +5 -0
  110. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor_ie8.css +5 -0
  111. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/editor_iequirks.css +5 -0
  112. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/icons.png +0 -0
  113. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/icons_hidpi.png +0 -0
  114. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/arrow.png +0 -0
  115. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/close.png +0 -0
  116. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/hidpi/close.png +0 -0
  117. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  118. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/hidpi/lock.png +0 -0
  119. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  120. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/lock-open.png +0 -0
  121. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/lock.png +0 -0
  122. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/refresh.png +0 -0
  123. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/images/spinner.gif +0 -0
  124. package/dist/Resources/CKEditor-autogrow-plugin-built-in/skins/moono-lisa/readme.md +46 -0
  125. package/dist/Resources/CKEditor-autogrow-plugin-built-in/styles.js +137 -0
  126. package/dist/Resources/CKEditor-autogrow-plugin-built-in/vendor/promise.js +13 -0
  127. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/CHANGES.md +2117 -0
  128. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/LICENSE.md +1436 -0
  129. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/README-FitUiChanges.txt +8 -0
  130. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/README.md +39 -0
  131. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/adapters/jquery.js +10 -0
  132. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/build-config.js +79 -0
  133. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/ckeditor.js +983 -0
  134. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/config.js +34 -0
  135. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/contents.css +208 -0
  136. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/lang/da.js +5 -0
  137. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/lang/de.js +5 -0
  138. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/lang/en.js +5 -0
  139. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/autocomplete/skins/default.css +38 -0
  140. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/autogrow/plugin.js +234 -0
  141. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/LICENSE.md +1244 -0
  142. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/README.md +21 -0
  143. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/dialogs/base64image.js +766 -0
  144. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/dialogs/base64image.original.js +503 -0
  145. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/icons/base64image.png +0 -0
  146. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/icons/hidpi/base64image.png +0 -0
  147. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/lang/da.js +12 -0
  148. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/lang/de.js +12 -0
  149. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/lang/en.js +12 -0
  150. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64image/plugin.js +58 -0
  151. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/base64imagepaste/plugin.js +91 -0
  152. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/clipboard/dialogs/paste.js +11 -0
  153. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dialog/dialogDefinition.js +4 -0
  154. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dialog/styles/dialog.css +18 -0
  155. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/LICENSE +19 -0
  156. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/_source.css +85 -0
  157. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/package.json +19 -0
  158. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/plugin.js +395 -0
  159. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/dragresize/readme.md +35 -0
  160. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/emoji/assets/iconsall.png +0 -0
  161. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/emoji/assets/iconsall.svg +58 -0
  162. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/emoji/emoji.json +1 -0
  163. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/emoji/skins/default.css +237 -0
  164. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/icons.png +0 -0
  165. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/icons_hidpi.png +0 -0
  166. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/link/dialogs/anchor.js +8 -0
  167. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/link/dialogs/link.js +30 -0
  168. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/link/images/anchor.png +0 -0
  169. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/link/images/hidpi/anchor.png +0 -0
  170. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/pastefromword/filter/default.js +42 -0
  171. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/pastetools/filter/common.js +24 -0
  172. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/plugins/pastetools/filter/image.js +12 -0
  173. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog.css +1 -0
  174. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_ie.css +1 -0
  175. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_ie7.css +1 -0
  176. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_ie8.css +1 -0
  177. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_iequirks.css +1 -0
  178. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/dialog_opera.css +1 -0
  179. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor.css +1 -0
  180. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_gecko.css +1 -0
  181. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_ie.css +1 -0
  182. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_ie7.css +1 -0
  183. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_ie8.css +1 -0
  184. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/editor_iequirks.css +1 -0
  185. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/icons.png +0 -0
  186. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/icons_hidpi.png +0 -0
  187. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/arrow.png +0 -0
  188. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/close.png +0 -0
  189. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/hidpi/close.png +0 -0
  190. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/hidpi/lock-open.png +0 -0
  191. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/hidpi/lock.png +0 -0
  192. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/hidpi/refresh.png +0 -0
  193. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/lock-open.png +0 -0
  194. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/lock.png +0 -0
  195. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/images/refresh.png +0 -0
  196. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/readme.md +35 -0
  197. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/bootstrapck/skin.js +10 -0
  198. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/dialog.css +5 -0
  199. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/dialog_ie.css +5 -0
  200. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/dialog_ie8.css +5 -0
  201. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/dialog_iequirks.css +5 -0
  202. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor.css +5 -0
  203. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor_gecko.css +5 -0
  204. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor_ie.css +5 -0
  205. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor_ie8.css +5 -0
  206. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/editor_iequirks.css +5 -0
  207. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/icons.png +0 -0
  208. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/icons_hidpi.png +0 -0
  209. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/arrow.png +0 -0
  210. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/close.png +0 -0
  211. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/hidpi/close.png +0 -0
  212. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/hidpi/lock-open.png +0 -0
  213. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/hidpi/lock.png +0 -0
  214. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/hidpi/refresh.png +0 -0
  215. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/lock-open.png +0 -0
  216. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/lock.png +0 -0
  217. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/refresh.png +0 -0
  218. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/images/spinner.gif +0 -0
  219. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/skins/moono-lisa/readme.md +46 -0
  220. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/styles.js +137 -0
  221. package/dist/Resources/CKEditor-autogrow-plugin-externally-loaded/vendor/promise.js +13 -0
  222. package/package.json +1 -1
  223. package/types/index.d.ts +526 -137
  224. package/dist/Resources/CKEditor/plugins/htmlwriter/plugin.js +0 -364
  225. package/dist/Resources/CKEditor/plugins/resize/plugin.js +0 -187
package/dist/Fit.UI.js CHANGED
@@ -648,7 +648,7 @@ Fit._internal =
648
648
  {
649
649
  Core:
650
650
  {
651
- VersionInfo: { Major: 2, Minor: 5, Patch: 7 } // Do NOT modify format - version numbers are programmatically changed when releasing new versions - MUST be on a separate line!
651
+ VersionInfo: { Major: 2, Minor: 7, 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
 
@@ -4473,6 +4473,14 @@ Fit.Controls.DirtyCheckAll = function(scope)
4473
4473
  return result;
4474
4474
  }
4475
4475
 
4476
+ // <container name="Fit._internal.ControlBase">
4477
+ // <member name="ReduceDocumentRootPollution" static="true" type="boolean">
4478
+ // Reduce use of document root to host elements such as
4479
+ // context menus, dialogs, widgets, etc., which are temporarily
4480
+ // visible when interacting with controls on the screen.
4481
+ // </member>
4482
+ // </container>
4483
+ Fit._internal.ControlBase.ReduceDocumentRootPollution = true;
4476
4484
  /// <container name="Fit.Cookies">
4477
4485
  /// Cookie functionality.
4478
4486
  /// Set/Get/Remove functions can be invoked as static members, or an instance of Fit.Cookies
@@ -9267,6 +9275,7 @@ Fit.Http.JsonpRequest = function(uri, jsonpCallbackName)
9267
9275
  var timeout = 30000;
9268
9276
  var timer = -1;
9269
9277
  var response = null;
9278
+ var aborted = false;
9270
9279
 
9271
9280
  var onRequestHandlers = [];
9272
9281
  var onSuccessHandlers = [];
@@ -9324,6 +9333,14 @@ Fit.Http.JsonpRequest = function(uri, jsonpCallbackName)
9324
9333
  return timeout;
9325
9334
  }
9326
9335
 
9336
+ /// <function container="Fit.Http.JsonpRequest" name="Abort" access="public">
9337
+ /// <description> Abort request </description>
9338
+ /// </function>
9339
+ this.Abort = function()
9340
+ {
9341
+ aborted = true;
9342
+ }
9343
+
9327
9344
  /// <function container="Fit.Http.JsonpRequest" name="SetParameter" access="public">
9328
9345
  /// <description> Set URL parameter </description>
9329
9346
  /// <param name="key" type="string"> URL parameter key </param>
@@ -9373,6 +9390,8 @@ Fit.Http.JsonpRequest = function(uri, jsonpCallbackName)
9373
9390
  /// </function>
9374
9391
  this.Start = function()
9375
9392
  {
9393
+ aborted = false;
9394
+
9376
9395
  // Fire OnRequest handlers
9377
9396
 
9378
9397
  if (fireEvent(onRequestHandlers) === false)
@@ -9406,7 +9425,10 @@ Fit.Http.JsonpRequest = function(uri, jsonpCallbackName)
9406
9425
  response = resp;
9407
9426
  delete Fit._internal.Http.JsonpRequest.Callbacks[cbId];
9408
9427
 
9409
- fireEvent(onSuccessHandlers);
9428
+ if (aborted === false)
9429
+ {
9430
+ fireEvent(onSuccessHandlers);
9431
+ }
9410
9432
  }
9411
9433
 
9412
9434
  // Configure timeout
@@ -9419,7 +9441,10 @@ Fit.Http.JsonpRequest = function(uri, jsonpCallbackName)
9419
9441
  // NOTICE: Do not remove callback - it would cause a JavaScript error if the situation described above occures.
9420
9442
  Fit._internal.Http.JsonpRequest.Callbacks[cbId] = function(response) { };
9421
9443
 
9422
- fireEvent(onTimeoutHandlers);
9444
+ if (aborted === false)
9445
+ {
9446
+ fireEvent(onTimeoutHandlers);
9447
+ }
9423
9448
  }, timeout);
9424
9449
 
9425
9450
  // Construct request URL
@@ -14233,6 +14258,11 @@ Fit.Controls.DatePicker = function(ctlId)
14233
14258
 
14234
14259
  function moveCalenderWidgetLocally()
14235
14260
  {
14261
+ if (Fit._internal.ControlBase.ReduceDocumentRootPollution !== true)
14262
+ {
14263
+ return;
14264
+ }
14265
+
14236
14266
  // We want the benefits of a connected calendar control (connected to input control),
14237
14267
  // but do not want it rendered in the root of the document. It pollutes the global scope,
14238
14268
  // and it doesn't work with dialogs with light dismiss, since interacting with the calendar
@@ -14308,6 +14338,11 @@ Fit.Controls.DatePicker = function(ctlId)
14308
14338
 
14309
14339
  function moveCalenderWidgetGlobally() // Undo everything done in moveCalenderWidgetLocally()
14310
14340
  {
14341
+ if (Fit._internal.ControlBase.ReduceDocumentRootPollution !== true)
14342
+ {
14343
+ return;
14344
+ }
14345
+
14311
14346
  var calendarWidget = document.getElementById("fitui-datepicker-div");
14312
14347
  Fit.Dom.Add(document.body, calendarWidget);
14313
14348
 
@@ -21585,11 +21620,16 @@ Fit.Controls.Input = function(ctlId)
21585
21620
  var designEditor = null;
21586
21621
  var designEditorDirty = false;
21587
21622
  var designEditorDirtyPending = false;
21623
+ var designEditorConfig = null;
21624
+ var designEditorRestoreButtonState = null;
21625
+ var designEditorSuppressPaste = false;
21626
+ var designEditorSuppressOnResize = false;
21588
21627
  //var htmlWrappedInParagraph = false;
21589
21628
  var wasAutoChangedToMultiLineMode = false; // Used to revert to single line if multi line was automatically enabled along with DesignMode(true), Maximizable(true), or Resizable(true)
21590
21629
  var minimizeHeight = -1;
21591
21630
  var maximizeHeight = -1;
21592
21631
  var minMaxUnit = null;
21632
+ var maximizeHeightConfigured = -1;
21593
21633
  var resizable = Fit.Controls.InputResizing.Disabled;
21594
21634
  var nativeResizableAvailable = false; // Updated in init()
21595
21635
  var mutationObserverId = -1;
@@ -21661,6 +21701,7 @@ Fit.Controls.Input = function(ctlId)
21661
21701
  me._internal.Data("maximized", "false");
21662
21702
  me._internal.Data("resizable", resizable.toLowerCase());
21663
21703
  me._internal.Data("resized", "false");
21704
+ me._internal.Data("autogrow", "false");
21664
21705
  me._internal.Data("designmode", "false");
21665
21706
 
21666
21707
  Fit.Internationalization.OnLocaleChanged(localize);
@@ -21678,6 +21719,21 @@ Fit.Controls.Input = function(ctlId)
21678
21719
  }
21679
21720
 
21680
21721
  fireOnChange(); // Only fires OnChange if value has actually changed
21722
+
21723
+ // Restore editor's toolbar buttons in case they were temporarily disabled
21724
+
21725
+ if (designEditor !== null)
21726
+ {
21727
+ restoreDesignEditorButtons();
21728
+ }
21729
+ });
21730
+
21731
+ Fit.Events.AddHandler(me.GetDomElement(), "paste", true, function(e)
21732
+ {
21733
+ if (designEditor !== null && designEditorSuppressPaste === true)
21734
+ {
21735
+ Fit.Events.Stop(e);
21736
+ }
21681
21737
  });
21682
21738
 
21683
21739
  try
@@ -21850,7 +21906,7 @@ Fit.Controls.Input = function(ctlId)
21850
21906
  input.value = val;
21851
21907
  }
21852
21908
 
21853
- if (Fit._internal.Controls.Input.BlobManager.RevokeExternalBlobUrlsOnDispose === true)
21909
+ if (designEditorConfig !== null && designEditorConfig.Plugins && designEditorConfig.Plugins.Images && designEditorConfig.Plugins.Images.RevokeExternalBlobUrlsOnDispose === true)
21854
21910
  {
21855
21911
  // Keep track of image blobs added via Value(..) so we can dispose them automatically.
21856
21912
  // When RevokeExternalBlobUrlsOnDispose is True it basically means that the Input control
@@ -21952,7 +22008,7 @@ Fit.Controls.Input = function(ctlId)
21952
22008
  {
21953
22009
  // This will destroy control - it will no longer work!
21954
22010
 
21955
- var curVal = Fit._internal.Controls.Input.BlobManager.RevokeBlobUrlsOnDispose === "UnreferencedOnly" ? me.Value() : null;
22011
+ var curVal = designEditorConfig !== null && designEditorConfig.Plugins && designEditorConfig.Plugins.Images && designEditorConfig.Plugins.Images.RevokeBlobUrlsOnDispose === "UnreferencedOnly" ? me.Value() : null;
21956
22012
 
21957
22013
  if (Fit._internal.Controls.Input.ActiveEditorForDialog === me)
21958
22014
  {
@@ -22020,7 +22076,7 @@ Fit.Controls.Input = function(ctlId)
22020
22076
  debouncedOnChange.Cancel();
22021
22077
  }
22022
22078
 
22023
- if (Fit._internal.Controls.Input.BlobManager.RevokeBlobUrlsOnDispose === "All")
22079
+ if (designEditorConfig === null || !designEditorConfig.Plugins || !designEditorConfig.Plugins.Images || !designEditorConfig.Plugins.Images.RevokeBlobUrlsOnDispose || designEditorConfig.Plugins.Images.RevokeBlobUrlsOnDispose === "All")
22024
22080
  {
22025
22081
  Fit.Array.ForEach(imageBlobUrls, function(imageUrl)
22026
22082
  {
@@ -22038,7 +22094,7 @@ Fit.Controls.Input = function(ctlId)
22038
22094
  });
22039
22095
  }
22040
22096
 
22041
- me = orgVal = preVal = input = cmdResize = designEditor = designEditorDirty = designEditorDirtyPending /*= htmlWrappedInParagraph*/ = wasAutoChangedToMultiLineMode = minimizeHeight = maximizeHeight = minMaxUnit = resizable = nativeResizableAvailable = mutationObserverId = rootedEventId = createWhenReadyIntervalId = isIe8 = debounceOnChangeTimeout = debouncedOnChange = imageBlobUrls = null;
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;
22042
22098
 
22043
22099
  base();
22044
22100
  });
@@ -22051,6 +22107,8 @@ Fit.Controls.Input = function(ctlId)
22051
22107
 
22052
22108
  if (Fit.Validation.IsSet(val) === true)
22053
22109
  {
22110
+ me._internal.Data("resized", "false");
22111
+
22054
22112
  base(val, unit);
22055
22113
  updateDesignEditorSize();
22056
22114
  }
@@ -22067,16 +22125,38 @@ Fit.Controls.Input = function(ctlId)
22067
22125
 
22068
22126
  if (Fit.Validation.IsSet(val) === true)
22069
22127
  {
22128
+ // Restore/minimize control if currently maximized
22129
+ if (me.Maximizable() === true && suppressMinMax !== true)
22130
+ {
22131
+ me.Maximized(false);
22132
+ }
22133
+
22134
+ me._internal.Data("resized", "false");
22135
+ me._internal.Data("autogrow", "false");
22136
+
22137
+ if (val === -1 && designEditor !== null) // Enable auto grow
22138
+ {
22139
+ // A value of -1 is used to reset control height (assume default height).
22140
+ // In DesignMode we want the control height to adjust to the content of the editor in this case.
22141
+ // The editor's ability to adjust to the HTML content is handled in updateDesignEditorSize() below.
22142
+ // Auto grow can also be enabled using configuration object passed to DesignMode(true, config).
22143
+ me._internal.Data("autogrow", "true"); // Make control container adjust to editor's height
22144
+ }
22145
+
22070
22146
  var h = base(val, unit);
22071
- updateDesignEditorSize(); // Throws error if in DesignMode and unit is not px
22147
+ updateDesignEditorSize();
22072
22148
 
22149
+ // Calculate new maximize height if control is maximizable
22073
22150
  if (me.Maximizable() === true && suppressMinMax !== true)
22074
22151
  {
22075
22152
  minimizeHeight = h.Value;
22076
- maximizeHeight = ((maximizeHeight > h.Value && h.Unit === minMaxUnit) ? maximizeHeight : h.Value * 2)
22153
+ maximizeHeight = (maximizeHeightConfigured !== -1 ? maximizeHeightConfigured : (minimizeHeight !== -1 ? minimizeHeight * 2 : 300));
22077
22154
  minMaxUnit = h.Unit;
22155
+ }
22078
22156
 
22079
- me.Maximized(false);
22157
+ if (val === -1 && designEditor !== null) // Auto grow enabled
22158
+ {
22159
+ repaint();
22080
22160
  }
22081
22161
  }
22082
22162
 
@@ -22253,9 +22333,6 @@ Fit.Controls.Input = function(ctlId)
22253
22333
  });
22254
22334
  }
22255
22335
 
22256
- if (me.Height().Value === -1)
22257
- me.Height(150);
22258
-
22259
22336
  if (focused === true)
22260
22337
  input.focus();
22261
22338
 
@@ -22386,7 +22463,7 @@ Fit.Controls.Input = function(ctlId)
22386
22463
  /// <param name="heightMax" type="number" default="undefined">
22387
22464
  /// If defined, this becomes the height of the input control when maximized.
22388
22465
  /// The value is considered the same unit set using Height(..) which defaults to px.
22389
- /// However, if DesignMode is enabled, the value unit is considered to be px.
22466
+ /// If not set, the value assumes twice the height set using Height(..).
22390
22467
  /// </param>
22391
22468
  /// </function>
22392
22469
  this.Maximizable = function(val, heightMax)
@@ -22414,18 +22491,11 @@ Fit.Controls.Input = function(ctlId)
22414
22491
 
22415
22492
  var h = me.Height();
22416
22493
 
22417
- if (designEditor === null)
22418
- {
22419
- minimizeHeight = h.Value;
22420
- maximizeHeight = ((Fit.Validation.IsSet(heightMax) === true) ? heightMax : ((minimizeHeight !== -1) ? minimizeHeight * 2 : 150));
22421
- minMaxUnit = h.Unit;
22422
- }
22423
- else
22424
- {
22425
- minimizeHeight = h.Value;
22426
- maximizeHeight = ((Fit.Validation.IsSet(heightMax) === true) ? heightMax : ((minimizeHeight !== -1) ? minimizeHeight * 2 : 300));
22427
- minMaxUnit = "px";
22428
- }
22494
+ minimizeHeight = h.Value;
22495
+ maximizeHeight = ((Fit.Validation.IsSet(heightMax) === true) ? heightMax : ((minimizeHeight !== -1) ? minimizeHeight * 2 : 300));
22496
+ minMaxUnit = h.Unit;
22497
+ maximizeHeightConfigured = heightMax || -1;
22498
+
22429
22499
 
22430
22500
  // Create maximize/minimize button
22431
22501
 
@@ -22461,6 +22531,12 @@ Fit.Controls.Input = function(ctlId)
22461
22531
 
22462
22532
  repaint();
22463
22533
  }
22534
+ else if (val === true && cmdResize !== null && Fit.Validation.IsSet(heightMax) === true)
22535
+ {
22536
+ // Already enabled - just update maximize height
22537
+ maximizeHeight = heightMax !== -1 ? heightMax : minimizeHeight * 2;
22538
+ maximizeHeightConfigured = heightMax;
22539
+ }
22464
22540
  }
22465
22541
 
22466
22542
  return (cmdResize !== null);
@@ -22474,7 +22550,9 @@ Fit.Controls.Input = function(ctlId)
22474
22550
  {
22475
22551
  Fit.Validation.ExpectBoolean(val, true);
22476
22552
 
22477
- if (Fit.Validation.IsSet(val) === true && cmdResize !== null)
22553
+ var autoGrowEnabled = me.Height().Value === -1 && designEditor !== null;
22554
+
22555
+ if (Fit.Validation.IsSet(val) === true && me.Maximizable() === true && autoGrowEnabled === false)
22478
22556
  {
22479
22557
  if (val === true && Fit.Dom.HasClass(cmdResize, "fa-chevron-up") === false)
22480
22558
  {
@@ -22499,16 +22577,236 @@ Fit.Controls.Input = function(ctlId)
22499
22577
  return (cmdResize !== null && Fit.Dom.HasClass(cmdResize, "fa-chevron-up") === true);
22500
22578
  }
22501
22579
 
22580
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeConfigPluginsImagesConfig">
22581
+ /// <description> Configuration for image plugins </description>
22582
+ /// <member name="Enabled" type="boolean"> Flag indicating whether to enable image plugins or not (defaults to False) </member>
22583
+ /// <member name="EmbedType" type="'base64' | 'blob'" default="undefined">
22584
+ /// How to store and embed images. Base64 is persistent while blob (default) is temporary
22585
+ /// and must be extracted from memory and uploaded/stored to be permanantly persisted.
22586
+ /// References to blobs can be parsed from the HTML value produced by the editor.
22587
+ /// </member>
22588
+ /// <member name="RevokeBlobUrlsOnDispose" type="'All' | 'UnreferencedOnly'" default="undefined">
22589
+ /// This option is in effect when EmbedType is blob.
22590
+ /// Dispose images from blob storage (revoke blob URLs) added though image plugins when control is disposed.
22591
+ /// If "UnreferencedOnly" is specified, the component using Fit.UI's input control will be responsible for
22592
+ /// disposing referenced blobs. Failing to do so may cause a memory leak. Defaults to All.
22593
+ /// </member>
22594
+ /// <member name="RevokeExternalBlobUrlsOnDispose" type="boolean" default="undefined">
22595
+ /// This option is in effect when EmbedType is blob.
22596
+ /// Dispose images from blob storage (revoke blob URLs) added through Value(..)
22597
+ /// function when control is disposed. Basically ownership of these blobs are handed
22598
+ /// over to the control for the duration of its life time.
22599
+ /// These images are furthermore subject to the rule set in RevokeBlobUrlsOnDispose.
22600
+ /// Defaults to False.
22601
+ /// </member>
22602
+ /// </container>
22603
+
22604
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeConfigPlugins">
22605
+ /// <description> Additional plugins enabled in DesignMode </description>
22606
+ /// <member name="Emojis" type="boolean" default="undefined"> Plugin(s) related to emoji support (defaults to False) </member>
22607
+ /// <member name="Images" type="Fit.Controls.InputTypeDefs.DesignModeConfigPluginsImagesConfig" default="undefined"> Plugin(s) related to support for images (defaults to False) </member>
22608
+ /// </container>
22609
+
22610
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeConfigToolbar">
22611
+ /// <description> Toolbar buttons enabled in DesignMode </description>
22612
+ /// <member name="Formatting" type="boolean" default="undefined"> Enable text formatting (bold, italic, underline) (defaults to True) </member>
22613
+ /// <member name="Justify" type="boolean" default="undefined"> Enable text alignment (defaults to True) </member>
22614
+ /// <member name="Lists" type="boolean" default="undefined"> Enable ordered and unordered lists with indentation (defaults to True) </member>
22615
+ /// <member name="Links" type="boolean" default="undefined"> Enable links (defaults to True) </member>
22616
+ /// <member name="Emojis" type="boolean" default="undefined"> Enable emoji button (defaults to False) </member>
22617
+ /// <member name="Images" type="boolean" default="undefined"> Enable image button (defaults to false) </member>
22618
+ /// </container>
22619
+
22620
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeConfigInfoPanel">
22621
+ /// <description> Information panel at the bottom of the editor </description>
22622
+ /// <member name="Text" type="string" default="undefined"> Text to display </member>
22623
+ /// <member name="Alignment" type="'Left' | 'Center' | 'Right'" default="undefined"> Text alignment - defaults to Center </member>
22624
+ /// </container>
22625
+
22626
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeTagsOnRequestEventHandlerArgs">
22627
+ /// <description> Request handler event arguments </description>
22628
+ /// <member name="Sender" type="Fit.Controls.Input"> Instance of control </member>
22629
+ /// <member name="Request" type="Fit.Http.JsonRequest | Fit.Http.JsonpRequest"> Instance of JsonRequest or JsonpRequest </member>
22630
+ /// <member name="Query" type="{ Marker: string, Query: string }"> Query information </member>
22631
+ /// </container>
22632
+ /// <function container="Fit.Controls.InputTypeDefs" name="DesignModeTagsOnRequest" returns="boolean | void">
22633
+ /// <description> Cancelable request event handler </description>
22634
+ /// <param name="sender" type="Fit.Controls.Input"> Instance of control </param>
22635
+ /// <param name="eventArgs" type="Fit.Controls.InputTypeDefs.DesignModeTagsOnRequestEventHandlerArgs"> Event arguments </param>
22636
+ /// </function>
22637
+
22638
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeTagsOnResponseJsonTag">
22639
+ /// <description> JSON object representing tag </description>
22640
+ /// <member name="Value" type="string"> Unique value </member>
22641
+ /// <member name="Title" type="string"> Title </member>
22642
+ /// <member name="Icon" type="string" default="undefined"> Optional URL to icon/image </member>
22643
+ /// <member name="Url" type="string" default="undefined"> Optional URL to associate with tag </member>
22644
+ /// <member name="Data" type="string" default="undefined"> Optional data to associate with tag </member>
22645
+ /// </container>
22646
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeTagsOnResponseEventHandlerArgs">
22647
+ /// <description> Response handler event arguments </description>
22648
+ /// <member name="Sender" type="Fit.Controls.Input"> Instance of control </member>
22649
+ /// <member name="Request" type="Fit.Http.JsonRequest | Fit.Http.JsonpRequest"> Instance of JsonRequest or JsonpRequest </member>
22650
+ /// <member name="Query" type="{ Marker: string, Query: string }"> Query information </member>
22651
+ /// <member name="Tags" type="Fit.Controls.InputTypeDefs.DesignModeTagsOnResponseJsonTag[]"> Tags received from WebService </member>
22652
+ /// </container>
22653
+ /// <function container="Fit.Controls.InputTypeDefs" name="DesignModeTagsOnResponse">
22654
+ /// <description> Response event handler </description>
22655
+ /// <param name="sender" type="Fit.Controls.Input"> Instance of control </param>
22656
+ /// <param name="eventArgs" type="Fit.Controls.InputTypeDefs.DesignModeTagsOnResponseEventHandlerArgs"> Event arguments </param>
22657
+ /// </function>
22658
+
22659
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeTagsTagCreatorReturnType">
22660
+ /// <description> JSON object representing tag to be inserted into editor </description>
22661
+ /// <member name="Title" type="string"> Tag title </member>
22662
+ /// <member name="Value" type="string"> Tag value (ID) </member>
22663
+ /// <member name="Type" type="string"> Tag type (marker) </member>
22664
+ /// <member name="Url" type="string" default="undefined"> Optional tag URL </member>
22665
+ /// <member name="Data" type="string" default="undefined"> Optional tag data </member>
22666
+ /// </container>
22667
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeTagsTagCreatorCallbackArgs">
22668
+ /// <description> TagCreator event arguments </description>
22669
+ /// <member name="Sender" type="Fit.Controls.Input"> Instance of control </member>
22670
+ /// <member name="QueryMarker" type="string"> Query marker </member>
22671
+ /// <member name="Tag" type="Fit.Controls.InputTypeDefs.DesignModeTagsOnResponseJsonTag"> Tag received from WebService </member>
22672
+ /// </container>
22673
+ /// <function container="Fit.Controls.InputTypeDefs" name="DesignModeTagsTagCreator" returns="Fit.Controls.InputTypeDefs.DesignModeTagsTagCreatorReturnType | null | void">
22674
+ /// <description>
22675
+ /// Function producing JSON object representing tag to be inserted into editor.
22676
+ /// Returning nothing or Null results in default tag being inserted into editor.
22677
+ /// </description>
22678
+ /// <param name="sender" type="Fit.Controls.Input"> Instance of control </param>
22679
+ /// <param name="eventArgs" type="Fit.Controls.InputTypeDefs.DesignModeTagsTagCreatorCallbackArgs"> Event arguments </param>
22680
+ /// </function>
22681
+
22682
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeConfigTags">
22683
+ /// <description> Configuration for tags in DesignMode </description>
22684
+ /// <member name="Triggers" type="{ Marker: string, MinimumCharacters?: integer, DebounceQuery?: integer }[]"> Markers triggering tags request and context menu </member>
22685
+ /// <member name="QueryUrl" type="string">
22686
+ /// URL to request data from. Endpoint receives the following payload:
22687
+ /// { Marker: "@", Query: "search" }
22688
+ ///
22689
+ /// Data is expected to be returned in the following format:
22690
+ /// [
22691
+ /// { Value: "t-1", Title: "Tag 1", Icon: "images/img1.jpeg", Url: "show/1", Data: "..." },
22692
+ /// { Value: "t-2", Title: "Tag 2", Icon: "images/img2.jpeg", Url: "show/2", Data: "..." }, ...
22693
+ /// ]
22694
+ ///
22695
+ /// The Value and Title properties are required. The Icon property is optional and must specify the path to an image.
22696
+ /// The Url property is optional and must specify a path to a related page/resource.
22697
+ /// The Data property is optional and allows for additional data to be associated with the tag.
22698
+ /// To hold multiple values, consider using a base64 encoded JSON object:
22699
+ /// btoa(JSON.stringify({ creationDate: new Date(), active: true }))
22700
+ ///
22701
+ /// The data eventuelly results in a tag being added to the editor with the following format:
22702
+ /// <a data-tag-type="@" data-tag-id="unique id 1" data-tag-data="..." href="show/1">Tag name 1</a>
22703
+ /// The data-tag-data attribute is only declared if the corresponding Data property is defined in data.
22704
+ /// </member>
22705
+ /// <member name="JsonpCallback" type="string" default="undefined"> Name of URL parameter receiving name of JSONP callback function (only for JSONP services) </member>
22706
+ /// <member name="JsonpTimeout" type="integer" default="undefined"> Number of milliseconds to allow JSONP request to wait for a response before aborting (only for JSONP services) </member>
22707
+ /// <member name="OnRequest" type="Fit.Controls.InputTypeDefs.DesignModeTagsOnRequest" default="undefined">
22708
+ /// Event handler invoked when tags are requested. Request may be canceled by returning False.
22709
+ /// Function receives two arguments:
22710
+ /// Sender (Fit.Controls.Input) and EventArgs object.
22711
+ /// EventArgs object contains the following properties:
22712
+ /// - Sender: Fit.Controls.Input instance
22713
+ /// - Request: Fit.Http.JsonpRequest or Fit.Http.JsonRequest instance
22714
+ /// - Query: Contains query information in its Marker and Query property
22715
+ /// </member>
22716
+ /// <member name="OnResponse" type="Fit.Controls.InputTypeDefs.DesignModeTagsOnResponse" default="undefined">
22717
+ /// Event handler invoked when tags data is received, allowing for data transformation.
22718
+ /// Function receives two arguments:
22719
+ /// Sender (Fit.Controls.Input) and EventArgs object.
22720
+ /// EventArgs object contains the following properties:
22721
+ /// - Sender: Fit.Controls.Input instance
22722
+ /// - Request: Fit.Http.JsonpRequest or Fit.Http.JsonRequest instance
22723
+ /// - Query: Contains query information in its Marker and Query property
22724
+ /// - Tags: JSON tags array received from WebService
22725
+ /// </member>
22726
+ /// <member name="TagCreator" type="Fit.Controls.InputTypeDefs.DesignModeTagsTagCreator" default="undefined">
22727
+ /// Callback invoked when a tag is being inserted into editor, allowing
22728
+ /// for customization to the title and attributes associated with the tag.
22729
+ /// Function receives two arguments:
22730
+ /// Sender (Fit.Controls.Input) and EventArgs object.
22731
+ /// EventArgs object contains the following properties:
22732
+ /// - Sender: Fit.Controls.Input instance
22733
+ /// - QueryMarker: String containing query marker
22734
+ /// - Tag: JSON tag received from WebService
22735
+ /// </member>
22736
+ /// </container>
22737
+
22738
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeAutoGrow">
22739
+ /// <description> Auto grow configuration </description>
22740
+ /// <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
+ /// <member name="MinimumHeight" type="{ Value: number, Unit?: Fit.TypeDefs.CssUnit }" default="undefined"> Minimum height of editable area </member>
22742
+ /// <member name="MaximumHeight" type="{ Value: number, Unit?: Fit.TypeDefs.CssUnit }" default="undefined"> Maximum height of editable area </member>
22743
+ /// </container>
22744
+
22745
+ /// <container name="Fit.Controls.InputTypeDefs.DesignModeConfig">
22746
+ /// <description> Configuration for DesignMode </description>
22747
+ /// <member name="Plugins" type="Fit.Controls.InputTypeDefs.DesignModeConfigPlugins" default="undefined"> Plugins configuration </member>
22748
+ /// <member name="Toolbar" type="Fit.Controls.InputTypeDefs.DesignModeConfigToolbar" default="undefined"> Toolbar configuration </member>
22749
+ /// <member name="InfoPanel" type="Fit.Controls.InputTypeDefs.DesignModeConfigInfoPanel" default="undefined"> Information panel configuration </member>
22750
+ /// <member name="Tags" type="Fit.Controls.InputTypeDefs.DesignModeConfigTags" default="undefined"> Tags configuration </member>
22751
+ /// <member name="AutoGrow" type="Fit.Controls.InputTypeDefs.DesignModeAutoGrow" default="undefined"> Auto grow configuration </member>
22752
+ /// </container>
22753
+
22502
22754
  /// <function container="Fit.Controls.Input" name="DesignMode" access="public" returns="boolean">
22503
22755
  /// <description>
22504
22756
  /// Get/set value indicating whether control is in Design Mode allowing for rich HTML content.
22505
22757
  /// Notice that this control type requires dimensions (Width/Height) to be specified in pixels.
22506
22758
  /// </description>
22507
22759
  /// <param name="val" type="boolean" default="undefined"> If defined, True enables Design Mode, False disables it </param>
22760
+ /// <param name="editorConfig" type="Fit.Controls.InputTypeDefs.DesignModeConfig" default="undefined">
22761
+ /// If provided and DesignMode is enabled, configuration is applied when editor is created.
22762
+ /// </param>
22508
22763
  /// </function>
22509
- this.DesignMode = function(val)
22764
+ this.DesignMode = function(val, editorConfig)
22510
22765
  {
22511
22766
  Fit.Validation.ExpectBoolean(val, true);
22767
+ Fit.Validation.ExpectObject(editorConfig, true);
22768
+ Fit.Validation.ExpectObject((editorConfig || {}).Plugins, true);
22769
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).Plugins || {}).Emojis, true);
22770
+ Fit.Validation.ExpectObject(((editorConfig || {}).Plugins || {}).Images, true);
22771
+ Fit.Validation.ExpectBoolean((((editorConfig || {}).Plugins || {}).Images || {}).Enabled, true);
22772
+ Fit.Validation.ExpectStringValue((((editorConfig || {}).Plugins || {}).Images || {}).EmbedType, true);
22773
+ Fit.Validation.ExpectStringValue((((editorConfig || {}).Plugins || {}).Images || {}).RevokeBlobUrlsOnDispose, true);
22774
+ Fit.Validation.ExpectBoolean((((editorConfig || {}).Plugins || {}).Images || {}).RevokeExternalBlobUrlsOnDispose, true);
22775
+ Fit.Validation.ExpectObject((editorConfig || {}).Toolbar, true);
22776
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Formatting, true);
22777
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Justify, true);
22778
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Lists, true);
22779
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Links, true);
22780
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Emojis, true);
22781
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).Toolbar || {}).Images, true);
22782
+ Fit.Validation.ExpectObject((editorConfig || {}).InfoPanel, true);
22783
+ Fit.Validation.ExpectString(((editorConfig || {}).InfoPanel || {}).Text, true);
22784
+ Fit.Validation.ExpectString(((editorConfig || {}).InfoPanel || {}).Alignment, true);
22785
+ Fit.Validation.ExpectObject((editorConfig || {}).Tags, true);
22786
+ Fit.Validation.ExpectObject((editorConfig || {}).AutoGrow, true);
22787
+ Fit.Validation.ExpectBoolean(((editorConfig || {}).AutoGrow || {}).Enabled, true);
22788
+ Fit.Validation.ExpectObject(((editorConfig || {}).AutoGrow || {}).MinimumHeight, true);
22789
+ Fit.Validation.ExpectNumber((((editorConfig || {}).AutoGrow || {}).MinimumHeight || {}).Value, true);
22790
+ Fit.Validation.ExpectStringValue((((editorConfig || {}).AutoGrow || {}).MinimumHeight || {}).Unit, true);
22791
+ Fit.Validation.ExpectObject(((editorConfig || {}).AutoGrow || {}).MaximumHeight, true);
22792
+ Fit.Validation.ExpectNumber((((editorConfig || {}).AutoGrow || {}).MaximumHeight || {}).Value, true);
22793
+ Fit.Validation.ExpectStringValue((((editorConfig || {}).AutoGrow || {}).MaximumHeight || {}).Unit, true);
22794
+
22795
+ if (editorConfig && editorConfig.Tags)
22796
+ {
22797
+ Fit.Validation.ExpectTypeArray(editorConfig.Tags.Triggers, function(trigger)
22798
+ {
22799
+ Fit.Validation.ExpectStringValue(trigger.Marker);
22800
+ Fit.Validation.ExpectInteger(trigger.MinimumCharacters, true);
22801
+ Fit.Validation.ExpectInteger(trigger.DebounceQuery, true);
22802
+ });
22803
+ Fit.Validation.ExpectStringValue(editorConfig.Tags.QueryUrl);
22804
+ Fit.Validation.ExpectStringValue(editorConfig.Tags.JsonpCallback, true);
22805
+ Fit.Validation.ExpectInteger(editorConfig.Tags.JsonpTimeout, true);
22806
+ Fit.Validation.ExpectFunction(editorConfig.Tags.OnRequest, true);
22807
+ Fit.Validation.ExpectFunction(editorConfig.Tags.OnResponse, true);
22808
+ Fit.Validation.ExpectFunction(editorConfig.Tags.TagCreator, true);
22809
+ }
22512
22810
 
22513
22811
  if (Fit.Validation.IsSet(val) === true)
22514
22812
  {
@@ -22519,6 +22817,11 @@ Fit.Controls.Input = function(ctlId)
22519
22817
 
22520
22818
  if (val === true && designMode === false)
22521
22819
  {
22820
+ if (Fit.Validation.IsSet(editorConfig) === true)
22821
+ {
22822
+ designEditorConfig = editorConfig;
22823
+ }
22824
+
22522
22825
  if (Fit._internal.Controls.Input.ActiveEditorForDialog === me)
22523
22826
  {
22524
22827
  // Control is actually already in Design Mode, but waiting
@@ -22633,23 +22936,26 @@ Fit.Controls.Input = function(ctlId)
22633
22936
  return;
22634
22937
  }
22635
22938
 
22636
- // Move dialog to control - otherwise placed in the root of the document where it pollutes,
22637
- // and makes it impossible to interact with the dialog in light dismissable panels and callouts.
22638
- // Dialog is placed alongside control and not within the control's container, to prevent Fit.UI
22639
- // styling from affecting the dialog.
22640
- // DISABLED: It breaks file picker controls in dialogs which are hosted in iframes.
22641
- // When an iframe is re-rooted in DOM it reloads, and any dynamically created content is lost.
22642
- // We will have to increase the z-index to make sure dialogs open on top of modal layers.
22643
- // EDIT 2021-08-20: Enabled again. The base64image plugin has now been altered so it no longer
22644
- // uses CKEditor's built-in file picker which is wrapped in an iFrame. Therefore the dialog can
22645
- // once again be mounted next to the Input control.
22646
-
22647
- var ckeDialogElement = this.getElement().$;
22648
- Fit.Dom.InsertAfter(Fit._internal.Controls.Input.ActiveEditorForDialog.GetDomElement(), ckeDialogElement);
22649
-
22650
- // 2nd+ time dialog is opened it remains invisible - make it appear and position it
22651
- ckeDialogElement.style.display = !CKEDITOR.env.ie || CKEDITOR.env.edge ? "flex" : ""; // https://github.com/ckeditor/ckeditor4/blob/8b208d05d1338d046cdc8f971c9faf21604dd75d/plugins/dialog/plugin.js#L152
22652
- this.layout(); // 'this' is the dialog instance - layout() positions dialog
22939
+ if (Fit._internal.ControlBase.ReduceDocumentRootPollution === true)
22940
+ {
22941
+ // Move dialog to control - otherwise placed in the root of the document where it pollutes,
22942
+ // and makes it impossible to interact with the dialog in light dismissable panels and callouts.
22943
+ // Dialog is placed alongside control and not within the control's container, to prevent Fit.UI
22944
+ // styling from affecting the dialog.
22945
+ // DISABLED: It breaks file picker controls in dialogs which are hosted in iframes.
22946
+ // When an iframe is re-rooted in DOM it reloads, and any dynamically created content is lost.
22947
+ // We will have to increase the z-index to make sure dialogs open on top of modal layers.
22948
+ // EDIT 2021-08-20: Enabled again. The base64image plugin has now been altered so it no longer
22949
+ // uses CKEditor's built-in file picker which is wrapped in an iFrame. Therefore the dialog can
22950
+ // once again be mounted next to the Input control.
22951
+
22952
+ var ckeDialogElement = this.getElement().$;
22953
+ Fit.Dom.InsertAfter(Fit._internal.Controls.Input.ActiveEditorForDialog.GetDomElement(), ckeDialogElement);
22954
+
22955
+ // 2nd+ time dialog is opened it remains invisible - make it appear and position it
22956
+ ckeDialogElement.style.display = !CKEDITOR.env.ie || CKEDITOR.env.edge ? "flex" : ""; // https://github.com/ckeditor/ckeditor4/blob/8b208d05d1338d046cdc8f971c9faf21604dd75d/plugins/dialog/plugin.js#L152
22957
+ this.layout(); // 'this' is the dialog instance - layout() positions dialog
22958
+ }
22653
22959
  });
22654
22960
 
22655
22961
  dialog.on("hide", function(ev) // Fires when user closes dialog, or when hide() is called on dialog, or if destroy() is called on editor instance from Dispose() or DesignMode(false)
@@ -22739,7 +23045,7 @@ Fit.Controls.Input = function(ctlId)
22739
23045
  createEditor();
22740
23046
  }
22741
23047
 
22742
- if (val !== Fit.Controls.InputResizing.Disabled)
23048
+ if (me.Resizable() !== Fit.Controls.InputResizing.Disabled) // Undo any resizing done in ordinary MultiLine mode
22743
23049
  {
22744
23050
  Fit.Dom.Data(me.GetDomElement(), "resized", "false");
22745
23051
 
@@ -22748,6 +23054,22 @@ Fit.Controls.Input = function(ctlId)
22748
23054
  input.style.margin = ""; // Chrome adds some odd margin when textarea is resized
22749
23055
  }
22750
23056
 
23057
+ var enableAutoGrow = me.Height().Value === -1 || (designEditorConfig !== null && designEditorConfig.AutoGrow && designEditorConfig.AutoGrow.Enabled === true);
23058
+
23059
+ if (enableAutoGrow === true && me.Height().Value !== -1)
23060
+ {
23061
+ me.Height(-1);
23062
+ }
23063
+
23064
+ if (enableAutoGrow === true && me.Maximizable() === true)
23065
+ {
23066
+ // Maximize button is disabled (using CSS) when auto grow is enabled, but we make sure to "minimize"
23067
+ // control so maximize button returns to its initial state, in case control was maximized prior to
23068
+ // enabling DesignMode with auto grow. Otherwise the button indicates that the control is maximized,
23069
+ // and so does calls to Maximized() which will incorrectly return True.
23070
+ me.Maximized(false);
23071
+ }
23072
+
22751
23073
  me._internal.Data("designmode", "true");
22752
23074
  repaint();
22753
23075
  }
@@ -22796,6 +23118,7 @@ Fit.Controls.Input = function(ctlId)
22796
23118
  }
22797
23119
 
22798
23120
  me._internal.Data("designmode", "false");
23121
+ me._internal.Data("autogrow", "false");
22799
23122
  Fit.Dom.Data(me.GetDomElement(), "resized", "false");
22800
23123
 
22801
23124
  revertToSingleLineIfNecessary();
@@ -22921,6 +23244,278 @@ Fit.Controls.Input = function(ctlId)
22921
23244
  var langSupport = ["da", "de", "en"];
22922
23245
  var locale = Fit.Internationalization.Locale().length === 2 ? Fit.Internationalization.Locale() : Fit.Internationalization.Locale().substring(0, 2);
22923
23246
  var lang = Fit.Array.Contains(langSupport, locale) === true ? locale : "en";
23247
+ var plugins = [];
23248
+ var toolbar = [];
23249
+ var mentions = [];
23250
+
23251
+ var config = designEditorConfig || {};
23252
+
23253
+ // Enable additional plugins not compiled into CKEditor by default
23254
+
23255
+ if ((config.Plugins && config.Plugins.Emojis === true) || (config.Toolbar && config.Toolbar.Emojis === true))
23256
+ {
23257
+ Fit.Array.Add(plugins, "emoji");
23258
+ }
23259
+
23260
+ if ((config.Plugins && config.Plugins.Images && config.Plugins.Images.Enabled === true) || (config.Toolbar && config.Toolbar.Images === true))
23261
+ {
23262
+ if (config.Toolbar && config.Toolbar.Images === true)
23263
+ {
23264
+ Fit.Array.Add(plugins, "base64image");
23265
+ }
23266
+
23267
+ plugins = Fit.Array.Merge(plugins, ["base64imagepaste", "dragresize"]);
23268
+ }
23269
+
23270
+ // Add toolbar buttons
23271
+
23272
+ if (!config.Toolbar || config.Toolbar.Formatting !== false)
23273
+ {
23274
+ Fit.Array.Add(toolbar,
23275
+ {
23276
+ name: "BasicFormatting",
23277
+ items: [ "Bold", "Italic", "Underline" ]
23278
+ });
23279
+ }
23280
+
23281
+ if (!config.Toolbar || config.Toolbar.Justify !== false)
23282
+ {
23283
+ Fit.Array.Add(toolbar,
23284
+ {
23285
+ name: "Justify",
23286
+ items: [ "JustifyLeft", "JustifyCenter", "JustifyRight" ]
23287
+ });
23288
+ }
23289
+
23290
+ if (!config.Toolbar || config.Toolbar.Lists !== false)
23291
+ {
23292
+ Fit.Array.Add(toolbar,
23293
+ {
23294
+ name: "Lists",
23295
+ items: [ "NumberedList", "BulletedList", "Indent", "Outdent" ]
23296
+ });
23297
+ }
23298
+
23299
+ if (!config.Toolbar || config.Toolbar.Links !== false)
23300
+ {
23301
+ Fit.Array.Add(toolbar,
23302
+ {
23303
+ name: "Links",
23304
+ items: [ "Link", "Unlink" ]
23305
+ });
23306
+ }
23307
+
23308
+ if (config.Toolbar)
23309
+ {
23310
+ var insert = [];
23311
+
23312
+ if (config.Toolbar.Emojis === true)
23313
+ {
23314
+ Fit.Array.Add(insert, "EmojiPanel");
23315
+ }
23316
+
23317
+ if (config.Toolbar.Images === true)
23318
+ {
23319
+ Fit.Array.Add(insert, "base64image");
23320
+ }
23321
+
23322
+ if (insert.length > 0)
23323
+ {
23324
+ Fit.Array.Add(toolbar,
23325
+ {
23326
+ name: "Insert",
23327
+ items: insert
23328
+ });
23329
+ }
23330
+ }
23331
+
23332
+ // Configure tags/mentions plugin
23333
+
23334
+ if (config.Tags)
23335
+ {
23336
+ var requestAwaiting = null;
23337
+
23338
+ var createEventArgs = function(marker, query, request) // EventsArgs for OnRequest and OnResponse
23339
+ {
23340
+ return { Sender: me, Query: { Marker: marker, Query: query }, Request: request };
23341
+ };
23342
+
23343
+ Fit.Array.ForEach(config.Tags.Triggers, function(trigger)
23344
+ {
23345
+ var mention =
23346
+ {
23347
+ marker: trigger.Marker,
23348
+ minChars: trigger.MinimumCharacters || 0,
23349
+ throttle: 0, // Throttling is not debouncing - it merely ensures that no more than 1 request is made every X milliseconds when value is changed (defaults to 200ms) - real debouncing implemented further down, which reduce and cancel network calls as user types - also a work around for https://github.com/ckeditor/ckeditor4/issues/5036
23350
+ feed: function(args, resolve)
23351
+ {
23352
+ // WebService is expected to return tag items in an array like so:
23353
+ // [ { Title: string, Value: string, Icon?: string, Url?: string, Data?: string }, { ... }, ... ]
23354
+
23355
+ var req = null;
23356
+
23357
+ if (config.Tags.JsonpCallback)
23358
+ {
23359
+ req = new Fit.Http.JsonpRequest(config.Tags.QueryUrl, config.Tags.JsonpCallback);
23360
+ config.Tags.JsonpTimeout && req.Timeout(config.Tags.JsonpTimeout);
23361
+ req.SetParameter("Marker", args.marker);
23362
+ req.SetParameter("Query", args.query);
23363
+ }
23364
+ else
23365
+ {
23366
+ req = new Fit.Http.JsonRequest(config.Tags.QueryUrl);
23367
+ req.SetData({ Marker: args.marker, Query: args.query });
23368
+ }
23369
+
23370
+ if (config.Tags.OnRequest)
23371
+ {
23372
+ var eventArgs = createEventArgs(args.marker, args.query, req);
23373
+
23374
+ if (config.Tags.OnRequest(me, eventArgs) === false)
23375
+ {
23376
+ resolve([]);
23377
+ return;
23378
+ }
23379
+
23380
+ if (eventArgs.Request !== req)
23381
+ {
23382
+ // Support for changing request instans to
23383
+ // take control over webservice communication.
23384
+
23385
+ // Restrict to support for Fit.Http.Request or classes derived from this
23386
+ Fit.Validation.ExpectInstance(eventArgs.Request, Fit.Http.Request);
23387
+
23388
+ req = eventArgs.Request;
23389
+ }
23390
+ }
23391
+
23392
+ var processDataAndResolve = function(items)
23393
+ {
23394
+ if (config.Tags.OnResponse) // OnResponse is allowed to manipulate tags
23395
+ {
23396
+ var eventArgs = Fit.Core.Merge(createEventArgs(args.marker, args.query, req), { Tags: items });
23397
+ config.Tags.OnResponse(me, eventArgs);
23398
+
23399
+ items = eventArgs.Tags; // In case OnResponse event handler assigned new collection
23400
+ }
23401
+
23402
+ Fit.Array.ForEach(items, function(item)
23403
+ {
23404
+ // Set properties required by mentions plugin
23405
+ item.id = item.Value;
23406
+ item.name = item.Title;
23407
+ });
23408
+
23409
+ resolve(items);
23410
+
23411
+ if (items.length > 0 && Fit._internal.ControlBase.ReduceDocumentRootPollution === true)
23412
+ {
23413
+ // Calling resolve(..) above immediately opens the context menu from which
23414
+ // a tag can be selected. However, it is placed in the root of the document
23415
+ // where it pollutes the global scope. Move it next to the Fit.UI control.
23416
+ // We do not mount it within the Fit.UI control as it could cause Fit.UI styles
23417
+ // to take effect on the context menu.
23418
+
23419
+ // Get the autocomplete context menu currently open. There can be only one
23420
+ // such menu open at any time. Each editor can declare multiple autocomplete
23421
+ // context menus since each tag marker is associated with its own context menu.
23422
+ var ctm = document.querySelector("ul.cke_autocomplete_opened");
23423
+ 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
23424
+ Fit.Dom.InsertAfter(me.GetDomElement(), ctm);
23425
+ }
23426
+ };
23427
+
23428
+ if (Fit.Core.InstanceOf(req, Fit.Http.JsonpRequest) === true)
23429
+ {
23430
+ req.OnSuccess(function(sender)
23431
+ {
23432
+ var response = req.GetResponse();
23433
+ var items = ((response instanceof Array) ? response : []);
23434
+
23435
+ processDataAndResolve(items);
23436
+ });
23437
+
23438
+ req.OnTimeout(function(sender)
23439
+ {
23440
+ resolve([]);
23441
+ Fit.Validation.ThrowError("Unable to get tags - request did not return data in time (JSONP timeout reached)");
23442
+ });
23443
+ }
23444
+ else
23445
+ {
23446
+ req.OnSuccess(function(sender)
23447
+ {
23448
+ var response = req.GetResponseJson();
23449
+ var items = ((response instanceof Array) ? response : []);
23450
+
23451
+ processDataAndResolve(items);
23452
+ });
23453
+
23454
+ req.OnFailure(function(sender)
23455
+ {
23456
+ resolve([]);
23457
+ Fit.Validation.ThrowError("Unable to get tags - request failed with HTTP Status code " + req.GetHttpStatus());
23458
+ });
23459
+ }
23460
+
23461
+ if (requestAwaiting !== null)
23462
+ {
23463
+ requestAwaiting.Abort();
23464
+ }
23465
+
23466
+ requestAwaiting = req;
23467
+ req.Start();
23468
+ },
23469
+ itemTemplate: function(item) // Item must define "name" and "id" properties - the {name} placeholder is replaced by "@" + the value of the "name" property - to get rid of "@" simply use an alternative property such as nameWithoutTag:"Some username"
23470
+ {
23471
+ if (item.Icon)
23472
+ {
23473
+ return '<li data-id="' + item.Value + '"><img src="' + item.Icon + '" style="width: 24px; height: 24px; border-radius: 24px; vertical-align: middle" alt=""><span style="display: inline-block; width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; margin-left: 5px">' + item.Title + '</span></li>';
23474
+ }
23475
+ else
23476
+ {
23477
+ return '<li data-id="' + item.Value + '">' + item.Title + '</li>';
23478
+ }
23479
+ },
23480
+ outputTemplate: function(item)
23481
+ {
23482
+ // IMPORTANT: Output produced must respect ACF (Advanced Content Filter).
23483
+ // So the tag produced must be allowed, and any attributes contained must be allowed.
23484
+
23485
+ var alternativeItem = null;
23486
+
23487
+ if (config.Tags.TagCreator)
23488
+ {
23489
+ var callbackArgs = { Sender: me, QueryMarker: trigger.Marker, Tag: Fit.Core.Clone(item) };
23490
+ alternativeItem = config.Tags.TagCreator(me, callbackArgs) || null;
23491
+ }
23492
+
23493
+ // Function should return a link for tags to "just work". Returning a <span> requires the span to be whitelisted in
23494
+ // extraAllowedContent configuration, but even then the editor will continue writing text within the <span> element,
23495
+ // rather than next to it. So one would expect something like: We will assign <span data-tag-type="@" ..>@James Bond</span> to this mission.
23496
+ // But what we get instead is something like: We will assign <span data-tag-type="@" ..>@James Bond to this mission</span>.
23497
+ // The same happens to link tags if the href attribute is removed, which is why we always add it, even when no URL is defined.
23498
+
23499
+ if (alternativeItem !== null)
23500
+ {
23501
+ return '<a data-tag-type="' + (alternativeItem.Type || trigger.Marker) + '" data-tag-id="' + (alternativeItem.Value || item.Value) + '"' + (alternativeItem.Data || item.Data ? ' data-tag-data="' + (alternativeItem.Data || item.Data) + '"' : '') + (alternativeItem.Url || item.Url ? ' href="' + (alternativeItem.Url || item.Url) + '"' : 'href=""') + '>' + (alternativeItem.Title || (trigger.Marker + item.Title)) + '</a>';
23502
+ }
23503
+ else
23504
+ {
23505
+ return '<a data-tag-type="' + trigger.Marker + '" data-tag-id="' + item.Value + '"' + (item.Data ? ' data-tag-data="' + item.Data + '"' : '') + (item.Url ? ' href="' + item.Url + '"' : 'href=""') + '>' + trigger.Marker + item.Title + '</a>';
23506
+ }
23507
+ }
23508
+ };
23509
+
23510
+ if (trigger.DebounceQuery !== 0) // A value of 0 (zero) disables debouncing
23511
+ {
23512
+ // Wrap feed handler in debounce function so that every time it gets invoked, it cancels the previous invocation
23513
+ mention.feed = Fit.Core.CreateDebouncer(mention.feed, trigger.DebounceQuery || 300).Invoke;
23514
+ }
23515
+
23516
+ Fit.Array.Add(mentions, mention)
23517
+ });
23518
+ }
22924
23519
 
22925
23520
  // Prevent control from losing focus when HTML editor is initialized,
22926
23521
  // e.g. if Design Mode is enabled when ordinary input control gains focus.
@@ -22974,50 +23569,32 @@ Fit.Controls.Input = function(ctlId)
22974
23569
  designEditor = CKEDITOR.replace(me.GetId() + "_DesignMode",
22975
23570
  {
22976
23571
  //allowedContent: true, // http://docs.ckeditor.com/#!/guide/dev_allowed_content_rules and http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-allowedContent
23572
+ extraAllowedContent: "a[data-tag-type,data-tag-id,data-tag-data]", // https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraAllowedContent
22977
23573
  language: lang,
22978
23574
  disableNativeSpellChecker: me.CheckSpelling() === false,
22979
23575
  readOnly: me.Enabled() === false,
22980
23576
  tabIndex: me.Enabled() === false ? -1 : 0,
22981
23577
  title: "",
23578
+ width: "100%", // Assume width of container
23579
+ 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
22982
23580
  startupFocus: focused === true ? "end" : false,
22983
- extraPlugins: Fit._internal.Controls.Input.Editor.Plugins.join(","), // "justify,pastefromword,base64image,base64imagepaste,dragresize",
23581
+ extraPlugins: plugins.join(","),
22984
23582
  clipboard_handleImages: false, // Disable native support for image pasting - allow base64imagepaste plugin to handle image data if loaded
22985
23583
  base64image: // Custom property used by base64image plugin if loaded
22986
23584
  {
22987
- storage: "blob", // "base64" (default) or "blob" - base64 will always be provided by browsers not supporting blob storage
23585
+ storage: designEditorConfig !== null && designEditorConfig.Plugins && designEditorConfig.Plugins.Images && designEditorConfig.Plugins.Images.EmbedType === "blob" ? "blob" : "base64", // "base64" (default) or "blob" - base64 will always be provided by browsers not supporting blob storage
22988
23586
  onImageAdded: onImageAdded
22989
23587
  },
22990
23588
  base64imagepaste: // Custom property used by base64imagepaste plugin if loaded - notice that IE has native support for image pasting as base64 so plugin is not triggered in IE
22991
23589
  {
22992
- storage: "blob", // "base64" (default) or "blob" - base64 will always be provided by browsers not supporting blob storage
23590
+ storage: designEditorConfig !== null && designEditorConfig.Plugins && designEditorConfig.Plugins.Images && designEditorConfig.Plugins.Images.EmbedType === "blob" ? "blob" : "base64", // "base64" (default) or "blob" - base64 will always be provided by browsers not supporting blob storage
22993
23591
  onImageAdded: onImageAdded
22994
23592
  },
22995
23593
  resize_enabled: resizable !== Fit.Controls.InputResizing.Disabled,
22996
23594
  resize_dir: resizable === Fit.Controls.InputResizing.Enabled ? "both" : resizable === Fit.Controls.InputResizing.Vertical ? "vertical" : resizable === Fit.Controls.InputResizing.Horizontal ? "horizontal" : "none", // Specific to resize plugin (horizontal | vertical | both - https://ckeditor.com/docs/ckeditor4/latest/features/resize.html)
22997
- toolbar: Fit._internal.Controls.Input.Editor.Toolbar,
22998
- /*[
22999
- {
23000
- name: "BasicFormatting",
23001
- items: [ "Bold", "Italic", "Underline" ]
23002
- },
23003
- {
23004
- name: "Justify",
23005
- items: [ "JustifyLeft", "JustifyCenter", "JustifyRight" ]
23006
- },
23007
- {
23008
- name: "Lists",
23009
- items: [ "NumberedList", "BulletedList", "Indent", "Outdent" ]
23010
- },
23011
- {
23012
- name: "Links",
23013
- items: [ "Link", "Unlink" ]
23014
- },
23015
- {
23016
- name: "Insert",
23017
- items: [ "base64image" ]
23018
- }
23019
- ],*/
23595
+ toolbar: toolbar,
23020
23596
  removeButtons: "", // Set to empty string to prevent CKEditor from removing buttons such as Underline
23597
+ mentions: mentions,
23021
23598
  on:
23022
23599
  {
23023
23600
  instanceReady: function()
@@ -23041,20 +23618,21 @@ Fit.Controls.Input = function(ctlId)
23041
23618
  me.Maximized(false); // Minimize to allow editor to initially assume normal height - maximized again afterwards
23042
23619
  }
23043
23620
 
23044
- var h = me.Height();
23045
- var useConfiguredHeight = h.Value >= 150 && h.Unit === "px"; // Only pixels are supported in DesignMode, and a minimum height of 150px must be applied for editor to be usable
23046
-
23047
- if (useConfiguredHeight === false)
23621
+ if (me.Height().Value === -1 || (designEditorConfig !== null && designEditorConfig.AutoGrow && designEditorConfig.AutoGrow.Enabled === true))
23048
23622
  {
23049
- var defaultHeight = 150;
23050
- me.Height(defaultHeight);
23623
+ // Enable auto grow
23051
23624
 
23052
- if (me.Maximizable() === true)
23625
+ if (me.Height().Value !== -1) // Enable auto grow if not already enabled
23053
23626
  {
23054
- minimizeHeight = defaultHeight;
23055
- maximizeHeight = defaultHeight * 2;
23056
- minMaxUnit = "px";
23627
+ me.Height(-1);
23057
23628
  }
23629
+
23630
+ // Make necessary adjustments to editor DOM for auto grow's min/max height to work
23631
+
23632
+ var editorContainer = designEditor.container.$;
23633
+ var editableDiv = editorContainer.querySelector("div.cke_wysiwyg_div");
23634
+ 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
23635
+ 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
23058
23636
  }
23059
23637
 
23060
23638
  if (maximized === true)
@@ -23062,6 +23640,60 @@ Fit.Controls.Input = function(ctlId)
23062
23640
  me.Maximized(true);
23063
23641
  }
23064
23642
 
23643
+ if (config.InfoPanel && config.InfoPanel.Text)
23644
+ {
23645
+ var infoPanel = document.createElement("div");
23646
+ infoPanel.className = "FitUiControlInputInfoPanel";
23647
+ infoPanel.innerHTML = config.InfoPanel.Text;
23648
+ infoPanel.style.cssText = "text-align: " + (config.InfoPanel.Alignment ? config.InfoPanel.Alignment.toLowerCase() : "center");
23649
+
23650
+ var ckEditorInner = designEditor.container.$.querySelector(".cke_inner"); // Div in modern browsers, span in legacy IE
23651
+ var ckEditorBottom = designEditor.container.$.querySelector(".cke_inner span.cke_bottom"); // Only present if resize handle is enable
23652
+
23653
+ if (ckEditorInner !== null)
23654
+ {
23655
+ if (ckEditorBottom !== null)
23656
+ {
23657
+ Fit.Dom.InsertBefore(ckEditorBottom, infoPanel);
23658
+ }
23659
+ else
23660
+ {
23661
+ Fit.Dom.Add(ckEditorInner, infoPanel);
23662
+ }
23663
+ }
23664
+ }
23665
+
23666
+ // DISABLED: Doesn't work! Emoji panel contains an iFrame. When it is re-mounted
23667
+ // in DOM, the iframe reloads, and dynamically added content is lost. Also, this makes
23668
+ // CKEditor throw errors and the dialog never appears.
23669
+ /*if (Fit._internal.ControlBase.ReduceDocumentRootPollution === true)
23670
+ {
23671
+ // Move emoji dialog to control - otherwise placed in the root of the document where it pollutes,
23672
+ // and makes it impossible to interact with the dialog in light dismissable panels and callouts.
23673
+ // Dialog is placed alongside control and not within the control's container, to prevent Fit.UI
23674
+ // styling from affecting the dialog.
23675
+ if (config.Toolbar && config.Toolbar.Emojis === true)
23676
+ {
23677
+ var emojiButton = designEditor.container.$.querySelector("a.cke_button__emojipanel");
23678
+
23679
+ if (emojiButton !== null)
23680
+ {
23681
+ Fit.Events.AddHandler(emojiButton, "click", function(e)
23682
+ {
23683
+ setTimeout(function() // Postpone - made visible after click event
23684
+ {
23685
+ var emojiPanel = document.querySelector("div.cke_emoji-panel:not([style*='display: none'])");
23686
+
23687
+ if (emojiPanel !== null)
23688
+ {
23689
+ Fit.Dom.InsertAfter(me.GetDomElement(), emojiPanel);
23690
+ }
23691
+ }, 0);
23692
+ });
23693
+ }
23694
+ }
23695
+ }*/
23696
+
23065
23697
  designEditor._isReadyForInteraction = true;
23066
23698
 
23067
23699
  // Make editor assume configured width and height.
@@ -23090,13 +23722,81 @@ Fit.Controls.Input = function(ctlId)
23090
23722
 
23091
23723
  input.onkeyup();
23092
23724
  },
23093
- resize: function() // Fires when size is changed, not just when resized using resize handle in lower right cornor
23725
+ resize: function() // Fires when size is changed (except via auto grow), not just when resized using resize handle in lower right cornor
23094
23726
  {
23095
- me._internal.Data("resized", "true");
23096
- repaint();
23727
+ if (designEditorSuppressOnResize === false) // Only set data-resized="true" when resized using resize handle
23728
+ {
23729
+ me._internal.Data("resized", "true");
23730
+ repaint();
23731
+ }
23732
+ },
23733
+ selectionChange: function(ev)
23734
+ {
23735
+ // Disable/enable toolbar buttons, depending on whether a tag/mention is selected
23736
+
23737
+ var elm = ev.data.selection.getStartElement().$;
23738
+
23739
+ if (elm.tagName === "A" && Fit.Dom.Data(elm, "tag-id") !== null)
23740
+ {
23741
+ designEditorSuppressPaste = true;
23742
+ setTimeout(function() // Postpone - otherwise we won't be able to temporarily disable some of the buttons (https://jsfiddle.net/ymv56znq/14/)
23743
+ {
23744
+ disableDesignEditorButtons();
23745
+ }, 0);
23746
+ }
23747
+ else
23748
+ {
23749
+ designEditorSuppressPaste = false;
23750
+ restoreDesignEditorButtons();
23751
+ }
23752
+ },
23753
+ doubleclick: function(ev)
23754
+ {
23755
+ // Suppress link dialog for tags (similar code found in beforeCommandExec handler below)
23756
+ if (Fit.Dom.Data(ev.data.element.$, "tag-id") !== null)
23757
+ {
23758
+ ev.cancel();
23759
+ return;
23760
+ }
23761
+ },
23762
+ paste: function(ev)
23763
+ {
23764
+ // Prevent pasting (especially images) into tags.
23765
+ // OnPaste is suppressed using an OnPaste handler in capture phase, which will prevent the operation entirely
23766
+ // on supported browsers. On legacy browsers we handle this by invoking undo on the editor instance instead.
23767
+ //var path = ev.editor.elementPath(); // Null if dialog button is triggered without placing text cursor in editor first
23768
+ //if (Fit.Dom.Data(path.lastElement.$, "tag-id") !== null)
23769
+ if (designEditorSuppressPaste === true) // Also handled in a native OnPaste event handler (capture phase) for supported browsers, which suppresses the event entirely
23770
+ {
23771
+ setTimeout(function() // Postpone - allow editor to create snapshot
23772
+ {
23773
+ ev.editor.execCommand("undo"); // Undo change - paste event cannot be canceled, as it has already happened
23774
+ }, 0);
23775
+ return;
23776
+ }
23097
23777
  },
23098
23778
  beforeCommandExec: function(ev)
23099
23779
  {
23780
+ // Suppress any command (formatting, link dialog etc.) for tags (similar code found in doubleclick handler above).
23781
+ // Commmands can be triggered in multiple ways, e.g. using toolbar buttons, using keyboard shortcuts, and programmatically.
23782
+ var path = ev.editor.elementPath(); // Null if dialog button is triggered without placing text cursor in editor first
23783
+ if (path === null && ev.editor.getData().indexOf("<p><a data-tag-id=") === 0)
23784
+ {
23785
+ // Text cursor has not been placed in editor, but a command such as Bold or "insert image"
23786
+ // has been triggered, and editor content starts with a tag. This results in command being
23787
+ // applied to the tag, which we do not want. Usually this is prevented by the toolbar being
23788
+ // disabled when a tag is selected (see selectionChange event handler further up), but that
23789
+ // is not the case when the user has not yet placed the cursor in the editor.
23790
+ ev.cancel();
23791
+ return;
23792
+ }
23793
+ else if (path !== null && Fit.Dom.Data(path.lastElement.$, "tag-id") !== null && ev.data.name !== "undo") // Allow undo within tag, in case user typed something by mistake
23794
+ {
23795
+ // Cursor is currently placed in a tag - do not allow formatting
23796
+ ev.cancel();
23797
+ return;
23798
+ }
23799
+
23100
23800
  if (ev && ev.data && ev.data.command && ev.data.command.dialogName)
23101
23801
  {
23102
23802
  // Command triggered was a dialog
@@ -23153,6 +23853,66 @@ Fit.Controls.Input = function(ctlId)
23153
23853
  });
23154
23854
  }
23155
23855
 
23856
+ function disableDesignEditorButtons() // Might be called multiple times, e.g. if navigating from one tag/mention to another - buttons must be disabled every time since CKEditor itself re-enable buttons when navigating elements in editor
23857
+ {
23858
+ var preserveButtonState = designEditorRestoreButtonState === null;
23859
+
23860
+ if (preserveButtonState === true)
23861
+ {
23862
+ designEditorRestoreButtonState = {};
23863
+ }
23864
+
23865
+ Fit.Array.ForEach(designEditor.toolbar, function(toolbarGroup)
23866
+ {
23867
+ var items = toolbarGroup.items;
23868
+
23869
+ Fit.Array.ForEach(toolbarGroup.items, function(item)
23870
+ {
23871
+ if (item.command) // Buttons have a command identifier which can be used to resolve the actual command instance
23872
+ {
23873
+ var cmd = designEditor.getCommand(item.command);
23874
+
23875
+ if (preserveButtonState === true && cmd.state !== CKEDITOR.TRISTATE_DISABLED) // https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_command.html#property-state
23876
+ {
23877
+ designEditorRestoreButtonState[item.command] = true;
23878
+ }
23879
+
23880
+ cmd.disable();
23881
+ }
23882
+ else if (item.setState) // MenuButtons allow for direct manipulation of enabled/disabled state
23883
+ {
23884
+ if (preserveButtonState === true && item.getState() !== CKEDITOR.TRISTATE_DISABLED) // https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_command.html#property-state
23885
+ {
23886
+ designEditorRestoreButtonState[item.name] = item;
23887
+ }
23888
+
23889
+ item.setState(CKEDITOR.TRISTATE_DISABLED);
23890
+ }
23891
+ });
23892
+ });
23893
+ }
23894
+
23895
+ function restoreDesignEditorButtons()
23896
+ {
23897
+ if (designEditorRestoreButtonState !== null)
23898
+ {
23899
+ Fit.Array.ForEach(designEditorRestoreButtonState, function(commandKey)
23900
+ {
23901
+ if (designEditorRestoreButtonState[commandKey] === true) // Command button
23902
+ {
23903
+ var cmd = designEditor.getCommand(commandKey);
23904
+ cmd.enable();
23905
+ }
23906
+ else // MenuButton
23907
+ {
23908
+ designEditorRestoreButtonState[commandKey].setState(CKEDITOR.TRISTATE_OFF); // Enabled but not highlighted/activated like e.g. a bold button would be when selecting bold text
23909
+ }
23910
+ });
23911
+
23912
+ designEditorRestoreButtonState = null;
23913
+ }
23914
+ };
23915
+
23156
23916
  function updateDesignEditorSize()
23157
23917
  {
23158
23918
  if (designEditor !== null)
@@ -23170,21 +23930,17 @@ Fit.Controls.Input = function(ctlId)
23170
23930
  return;
23171
23931
  }
23172
23932
 
23173
- var w = me.Width();
23933
+ //var w = me.Width();
23174
23934
  var h = me.Height();
23175
23935
 
23176
- // CKEditor contains a bug that prevents us from resizing
23177
- // with a CSS unit, so currently only pixels are supported.
23178
-
23179
- if (w.Unit !== "px" || h.Unit !== "px")
23180
- throw new Error("DesignMode does not support resizing in units different from px");
23181
-
23182
23936
  // Default control width is 200px (defined in Styles.css).
23183
23937
  // NOTICE: resize does not work reliably when editor is hidden, e.g. behind a tab with display:none.
23184
23938
  // The height set will not have the height of the toolbar substracted since the height can not be
23185
23939
  // determined for hidden objects, so the editor will become larger than the value set (height specified + toolbar height).
23186
23940
  // http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-resize
23187
- designEditor.resize(((w.Value > -1) ? w.Value : 200), ((h.Value > -1) ? h.Value : 150));
23941
+ designEditorSuppressOnResize = true;
23942
+ designEditor.resize("100%", h.Value > -1 ? h.Value + h.Unit : "100%"); // A height of 100% allow editor to automatically adjust the height of the editor's content area to the height of its content (data-autogrow="true" must be set to make control container adjust to its content as well)
23943
+ designEditorSuppressOnResize = false;
23188
23944
 
23189
23945
  // Set mutation observer responsible for updating editor size once it becomes visible
23190
23946
 
@@ -23202,7 +23958,10 @@ Fit.Controls.Input = function(ctlId)
23202
23958
  {
23203
23959
  if (Fit.Dom.IsVisible(me.GetDomElement()) === true)
23204
23960
  {
23205
- designEditor.resize(((w.Value > -1) ? w.Value : 200), ((h.Value > -1) ? h.Value : 150));
23961
+ designEditorSuppressOnResize = true;
23962
+ designEditor.resize("100%", h.Value > -1 ? h.Value + h.Unit : "100%"); // A height of 100% allow editor to automatically adjust the height of the editor's content area to the height of its content (data-autogrow="true" must be set to make control container adjust to its content as well)
23963
+ designEditorSuppressOnResize = false;
23964
+
23206
23965
  disconnect(); // Observers are expensive - remove when no longer needed
23207
23966
  }
23208
23967
  });
@@ -23371,66 +24130,9 @@ Fit._internal.Controls.Input.Editor =
23371
24130
  /// <member container="Fit._internal.Controls.Input.Editor" name="Skin" access="public" static="true" type="'bootstrapck' | 'moono-lisa' | null">
23372
24131
  /// <description> Skin used with DesignMode - must be set before an editor is created and cannot be changed for each individual control </description>
23373
24132
  /// </member>
23374
- Skin: null, // Notice: CKEditor does not support multiple different skins on the same page - do not change value once an editor has been created
23375
-
23376
- /// <member container="Fit._internal.Controls.Input.Editor" name="Plugins" access="public" static="true" type="('htmlwriter' | 'justify' | 'pastefromword' | 'resize' | 'base64image' | 'base64imagepaste' | 'dragresize')[]">
23377
- /// <description> Additional plugins used with DesignMode </description>
23378
- /// </member>
23379
- Plugins: ["htmlwriter", "justify", "pastefromword", "resize" /*"base64image", "base64imagepaste", "dragresize"*/], // Regarding base64imagepaste and dragresize: IE11 has native support for pasting images as base64 and IE8+ has native support for image resizing, so plugins are not in effect in IE, even when enabled
23380
-
23381
- /// <member container="Fit._internal.Controls.Input.Editor" name="Toolbar" access="public" static="true" type="( { name: 'BasicFormatting', items: ('Bold' | 'Italic' | 'Underline')[] } | { name: 'Justify', items: ('JustifyLeft' | 'JustifyCenter' | 'JustifyRight')[] } | { name: 'Lists', items: ('NumberedList' | 'BulletedList' | 'Indent' | 'Outdent')[] } | { name: 'Links', items: ('Link' | 'Unlink')[] } | { name: 'Insert', items: ('base64image')[] } )[]">
23382
- /// <description> Toolbar buttons used with DesignMode - make sure necessary plugins are loaded (see Fit._internal.Controls.Input.EditorPlugins) </description>
23383
- /// </member>
23384
- Toolbar:
23385
- [
23386
- {
23387
- name: "BasicFormatting",
23388
- items: [ "Bold", "Italic", "Underline" ]
23389
- },
23390
- {
23391
- name: "Justify",
23392
- items: [ "JustifyLeft", "JustifyCenter", "JustifyRight" ]
23393
- },
23394
- {
23395
- name: "Lists",
23396
- items: [ "NumberedList", "BulletedList", "Indent", "Outdent" ]
23397
- },
23398
- {
23399
- name: "Links",
23400
- items: [ "Link", "Unlink" ]
23401
- }/*,
23402
- {
23403
- name: "Insert",
23404
- items: [ "base64image" ]
23405
- }*/
23406
- ]
24133
+ Skin: null // Notice: CKEditor does not support multiple different skins on the same page - do not change value once an editor has been created
23407
24134
  };
23408
24135
 
23409
- /// <container name="Fit._internal.Controls.Input.BlobManager">
23410
- /// Internal settings related to blob storage management in HTML Editor (Design Mode)
23411
- /// </container>
23412
- Fit._internal.Controls.Input.BlobManager =
23413
- {
23414
- /// <member container="Fit._internal.Controls.Input.BlobManager" name="RevokeBlobUrlsOnDispose" access="public" static="true" type="'All' | 'UnreferencedOnly'">
23415
- /// <description>
23416
- /// Dispose images from blob storage (revoke blob URLs) added though image plugins when control is disposed.
23417
- /// If "UnreferencedOnly" is specified, the component using Fit.UI's input control will be responsible for
23418
- /// disposing referenced blobs. Failing to do so may cause a memory leak.
23419
- /// </description>
23420
- /// </member>
23421
- RevokeBlobUrlsOnDispose: "All", // "All" | "UnreferencedOnly"
23422
-
23423
- /// <member container="Fit._internal.Controls.Input.BlobManager" name="RevokeExternalBlobUrlsOnDispose" access="public" static="true" type="boolean">
23424
- /// <description>
23425
- /// Dispose images from blob storage (revoke blob URLs) added through Value(..)
23426
- /// function when control is disposed. Basically ownership of these blobs are handed
23427
- /// over to the control for the duration of its life time.
23428
- /// These images are furthermore subject to the rule set in RevokeBlobUrlsOnDispose.
23429
- /// </description>
23430
- /// </member>
23431
- RevokeExternalBlobUrlsOnDispose: false
23432
- }
23433
-
23434
24136
  /// <container name="Fit.Controls.InputResizing">
23435
24137
  /// <description> Resizing options </description>
23436
24138
  /// <member name="Enabled" access="public" static="true" type="string" default="Enabled"> Allow for resizing both vertically and horizontally </member>