thirdparty-wysiwyg.less 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. .enable_plugin_mindmup_wysiwyg() when(@enable-plugin-mindmup-wysiwyg = true) {
  2. .wysiwyg-editor {
  3. max-height: 250px;
  4. height: 250px;
  5. background-color: #F7F8FA;
  6. border-collapse: separate;
  7. border: 1px solid #BBC0CA;
  8. padding: 4px;
  9. box-sizing: content-box;
  10. overflow-y: scroll;
  11. overflow-x:hidden;
  12. outline: none;
  13. &:focus {
  14. background-color:#FFF;
  15. }
  16. }
  17. .wysiwyg-toolbar {
  18. line-height: 33px;
  19. margin: 0 !important;
  20. position: relative;
  21. .dropdown-menu {
  22. text-align: left;
  23. }
  24. .btn-group {
  25. float: none !important;//to override .RTL's
  26. font-size: 0;
  27. }
  28. .btn-group > .btn {
  29. //sometimes we need to put .btn inside an .inline.position-relative for dropdowns to show up in correct position
  30. float: none;
  31. padding-left: 0;
  32. padding-right: 0;
  33. text-align: center;
  34. margin-left: 1px;
  35. > .@{icon}:first-child {
  36. font-size: @font-size-wysiwyg-button-icon;
  37. width: 25px;
  38. max-width: 25px;
  39. display: inline-block;
  40. border-width: 1px !important;
  41. }
  42. &.dropdown-toggle > .@{icon}:last-child {
  43. margin-right: 4px;
  44. }
  45. /**
  46. &.active:after {
  47. border-color: transparent;
  48. border-style: solid;
  49. border-top-color: inherit;
  50. border-width: 6px 14px;
  51. bottom: -13px;
  52. left: 0;
  53. right: 0;
  54. }
  55. */
  56. }
  57. }
  58. .wysiwyg-style1 , .wysiwyg-style2 {
  59. .btn-group > .btn , .btn-group > .inline > .btn {
  60. margin: 0 !important;
  61. background: #FFF !important;
  62. border-width: 0 !important;
  63. color: #ADB3BE !important;
  64. text-shadow: none !important;
  65. &.active {
  66. color: #5B80CE !important;
  67. &:after {
  68. display: none;
  69. }
  70. }
  71. }
  72. .btn-group {
  73. position:relative;
  74. &:after {
  75. display: block;
  76. content: "";
  77. position: absolute;
  78. left: -2px;
  79. top: 6px;
  80. bottom:6px;
  81. width: 0;
  82. max-width: 0;
  83. border-left:1px solid #E1E6EA;
  84. }
  85. &:first-child:after {
  86. display:none;
  87. }
  88. }
  89. }
  90. .wysiwyg-style2 {
  91. background-color:#E5E5E5;
  92. & + .wysiwyg-editor {
  93. border-color:#DDD;
  94. background-color:#FFF;
  95. border-top:none;
  96. }
  97. .btn-group > .btn , .btn-group > .inline > .btn {
  98. margin:0 1px 0 0 !important;
  99. background:#FFF !important;
  100. border:none !important;
  101. color:#8D939E !important;
  102. text-shadow:none !important;
  103. &.active {
  104. color:#FFF !important;
  105. background:#6AAEDF !important;
  106. }
  107. }
  108. .btn-group:after {
  109. display:none;
  110. }
  111. }
  112. .wysiwyg-toolbar {
  113. .btn-colorpicker {
  114. width: 24px;
  115. height: 24px;
  116. position: relative;
  117. //border-radius: 12px;
  118. background: #87B87F; /* Old browsers */
  119. background: -moz-linear-gradient(top, #CF3E73 10%, #FFFFFF 20%, #2283C5 30%, #FFFFFF 40%, #87B87F 50%, #FFFFFF 60%, #FFB752 70%, #FFFFFF 80%, #D15B47 90%, #FFFFFF 100%); /* FF3.6+ */
  120. background: -webkit-gradient(linear, left top, left bottom, color-stop(10%,#CF3E73), color-stop(20%,#FFFFFF), color-stop(30%,#2283C5), color-stop(40%,#FFFFFF), color-stop(50%,#87B87F), color-stop(60%,#FFFFFF), color-stop(70%,#FFB752), color-stop(80%,#FFFFFF), color-stop(90%,#D15B47), color-stop(100%,#FFFFFF)); /* Chrome,Safari4+ */
  121. background: -webkit-linear-gradient(top, #CF3E73 10%, #FFFFFF 20%, #2283C5 30%, #FFFFFF 40%, #87B87F 50%, #FFFFFF 60%, #FFB752 70%, #FFFFFF 80%, #D15B47 90%, #FFFFFF 100%); /* Chrome10+,Safari5.1+ */
  122. background: -o-linear-gradient(top, #CF3E73 10%, #FFFFFF 20%, #2283C5 30%, #FFFFFF 40%, #87B87F 50%, #FFFFFF 60%, #FFB752 70%, #FFFFFF 80%, #D15B47 90%, #FFFFFF 100%); /* Opera11.10+ */
  123. background: -ms-linear-gradient(top, #CF3E73 10%, #FFFFFF 20%, #2283C5 30%, #FFFFFF 40%, #87B87F 50%, #FFFFFF 60%, #FFB752 70%, #FFFFFF 80%, #D15B47 90%, #FFFFFF 100%); /* IE10+ */
  124. filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#CF3E73', endColorstr='#FFB752',GradientType=0 ); /* IE6-9 */
  125. background: linear-gradient(top, #CF3E73 10%, #FFFFFF 20%, #2283C5 30%, #FFFFFF 40%, #87B87F 50%, #FFFFFF 60%, #FFB752 70%, #FFFFFF 80%, #D15B47 90%, #FFFFFF 100%); /* W3C */
  126. }
  127. .dropdown-colorpicker > .dropdown-menu {
  128. top: auto;
  129. }
  130. input[type=file] {
  131. position: fixed;
  132. z-index: -10;
  133. opacity: 0;
  134. //inside modals the z-index:-10 does not work as expected
  135. max-width: 0;
  136. max-height: 0;
  137. display: block;
  138. }
  139. .wysiwyg-choose-file {
  140. display:inline-block;
  141. width:auto;
  142. margin:4px auto 0;
  143. padding-left:5px;
  144. padding-right:5px;
  145. }
  146. .dropdown-menu {
  147. input[type=text] {
  148. margin-left:8px;
  149. margin-bottom:0;
  150. &.form-control {
  151. min-width: 150px;
  152. }
  153. }
  154. .btn {
  155. margin-right: 8px;
  156. margin-left: 8px;
  157. }
  158. }
  159. }
  160. .wysiwyg-style1 .btn-colorpicker {
  161. width: 20px;
  162. height: 20px;
  163. margin-left: 4px;
  164. }
  165. @media screen and (-webkit-min-device-pixel-ratio: 0) {
  166. /* for adding image resize functionality in chrome and safari */
  167. .wysiwyg-editor {
  168. img {
  169. display:inline !important;
  170. }
  171. .ui-wrapper {
  172. border:1px dotted #D00;
  173. overflow:visible !important;/* because it's image only, so it's ok */
  174. display:inline-block !important;
  175. vertical-align:middle;
  176. &:after {
  177. content:"";
  178. display:block;
  179. position:absolute;
  180. right:-3px; bottom:-3px;
  181. width:7px; height:7px;
  182. border:1px solid #D00;
  183. background-color:#FFF;
  184. z-index:1;
  185. }
  186. }
  187. }
  188. }
  189. /* inside widget */
  190. .widget-header .wysiwyg-toolbar {
  191. background-color:transparent;
  192. .btn-group > .btn , .btn-group > .inline > .btn {
  193. border-color:transparent;
  194. background:rgba(255,255,255,0.25) !important;
  195. color:#FFF !important;
  196. min-width: 32px;
  197. border-width: 1px !important;
  198. border-radius: 4px !important;
  199. padding: 2px 1px 4px;
  200. &.active {
  201. background:rgba(0,0,0,0.25) !important;
  202. }
  203. }
  204. }
  205. .widget-body .wysiwyg-editor {
  206. border-width: 0;
  207. }
  208. .wysiwyg-speech-input {
  209. width: 20px !important;
  210. color: transparent !important;
  211. background: transparent none !important;
  212. border-width: 0 !important;
  213. .transform(~"scale(2.0, 2.0)");
  214. .box-shadow(none) !important;
  215. position: absolute;
  216. right: 0;
  217. top: -10px;
  218. cursor: pointer;
  219. &:focus {
  220. .box-shadow(none) !important;
  221. }
  222. }
  223. }
  224. .enable_plugin_mindmup_wysiwyg();
  225. //Markdown Editor
  226. .enable_markdown_editor() when(@enable-markdown-editor = true) {
  227. .widget-body .md-header {
  228. margin-top:-30px;
  229. margin-left:9px;
  230. .btn {
  231. border-color: transparent;
  232. background: rgba(255,255,255,0.25) !important;
  233. color: #FFF !important;
  234. text-align: center;
  235. min-width: 32px;
  236. border-width: 1px !important;
  237. border-radius: 4px !important;
  238. padding: 2px 4px 4px;
  239. > .@{icon} {
  240. font-size: @font-size-markdown-icon;
  241. width: 25px;
  242. max-width: 25px;
  243. display: inline-block;
  244. }
  245. }
  246. .btn-inverse {
  247. background: rgba(0,0,0,0.25) !important;
  248. padding-right: 5px;
  249. margin-left: 4px;
  250. }
  251. }
  252. .md-fullscreen-controls {
  253. display: none;
  254. }
  255. .widget-body {
  256. .md-preview {
  257. padding:8px;
  258. min-height:200px;
  259. }
  260. .md-input {
  261. border:none !important;
  262. box-shadow:none !important;
  263. display:block;
  264. margin-bottom:0;
  265. background-color:rgba(48, 126, 204, 0.07);
  266. padding:8px;
  267. width: 100%;
  268. &:focus {
  269. background-color:#FFF;
  270. box-shadow:none !important;
  271. }
  272. }
  273. }
  274. }
  275. .enable_markdown_editor();