@bagelink/vue 0.0.724 → 0.0.728

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.
package/dist/style.css CHANGED
@@ -1,78 +1,47 @@
1
1
  @import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200");@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@100;200;300;400;500;600;700;800;900&display=swap");
2
- .lightbox-overlay[data-v-c003c59a] {
3
- position: fixed;
4
- top: 0;
5
- left: 0;
6
- width: 100%;
7
- height: 100%;
2
+ .bgl-lightbox-overlay[data-v-b3a3d091] {
8
3
  background: rgba(0, 0, 0, 0.8);
9
- display: flex;
10
- justify-content: center;
11
- align-items: center;
12
- z-index: 1000;
13
4
  }
14
- .lightbox[data-v-c003c59a] {
15
- position: relative;
5
+ .bgl-lightbox[data-v-b3a3d091] {
16
6
  max-height: 90%;
17
- width: 90vw;
18
- text-align: center;
19
7
  }
20
- .close-button[data-v-c003c59a] {
21
- position: fixed;
22
- top: 1rem;
23
- inset-inline-end: 1rem;
8
+ .bgl-lightbox-item[data-v-b3a3d091]{
9
+ animation: 500ms ease bgl-lightbox-load-b3a3d091;
10
+ }
11
+ @keyframes bgl-lightbox-load-b3a3d091 {
12
+ from {
13
+ scale:0.7;
24
14
  }
25
- .lightbox-item[data-v-c003c59a] * {
15
+ to {
16
+ scale:1;
17
+ }
18
+ }
19
+ .bgl-lightbox-item[data-v-b3a3d091] * {
26
20
  max-width: 90%;
27
21
  max-height: calc(80vh - 90px);
28
22
  border-radius: 3px;
23
+ margin: auto;
24
+ animation: 200ms ease bgl-lightbox-load-b3a3d091;
29
25
  }
30
- .navigation[data-v-c003c59a] {
31
- display: flex;
32
- justify-content: space-between;
33
- width: 100%;
34
- position: absolute;
26
+ .navigation[data-v-b3a3d091] {
35
27
  top: 50%;
36
28
  transform: translateY(-50%);
37
29
  }
38
- .navigation-btn[data-v-c003c59a] {
39
- user-select: none;
30
+ .navigation-btn[data-v-b3a3d091] {
40
31
  width: var(--input-height);
41
32
  height: var(--input-height);
42
- border-radius: 100%;
43
33
  }
44
- .thumbnails[data-v-c003c59a] {
45
- display: flex;
46
- justify-content: center;
47
- margin-top: 10px;
48
- overflow: auto;
49
- padding: 1rem;
50
- position: fixed;
51
- bottom: 0;
52
- left: 0;
53
- right: 0;
54
- }
55
- .thumbnail[data-v-c003c59a] {
34
+ .thumbnail[data-v-b3a3d091] {
56
35
  height: 50px;
57
36
  width: 50px;
58
- object-fit: cover;
59
- margin: 0 5px;
60
- cursor: pointer;
61
- opacity: 0.5;
62
- border-radius: 3px;
63
- transition: all 200ms ease;
64
- background-color: white;
65
- display: flex;
66
- justify-content: center;
67
- align-items: center;
68
37
  }
69
- .thumbnail[data-v-c003c59a]:hover {
38
+ .thumbnail[data-v-b3a3d091]:hover {
70
39
  opacity: 1;
71
40
  }
72
- .thumbnail[data-v-c003c59a]:active {
41
+ .thumbnail[data-v-b3a3d091]:active {
73
42
  opacity: 0.8;
74
43
  }
75
- .thumbnail.active[data-v-c003c59a] {
44
+ .thumbnail.active[data-v-b3a3d091] {
76
45
  opacity: 1;
77
46
  outline: 2px solid white;
78
47
  }
@@ -500,6 +469,24 @@ a[data-v-895cf824] {
500
469
  height: fit-content;
501
470
  }
502
471
 
472
+ .is-active .modal {
473
+ animation: 200ms ease bgl-modal-animation;
474
+
475
+ }
476
+
477
+ @keyframes bgl-modal-animation {
478
+ from {
479
+ scale: 0.7;
480
+ transform: translateY(2rem);
481
+ }
482
+
483
+ to {
484
+ scale: 1;
485
+ transform: translateY(0);
486
+
487
+ }
488
+ }
489
+
503
490
  .small-modal .modal {
504
491
  max-width: 300px;
505
492
  text-align: center;
@@ -1144,14 +1131,15 @@ display: block;
1144
1131
  color: var(--bgl-red);
1145
1132
  }
1146
1133
 
1147
- .bgl_vid iframe[data-v-862e1f20],
1148
- .bgl_vid video[data-v-862e1f20] {
1134
+ .bgl_vid iframe[data-v-8495afe2],
1135
+ .bgl_vid video[data-v-8495afe2] {
1149
1136
  width: 100%;
1150
1137
  height: auto;
1151
1138
  display: block;
1139
+ margin: auto;
1152
1140
  border-radius: var(--input-border-radius);
1153
1141
  }
1154
- .bgl_vid.vid_empty[data-v-862e1f20] {
1142
+ .bgl_vid.vid_empty[data-v-8495afe2] {
1155
1143
  padding-top: 56.25%;
1156
1144
  background: var(--input-bg);
1157
1145
  border-radius: var(--input-border-radius);
@@ -1813,7 +1801,7 @@ display: block;
1813
1801
  color: var(--bgl-white);
1814
1802
  }
1815
1803
 
1816
- .fileUploadWrap[data-v-5911e10d] {
1804
+ .fileUploadWrap[data-v-d4a17ec6] {
1817
1805
  outline: 1px solid var(--border-color);
1818
1806
  border-radius: var(--input-border-radius);
1819
1807
  text-align: center;
@@ -1825,7 +1813,7 @@ display: block;
1825
1813
  background: var(--input-bg);
1826
1814
  height: 215px;
1827
1815
  }
1828
- .bagel-input .fileUploadWrap.fileDropZone[data-v-5911e10d] {
1816
+ .bagel-input .fileUploadWrap.fileDropZone[data-v-d4a17ec6] {
1829
1817
  background: var(--input-bg);
1830
1818
  display: flex;
1831
1819
  align-items: center;
@@ -1833,14 +1821,14 @@ display: block;
1833
1821
  color: var(--bgl-gray);
1834
1822
  flex-direction: column;
1835
1823
  }
1836
- .fileUploadWrap.dragover[data-v-5911e10d],
1837
- .fileUploadWrap[data-v-5911e10d]:hover {
1824
+ .fileUploadWrap.dragover[data-v-d4a17ec6],
1825
+ .fileUploadWrap[data-v-d4a17ec6]:hover {
1838
1826
  box-shadow: inset 0 0 10px #00000012;
1839
1827
  }
1840
- .fileUploadWrap[style*="height: auto;"][data-v-5911e10d] {
1828
+ .fileUploadWrap[style*="height: auto;"][data-v-d4a17ec6] {
1841
1829
  min-height: 215px;
1842
1830
  }
1843
- .multi-image-item-preview[data-v-5911e10d] {
1831
+ .multi-image-item-preview[data-v-d4a17ec6] {
1844
1832
  border: 1px solid var(--border-color) !important;
1845
1833
  border-radius: var(--input-border-radius);
1846
1834
  margin: 0.5rem !important;
@@ -1854,12 +1842,12 @@ display: block;
1854
1842
  gap: 1rem;
1855
1843
  align-items: center;
1856
1844
  }
1857
- .multi-image-item-preview p[data-v-5911e10d] {
1845
+ .multi-image-item-preview p[data-v-d4a17ec6] {
1858
1846
  overflow: hidden;
1859
1847
  text-overflow: ellipsis;
1860
1848
  white-space: nowrap;
1861
1849
  }
1862
- .multi-preview[data-v-5911e10d]{
1850
+ .multi-preview[data-v-d4a17ec6]{
1863
1851
  width: 40px;
1864
1852
  height: 40px;
1865
1853
  border-radius: var(--input-border-radius);
@@ -1870,17 +1858,17 @@ display: block;
1870
1858
  align-items: center;
1871
1859
  display: flex;
1872
1860
  }
1873
- .bgl-single-preview[data-v-5911e10d]{
1861
+ .bgl-single-preview[data-v-d4a17ec6]{
1874
1862
  height: 100%;
1875
1863
  position: relative;
1876
1864
  }
1877
- .bgl-single-preview + .fileUploadPlaceHolder[data-v-5911e10d]{
1865
+ .bgl-single-preview + .fileUploadPlaceHolder[data-v-d4a17ec6]{
1878
1866
  position: absolute;
1879
1867
  inset: 0;
1880
1868
  margin: auto;
1881
1869
  top: calc(50% - 2rem);
1882
1870
  }
1883
- .single-image-item-preview[data-v-5911e10d] {
1871
+ .single-image-item-preview[data-v-d4a17ec6] {
1884
1872
  height: 100%;
1885
1873
  min-height: 100%;
1886
1874
  position: relative;
@@ -1888,13 +1876,13 @@ display: block;
1888
1876
  align-items: center;
1889
1877
  justify-content: center;
1890
1878
  }
1891
- .fileUploadWrap[style*="height: auto"] .single-image-item-preview[data-v-5911e10d] {
1879
+ .fileUploadWrap[style*="height: auto"] .single-image-item-preview[data-v-d4a17ec6] {
1892
1880
  min-height: 215px;
1893
1881
  }
1894
- .fileUploadWrap[style*="height: auto"] .single-preview[data-v-5911e10d] {
1882
+ .fileUploadWrap[style*="height: auto"] .single-preview[data-v-d4a17ec6] {
1895
1883
  margin: 0rem !important;
1896
1884
  }
1897
- .single-preview[data-v-5911e10d]{
1885
+ .single-preview[data-v-d4a17ec6]{
1898
1886
  border-radius: var(--input-border-radius);
1899
1887
  margin: 1rem;
1900
1888
  padding: 0px;
@@ -1904,17 +1892,17 @@ display: block;
1904
1892
  background: var(--bgl-gray-light);
1905
1893
  box-shadow: 0 0 10px #00000012;
1906
1894
  }
1907
- .bgl_fill-image.single-image-item-preview[data-v-5911e10d] {
1895
+ .bgl_fill-image.single-image-item-preview[data-v-d4a17ec6] {
1908
1896
  height: 100%;
1909
1897
  }
1910
- .bgl_fill-image.single-image-item-preview .single-preview[data-v-5911e10d]{
1898
+ .bgl_fill-image.single-image-item-preview .single-preview[data-v-d4a17ec6]{
1911
1899
  border-radius: unset;
1912
1900
  object-fit: cover;
1913
1901
  box-shadow: unset;
1914
1902
  width: 100%;
1915
1903
  height: auto;
1916
1904
  }
1917
- .single-image-item-preview .pie[data-v-5911e10d] {
1905
+ .single-image-item-preview .pie[data-v-d4a17ec6] {
1918
1906
  transform-origin: top;
1919
1907
  transform: scale(1.4);
1920
1908
  position: absolute;
@@ -1928,31 +1916,31 @@ display: block;
1928
1916
  border: none !important;
1929
1917
  padding: 0 !important;
1930
1918
  }
1931
- .bgl_oval-upload[data-v-5911e10d] {
1919
+ .bgl_oval-upload[data-v-d4a17ec6] {
1932
1920
  border-radius: 100% !important;
1933
1921
  overflow: hidden;
1934
1922
  }
1935
- .bgl_oval-upload p[data-v-5911e10d] {
1923
+ .bgl_oval-upload p[data-v-d4a17ec6] {
1936
1924
  padding: 0.75rem !important;
1937
1925
  font-size: 12px
1938
1926
  }
1939
- .bgl_oval-upload .fileUploadPlaceHolder[data-v-5911e10d]{
1927
+ .bgl_oval-upload .fileUploadPlaceHolder[data-v-d4a17ec6]{
1940
1928
  top: 0;
1941
1929
  }
1942
- .bgl_oval-upload .pie[data-v-5911e10d] {
1930
+ .bgl_oval-upload .pie[data-v-d4a17ec6] {
1943
1931
  transform: scale(1);
1944
1932
  }
1945
- .bgl_oval-upload span.bgl_icon-font.color-primary[data-v-5911e10d] {
1933
+ .bgl_oval-upload span.bgl_icon-font.color-primary[data-v-d4a17ec6] {
1946
1934
  transform: scale(0.4) !important;
1947
1935
  }
1948
- .bgl_oval-upload .single-image-item-preview[data-v-5911e10d]{
1936
+ .bgl_oval-upload .single-image-item-preview[data-v-d4a17ec6]{
1949
1937
  height: 100%;
1950
1938
  }
1951
- .bgl_oval-upload .single-preview[data-v-5911e10d] {
1939
+ .bgl_oval-upload .single-preview[data-v-d4a17ec6] {
1952
1940
  margin: 0;
1953
1941
  height: 100% !important;
1954
1942
  }
1955
- .pie[data-v-5911e10d] {
1943
+ .pie[data-v-d4a17ec6] {
1956
1944
  width: 30px;
1957
1945
  height: 30px;
1958
1946
  position: relative;
@@ -1960,7 +1948,7 @@ display: block;
1960
1948
  align-items: center;
1961
1949
  justify-content: center;
1962
1950
  }
1963
- .pie[data-v-5911e10d]:before {
1951
+ .pie[data-v-d4a17ec6]:before {
1964
1952
  content: '';
1965
1953
  position: absolute;
1966
1954
  border-radius: 50%;
@@ -1978,26 +1966,26 @@ display: block;
1978
1966
  #000 calc(100% - var(--b))
1979
1967
  );
1980
1968
  }
1981
- .pie .success[data-v-5911e10d] {
1969
+ .pie .success[data-v-d4a17ec6] {
1982
1970
  transform: scale(0);
1983
1971
  opacity: 0;
1984
1972
  transition: all 0.3s ease-in-out;
1985
1973
  }
1986
- .pie .progress[data-v-5911e10d] {
1974
+ .pie .progress[data-v-d4a17ec6] {
1987
1975
  position: absolute;
1988
1976
  font-size: 10px;
1989
1977
  }
1990
- .pie.complete .progress[data-v-5911e10d] {
1978
+ .pie.complete .progress[data-v-d4a17ec6] {
1991
1979
  display: none;
1992
1980
  }
1993
- .pie.complete .success[data-v-5911e10d] {
1981
+ .pie.complete .success[data-v-d4a17ec6] {
1994
1982
  transform: scale(1.3);
1995
1983
  opacity: 1;
1996
1984
  }
1997
- .pie.complete[data-v-5911e10d]:before {
1985
+ .pie.complete[data-v-d4a17ec6]:before {
1998
1986
  background: conic-gradient(var(--bgl-green) calc(var(--p) * 1%), #0000 0);
1999
1987
  }
2000
- .pie.complete[data-v-5911e10d] {
1988
+ .pie.complete[data-v-d4a17ec6] {
2001
1989
  color: var(--bgl-green);
2002
1990
  }
2003
1991
 
@@ -2301,23 +2289,48 @@ p {
2301
2289
  8 #818181 /* few chars */
2302
2290
  ;
2303
2291
  }
2304
- .preview-area[data-v-ee96aa53]{
2292
+ .preview-area[data-v-c9729efd]{
2305
2293
  font-family: "FontWithASyntaxHighlighter", monospace;
2306
2294
  font-palette: --myCustomPalette;
2307
2295
  }
2308
- .rich-text-editor[data-v-ee96aa53] {
2296
+ .rich-text-editor[data-v-c9729efd] {
2309
2297
  background: var(--input-bg);
2310
2298
  margin-bottom: 0.5rem;
2311
2299
  width: 100%;
2312
2300
  }
2313
- .editableContent[data-v-ee96aa53]{
2301
+ .editableContent[data-v-c9729efd]{
2314
2302
  min-height: 100%;
2315
2303
  white-space: pre-wrap;
2316
2304
  outline: none;
2317
2305
  }
2318
- .content-area[data-v-ee96aa53], .preview-area[data-v-ee96aa53]{
2306
+ .content-area[data-v-c9729efd], .preview-area[data-v-c9729efd]{
2319
2307
  min-height: 200px;
2320
2308
  }
2309
+ .fullscreen-mode[data-v-c9729efd] {
2310
+ position: fixed;
2311
+ top: 0;
2312
+ left: 0;
2313
+ width: 100%;
2314
+ height: 100%;
2315
+ z-index: 9999;
2316
+ background: var(--input-bg);
2317
+ padding: 2rem;
2318
+ overflow: auto;
2319
+ border-radius: 0;
2320
+ }
2321
+ .fullscreen-mode .content-area[data-v-c9729efd]{
2322
+ height: calc(100vh - 5rem);
2323
+ padding: 4rem !important;
2324
+ max-width: 900px;
2325
+ margin-inline: auto ;
2326
+ overflow-y: auto;
2327
+ }
2328
+ .fullscreen-mode .toolbar[data-v-c9729efd]{
2329
+ max-width: 900px;
2330
+ margin-inline: auto ;
2331
+ /* border-bottom: 1px solid var(--border-color); */
2332
+ /* margin-bottom: 2rem; */
2333
+ }
2321
2334
 
2322
2335
  /* [contenteditable='true'] {
2323
2336
  white-space: pre-wrap;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.724",
4
+ "version": "0.0.728",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -26,7 +26,10 @@ const videoUrl = $computed(() => {
26
26
  if (embedType) {
27
27
  if (embedType === 'YouTube') {
28
28
  const videoId = props.src?.split(/v=|youtu\.be\//)[1]?.split('&')?.[0]
29
- return `https://www.youtube.com/embed/${videoId}`
29
+ const queryParams = new URLSearchParams({
30
+ autoplay: props.autoplay ? '1' : '0'
31
+ })
32
+ return `https://www.youtube.com/embed/${videoId}?${queryParams}`
30
33
  }
31
34
  if (embedType === 'Vimeo') {
32
35
  const vimeoRegex
@@ -38,8 +41,6 @@ const videoUrl = $computed(() => {
38
41
  }
39
42
  return props.src
40
43
  })
41
-
42
- console.log('Video URL:', videoUrl)
43
44
  </script>
44
45
 
45
46
  <template>
@@ -51,6 +52,7 @@ console.log('Video URL:', videoUrl)
51
52
  frameborder="0"
52
53
  allowfullscreen
53
54
  title="Video"
55
+ allow="autoplay"
54
56
  />
55
57
  <video
56
58
  v-else-if="src"
@@ -71,6 +73,7 @@ console.log('Video URL:', videoUrl)
71
73
  width: 100%;
72
74
  height: auto;
73
75
  display: block;
76
+ margin: auto;
74
77
  border-radius: var(--input-border-radius);
75
78
  }
76
79
 
@@ -196,7 +196,7 @@ function drop(e: DragEvent) {
196
196
  :key="file.id"
197
197
  class="multi-image-item-preview"
198
198
  >
199
- <img v-if="isImage(file.extension || file.url)" class="multi-preview" :src="file.url" alt="">
199
+ <img v-if="isImage(file.extension || file.url)" v-lightbox class="multi-preview" :src="file.url" alt="">
200
200
  <Icon v-else icon="draft" class="multi-preview" />
201
201
  <p class="m-0">
202
202
  {{ file.name }}
@@ -250,7 +250,7 @@ function drop(e: DragEvent) {
250
250
  class="single-image-item-preview"
251
251
  :class="{ 'bgl_fill-image': fill }"
252
252
  >
253
- <img v-if="isImage(file.extension || file.url)" class="single-preview" :src="file.url" alt="">
253
+ <img v-if="isImage(file.extension || file.url)" v-lightbox class="single-preview" :src="file.url" alt="">
254
254
  <Icon v-else :size="4" weight="2" icon="draft" class="color-primary w-100" />
255
255
  </div>
256
256
 
@@ -6,45 +6,46 @@ import type { ToolbarConfig, ToolbarConfigOption } from './richtext-types'
6
6
  defineProps<{ config: ToolbarConfig }>()
7
7
  const emit = defineEmits(['action'])
8
8
 
9
- const colorPicker = $ref<HTMLInputElement | null>(null)
10
- const fontSizeInput = $ref<HTMLInputElement | null>(null)
9
+ // const colorPicker = $ref<HTMLInputElement | null>(null)
10
+ // const fontSizeInput = $ref<HTMLInputElement | null>(null)
11
11
 
12
12
  interface toolbarOption {
13
13
  name: ToolbarConfigOption | 'separator'
14
- icon: MaterialIcons
14
+ label?: string
15
+ icon?: MaterialIcons
16
+ class?: string
15
17
  }
16
-
17
18
  const toolbarOptions: toolbarOption[] = [
18
19
  { name: 'separator' },
19
- { name: 'bold', icon: 'format_bold' },
20
- { name: 'italic', icon: 'format_italic' },
21
- { name: 'underline', icon: 'format_underlined' },
20
+ { name: 'bold', label: 'Bold', icon: 'format_bold' },
21
+ { name: 'italic', label: 'Italic', icon: 'format_italic' },
22
+ { name: 'underline', label: 'Underline', icon: 'format_underlined' },
22
23
  { name: 'separator' },
23
- { name: 'orderedList', icon: 'format_list_numbered' },
24
- { name: 'unorderedList', icon: 'format_list_bulleted' },
24
+ { name: 'orderedList', label: 'Ordered List', icon: 'format_list_numbered' },
25
+ { name: 'unorderedList', label: 'Unordered List', icon: 'format_list_bulleted' },
25
26
  { name: 'separator' },
26
- { name: 'link', icon: 'add_link' },
27
- { name: 'image', icon: 'add_photo_alternate' },
28
- { name: 'youtube', icon: 'youtube_activity' },
27
+ { name: 'link', label: 'Link', icon: 'add_link' },
28
+ { name: 'image', label: 'Image', icon: 'add_photo_alternate' },
29
+ { name: 'youtube', label: 'YouTube', icon: 'youtube_activity' },
29
30
  { name: 'separator' },
30
- { name: 'splitView', icon: 'code' },
31
- { name: 'clear', icon: 'format_clear' },
32
-
31
+ { name: 'splitView', label: 'Split View', icon: 'code' },
32
+ { name: 'clear', label: 'Clear Formatting', icon: 'format_clear' },
33
+ { name: 'fullScreen', label: 'Full Screen', icon: 'fullscreen', class: 'ms-auto' },
33
34
  ]
34
35
 
35
- function handleColorPick(type: 'textColor' | 'backgroundColor') {
36
- const color = colorPicker?.value
37
- if (color) {
38
- emit('action', type, color)
39
- }
40
- }
36
+ // function handleColorPick(type: 'textColor' | 'backgroundColor') {
37
+ // const color = colorPicker?.value
38
+ // if (color) {
39
+ // emit('action', type, color)
40
+ // }
41
+ // }
41
42
 
42
- function handleFontSizeChange() {
43
- const size = fontSizeInput?.value
44
- if (size) {
45
- emit('action', 'fontSize', size)
46
- }
47
- }
43
+ // function handleFontSizeChange() {
44
+ // const size = fontSizeInput?.value
45
+ // if (size) {
46
+ // emit('action', 'fontSize', size)
47
+ // }
48
+ // }
48
49
  function handleSelectChange(selectedOption: string) {
49
50
  emit('action', 'formatBlock', selectedOption)
50
51
  }
@@ -62,9 +63,10 @@ function handleSelectChange(selectedOption: string) {
62
63
  <Btn
63
64
  v-if="action.name !== 'separator' && config.includes(action.name)"
64
65
  :key="action.name"
65
- v-tooltip="action.name"
66
+ v-tooltip="action.label"
66
67
  thin
67
68
  flat
69
+ :class="action.class"
68
70
  class="rounded"
69
71
  :aria-label="action.name"
70
72
  :icon="action.icon"
@@ -33,6 +33,7 @@ const defaultConfig: ToolbarConfig = [
33
33
  'youtube',
34
34
  'codeView',
35
35
  'clear',
36
+ 'fullScreen'
36
37
  ]
37
38
  const config = $ref<ToolbarConfig>(props.toolbarConfig || defaultConfig)
38
39
  let contentHtml = $ref(props.modelValue)
@@ -69,6 +70,9 @@ function handleToolbarAction(action: string, value?: string) {
69
70
  case 'codeView':
70
71
  isCodeView = !isCodeView
71
72
  break
73
+ case 'fullScreen':
74
+ toggleFullScreen()
75
+ break
72
76
  default:
73
77
  applyFormatting(action, value)
74
78
  break
@@ -76,6 +80,13 @@ function handleToolbarAction(action: string, value?: string) {
76
80
  updateContent()
77
81
  }
78
82
 
83
+ function toggleFullScreen() {
84
+ const editor = document.querySelector('.rich-text-editor')
85
+ if (editor) {
86
+ editor.classList.toggle('fullscreen-mode')
87
+ }
88
+ }
89
+
79
90
  watch(() => props.modelValue, (newValue) => {
80
91
  if (newValue !== contentHtml) {
81
92
  contentHtml = newValue
@@ -125,8 +136,8 @@ function handleKeyDown(event: KeyboardEvent) {
125
136
  <template>
126
137
  <div class="rich-text-editor round pt-05 px-1 pb-1">
127
138
  <Toolbar :config @action="handleToolbarAction" />
128
- <div class="editor-container flex flex-stretch" :class="{ 'split-view': isSplitView }">
129
- <div class="content-area rounded p-1 bg-white shadow-light w-100 grid" :class="{ 'code-view': isCodeView }">
139
+ <div class="editor-container flex flex-stretch gap-1 m_column">
140
+ <div class="content-area rounded p-1 bg-white shadow-light w-100 grid">
130
141
  <textarea v-if="isCodeView" v-model="contentHtml" @input="updateContent" />
131
142
  <div
132
143
  v-else
@@ -186,6 +197,31 @@ function handleKeyDown(event: KeyboardEvent) {
186
197
  .content-area, .preview-area{
187
198
  min-height: 200px;
188
199
  }
200
+ .fullscreen-mode {
201
+ position: fixed;
202
+ top: 0;
203
+ left: 0;
204
+ width: 100%;
205
+ height: 100%;
206
+ z-index: 9999;
207
+ background: var(--input-bg);
208
+ padding: 2rem;
209
+ overflow: auto;
210
+ border-radius: 0;
211
+ }
212
+ .fullscreen-mode .content-area{
213
+ height: calc(100vh - 5rem);
214
+ padding: 4rem !important;
215
+ max-width: 900px;
216
+ margin-inline: auto ;
217
+ overflow-y: auto;
218
+ }
219
+ .fullscreen-mode .toolbar{
220
+ max-width: 900px;
221
+ margin-inline: auto ;
222
+ /* border-bottom: 1px solid var(--border-color); */
223
+ /* margin-bottom: 2rem; */
224
+ }
189
225
 
190
226
  /* [contenteditable='true'] {
191
227
  white-space: pre-wrap;
@@ -21,5 +21,8 @@ export type ToolbarConfigOption = 'bold'
21
21
  | 'codeBlock'
22
22
  | 'splitView'
23
23
  | 'codeView'
24
+ | 'youtube'
25
+ | 'clear'
26
+ | 'fullScreen'
24
27
 
25
28
  export type ToolbarConfig = ToolbarConfigOption[]