_richtext.scss 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. .richText {
  2. position: relative;
  3. width: 100%;
  4. border-radius: 7px;
  5. .richText-form {
  6. font-family: Calibri, Verdana, Helvetica, sans-serif;
  7. label {
  8. display: block;
  9. padding: 10px 15px;
  10. }
  11. input {
  12. &[type="text"],
  13. &[type="file"],
  14. &[type="number"] {
  15. padding: 10px 15px;
  16. border: #ecf0fa solid 1px;
  17. min-width: 200px;
  18. width: 100%;
  19. border-radius: 5px;
  20. outline: 0;
  21. }
  22. }
  23. select {
  24. padding: 10px 15px;
  25. border: #ecf0fa solid 1px;
  26. min-width: 200px;
  27. width: 100%;
  28. border-radius: 5px;
  29. outline: 0;
  30. cursor: pointer;
  31. }
  32. button {
  33. margin: 10px 0;
  34. padding: 0.375rem 0.75rem;
  35. background-color: $primary-1;
  36. border: none;
  37. color: #fafafa;
  38. cursor: pointer;
  39. -webkit-appearance: none;
  40. -moz-appearance: none;
  41. appearance: none;
  42. -webkit-border-radius: 5px;
  43. -moz-border-radius: 5px;
  44. border-radius: 5px;
  45. }
  46. }
  47. .richText-toolbar {
  48. min-height: 20px;
  49. border-block-end: 0;
  50. ul {
  51. margin-block-end: 0;
  52. border-block-end: #ecf0fa solid 1px;
  53. li {
  54. float: $float-left;
  55. display: block;
  56. list-style: none;
  57. a {
  58. display: block;
  59. padding: 10px 15px;
  60. cursor: pointer;
  61. -webkit-transition: background-color 0.4s;
  62. -moz-transition: background-color 0.4s;
  63. transition: background-color 0.4s;
  64. color: #858398;
  65. .fa,
  66. .fe,
  67. .fas,
  68. .far,
  69. svg {
  70. pointer-events: none;
  71. }
  72. .richText-dropdown-outer {
  73. display: none;
  74. position: absolute;
  75. inset-block-start: 0;
  76. inset-inline-start: 0;
  77. inset-inline-end: 0;
  78. inset-block-end: 0;
  79. background-color: rgba(0, 0, 0, 0.3);
  80. cursor: default;
  81. .richText-dropdown {
  82. position: relative;
  83. display: block;
  84. margin: 3% auto 0 auto;
  85. background-color: #fff;
  86. border: #ecf0fa solid 1px;
  87. min-width: 100px;
  88. width: 320px;
  89. max-width: 90%;
  90. border-radius: 5px;
  91. -webkit-box-shadow: 0px 16px 18px rgba(6, 10, 48, 0.1);
  92. -moz-box-shadow: 0px 16px 18px rgba(6, 10, 48, 0.1);
  93. box-shadow: 0px 16px 18px rgba(6, 10, 48, 0.1);
  94. padding-block-start: 20px;
  95. z-index: 1;
  96. .richText-dropdown-close {
  97. position: absolute;
  98. inset-block-start: 6px;
  99. inset-inline-end: 5px;
  100. background: transparent;
  101. /* color: #adaeb1; */
  102. cursor: pointer;
  103. font-size: 16px;
  104. text-align: center;
  105. width: 25px;
  106. border-radius: 5px;
  107. }
  108. }
  109. ul.richText-dropdown {
  110. list-style: none;
  111. li {
  112. display: block;
  113. float: none;
  114. font-family: Calibri, Verdana, Helvetica, sans-serif;
  115. a {
  116. display: block;
  117. padding: 10px 15px;
  118. border-block-end: #efefef solid 1px;
  119. &:hover {
  120. background-color: #ffffff;
  121. }
  122. }
  123. &.inline {
  124. margin: 2px 8px;
  125. float: $float-left;
  126. padding: 6px;
  127. a {
  128. display: block;
  129. padding: 0;
  130. margin: 0;
  131. border: 1px solid #c3bdbd;
  132. -webkit-border-radius: 50%;
  133. -moz-border-radius: 50%;
  134. border-radius: 50%;
  135. /* -webkit-box-shadow: 0 0 10px 0 #999;
  136. -moz-box-shadow: 0 0 10px 0 #999;
  137. box-shadow: 0 0 10px 0 #999; */
  138. span {
  139. display: block;
  140. height: 30px;
  141. width: 30px;
  142. -webkit-border-radius: 50%;
  143. -moz-border-radius: 50%;
  144. border-radius: 50%;
  145. }
  146. }
  147. }
  148. }
  149. }
  150. div.richText-dropdown {
  151. padding: 10px 15px;
  152. }
  153. }
  154. &:hover {
  155. background-color: #ffffff;
  156. }
  157. }
  158. &[data-disable="true"] {
  159. opacity: 0.1;
  160. a {
  161. cursor: default;
  162. }
  163. }
  164. &:not([data-disable="true"]).is-selected .richText-dropdown-outer {
  165. display: block;
  166. }
  167. }
  168. &:after {
  169. display: block;
  170. content: "";
  171. clear: both;
  172. }
  173. }
  174. &:last-child {
  175. font-size: 12px;
  176. }
  177. &:after {
  178. display: block;
  179. clear: both;
  180. content: "";
  181. }
  182. }
  183. .richText-editor {
  184. padding: 20px;
  185. background-color: #ffffff;
  186. border-inline-start: #ffffff solid 2px;
  187. font-family: Calibri, Verdana, Helvetica, sans-serif;
  188. height: 300px;
  189. outline: none;
  190. overflow-y: scroll;
  191. overflow-x: auto;
  192. ul,
  193. ol {
  194. margin: 10px 25px;
  195. }
  196. table {
  197. margin: 10px 0;
  198. border-spacing: 0;
  199. width: 100%;
  200. td,
  201. th {
  202. padding: 10px;
  203. border: #efefef solid 1px;
  204. }
  205. }
  206. &:focus {
  207. border-inline-start: transparent solid 2px;
  208. }
  209. }
  210. .richText-initial {
  211. margin-block-end: -4px;
  212. padding: 10px;
  213. background-color: #282828;
  214. border: none;
  215. color: #33ff33;
  216. font-family: Monospace, Calibri, Verdana, Helvetica, sans-serif;
  217. max-width: 100%;
  218. min-width: 100%;
  219. width: 100%;
  220. min-height: 400px;
  221. height: 400px;
  222. }
  223. .richText-help {
  224. float: $float-right;
  225. display: block;
  226. padding: 10px 15px;
  227. cursor: pointer;
  228. }
  229. .richText-undo,
  230. .richText-redo {
  231. float: $float-right;
  232. display: block;
  233. padding: 10px 15px;
  234. border-inline-end: #efefef solid 1px;
  235. cursor: pointer;
  236. }
  237. .richText-undo.is-disabled,
  238. .richText-redo.is-disabled {
  239. opacity: 0.4;
  240. }
  241. .richText-help-popup {
  242. a {
  243. color: #3498db;
  244. text-decoration: underline;
  245. }
  246. hr {
  247. margin: 10px auto 5px auto;
  248. border: none;
  249. border-block-start: #efefef solid 1px;
  250. }
  251. }
  252. .richText-list.list-rightclick {
  253. position: absolute;
  254. background-color: #fafafa;
  255. border-inline-end: #efefef solid 1px;
  256. border-block-end: #efefef solid 1px;
  257. li {
  258. padding: 5px 7px;
  259. cursor: pointer;
  260. list-style: none;
  261. }
  262. }
  263. }
  264. @media (max-width: 768px){
  265. .richText .richText-toolbar ul li {
  266. border-block-end: #eaedf1 solid 1px;
  267. }
  268. .richText .richText-toolbar ul{
  269. border-block-end: 0 !important;
  270. }
  271. }