kempo-ui 0.3.8 → 0.3.10

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 (248) hide show
  1. package/dist/components/CodeEditor.js +96 -0
  2. package/dist/components/HtmlEditor.js +155 -30
  3. package/dist/components/codeEditorControls/CodeEditorControl.js +17 -0
  4. package/dist/components/codeEditorControls/ControlGroup.js +12 -0
  5. package/dist/components/codeEditorControls/ControlSpacer.js +6 -0
  6. package/dist/components/codeEditorControls/CopyCode.js +9 -0
  7. package/dist/components/codeEditorControls/EditorTheme.js +26 -0
  8. package/dist/components/codeEditorControls/FindReplace.js +7 -0
  9. package/dist/components/codeEditorControls/FoldAll.js +7 -0
  10. package/dist/components/codeEditorControls/FontSize.js +13 -0
  11. package/dist/components/codeEditorControls/FormatCode.js +9 -0
  12. package/dist/components/codeEditorControls/Fullscreen.js +12 -0
  13. package/dist/components/codeEditorControls/LanguageSelect.js +15 -0
  14. package/dist/components/codeEditorControls/Minimap.js +8 -0
  15. package/dist/components/codeEditorControls/Redo.js +7 -0
  16. package/dist/components/codeEditorControls/Undo.js +7 -0
  17. package/dist/components/codeEditorControls/WordWrap.js +8 -0
  18. package/dist/components/htmlEditorControls/AlignCenter.js +4 -4
  19. package/dist/components/htmlEditorControls/AlignJustify.js +4 -4
  20. package/dist/components/htmlEditorControls/AlignLeft.js +4 -4
  21. package/dist/components/htmlEditorControls/AlignRight.js +4 -4
  22. package/dist/components/htmlEditorControls/Bold.js +4 -4
  23. package/dist/components/htmlEditorControls/BulletList.js +4 -4
  24. package/dist/components/htmlEditorControls/ClearFormatting.js +4 -4
  25. package/dist/components/htmlEditorControls/CodeBlock.js +2 -2
  26. package/dist/components/htmlEditorControls/ControlGroup.js +2 -4
  27. package/dist/components/htmlEditorControls/CreateLink.js +3 -3
  28. package/dist/components/htmlEditorControls/FormatBlock.js +4 -4
  29. package/dist/components/htmlEditorControls/FormatCode.js +1 -0
  30. package/dist/components/htmlEditorControls/HtmlEditorControl.js +2 -2
  31. package/dist/components/htmlEditorControls/InlineCode.js +2 -2
  32. package/dist/components/htmlEditorControls/InsertTable.js +3 -3
  33. package/dist/components/htmlEditorControls/Italic.js +4 -4
  34. package/dist/components/htmlEditorControls/Mode.js +3 -3
  35. package/dist/components/htmlEditorControls/NumberList.js +4 -4
  36. package/dist/components/htmlEditorControls/Strikethrough.js +4 -4
  37. package/dist/components/htmlEditorControls/TextBackgroundColor.js +1 -1
  38. package/dist/components/htmlEditorControls/TextColor.js +1 -1
  39. package/dist/components/htmlEditorControls/Underline.js +4 -4
  40. package/docs/components/accordion.html +2 -0
  41. package/docs/components/aside.html +2 -0
  42. package/docs/components/card.html +2 -0
  43. package/docs/components/code-editor.html +491 -0
  44. package/docs/components/color-picker.html +2 -0
  45. package/docs/components/content-slider.html +2 -0
  46. package/docs/components/context.html +2 -0
  47. package/docs/components/dialog.html +2 -0
  48. package/docs/components/dropdown.html +2 -0
  49. package/docs/components/filter-list.html +2 -0
  50. package/docs/components/focus-capture.html +2 -0
  51. package/docs/components/html-editor.html +525 -212
  52. package/docs/components/hybrid-component.html +2 -0
  53. package/docs/components/icon.html +2 -0
  54. package/docs/components/import.html +2 -0
  55. package/docs/components/light-component.html +2 -0
  56. package/docs/components/nav-spacer.html +2 -0
  57. package/docs/components/nav.html +2 -0
  58. package/docs/components/photo-viewer.html +2 -0
  59. package/docs/components/resize.html +2 -0
  60. package/docs/components/shadow-component.html +2 -0
  61. package/docs/components/show-more.html +2 -0
  62. package/docs/components/sortable.html +2 -0
  63. package/docs/components/spinner.html +2 -0
  64. package/docs/components/split.html +2 -0
  65. package/docs/components/table.html +2 -0
  66. package/docs/components/tableControls.html +2 -0
  67. package/docs/components/tableCustomFields.html +2 -0
  68. package/docs/components/tableFetchRecords.html +2 -0
  69. package/docs/components/tableFieldSortHide.html +2 -0
  70. package/docs/components/tablePagination.html +2 -0
  71. package/docs/components/tablePlaceholder.html +2 -0
  72. package/docs/components/tableRecordEditing.html +2 -0
  73. package/docs/components/tableRecordFiltering.html +2 -0
  74. package/docs/components/tableRecordHiding.html +2 -0
  75. package/docs/components/tableRecordSearching.html +2 -0
  76. package/docs/components/tableRecordSelection.html +2 -0
  77. package/docs/components/tableRowControls.html +2 -0
  78. package/docs/components/tableServerSync.html +2 -0
  79. package/docs/components/tableSorting.html +2 -0
  80. package/docs/components/tabs.html +2 -0
  81. package/docs/components/tags.html +2 -0
  82. package/docs/components/theme-select.html +2 -0
  83. package/docs/components/theme-switcher.html +2 -0
  84. package/docs/components/timestamp.html +2 -0
  85. package/docs/components/toast.html +2 -0
  86. package/docs/components/toggle.html +2 -0
  87. package/docs/components/tree.html +2 -0
  88. package/docs/icons/auto_fix_high.svg +1 -0
  89. package/docs/icons/content_copy.svg +1 -0
  90. package/docs/icons/contrast.svg +1 -0
  91. package/docs/icons/frame_source.svg +1 -0
  92. package/docs/icons/fullscreen.svg +1 -0
  93. package/docs/icons/fullscreen_exit.svg +1 -0
  94. package/docs/icons/map.svg +1 -0
  95. package/docs/icons/redo.svg +1 -0
  96. package/docs/icons/text_decrease.svg +1 -0
  97. package/docs/icons/text_increase.svg +1 -0
  98. package/docs/icons/undo.svg +1 -0
  99. package/docs/icons/unfold_less.svg +1 -0
  100. package/docs/icons/unfold_more.svg +1 -0
  101. package/docs/icons/wrap_text.svg +1 -0
  102. package/docs/index.html +8 -0
  103. package/docs/src/components/CodeEditor.js +96 -0
  104. package/docs/src/components/HtmlEditor.js +155 -30
  105. package/docs/src/components/codeEditorControls/CodeEditorControl.js +17 -0
  106. package/docs/src/components/codeEditorControls/ControlGroup.js +12 -0
  107. package/docs/src/components/codeEditorControls/ControlSpacer.js +6 -0
  108. package/docs/src/components/codeEditorControls/CopyCode.js +9 -0
  109. package/docs/src/components/codeEditorControls/EditorTheme.js +26 -0
  110. package/docs/src/components/codeEditorControls/FindReplace.js +7 -0
  111. package/docs/src/components/codeEditorControls/FoldAll.js +7 -0
  112. package/docs/src/components/codeEditorControls/FontSize.js +13 -0
  113. package/docs/src/components/codeEditorControls/FormatCode.js +9 -0
  114. package/docs/src/components/codeEditorControls/Fullscreen.js +12 -0
  115. package/docs/src/components/codeEditorControls/LanguageSelect.js +15 -0
  116. package/docs/src/components/codeEditorControls/Minimap.js +8 -0
  117. package/docs/src/components/codeEditorControls/Redo.js +7 -0
  118. package/docs/src/components/codeEditorControls/Undo.js +7 -0
  119. package/docs/src/components/codeEditorControls/WordWrap.js +8 -0
  120. package/docs/src/components/htmlEditorControls/AlignCenter.js +4 -4
  121. package/docs/src/components/htmlEditorControls/AlignJustify.js +4 -4
  122. package/docs/src/components/htmlEditorControls/AlignLeft.js +4 -4
  123. package/docs/src/components/htmlEditorControls/AlignRight.js +4 -4
  124. package/docs/src/components/htmlEditorControls/Bold.js +4 -4
  125. package/docs/src/components/htmlEditorControls/BulletList.js +4 -4
  126. package/docs/src/components/htmlEditorControls/ClearFormatting.js +4 -4
  127. package/docs/src/components/htmlEditorControls/CodeBlock.js +2 -2
  128. package/docs/src/components/htmlEditorControls/ControlGroup.js +2 -4
  129. package/docs/src/components/htmlEditorControls/CreateLink.js +3 -3
  130. package/docs/src/components/htmlEditorControls/FormatBlock.js +4 -4
  131. package/docs/src/components/htmlEditorControls/FormatCode.js +1 -0
  132. package/docs/src/components/htmlEditorControls/HtmlEditorControl.js +2 -2
  133. package/docs/src/components/htmlEditorControls/InlineCode.js +2 -2
  134. package/docs/src/components/htmlEditorControls/InsertTable.js +3 -3
  135. package/docs/src/components/htmlEditorControls/Italic.js +4 -4
  136. package/docs/src/components/htmlEditorControls/Mode.js +3 -3
  137. package/docs/src/components/htmlEditorControls/NumberList.js +4 -4
  138. package/docs/src/components/htmlEditorControls/Strikethrough.js +4 -4
  139. package/docs/src/components/htmlEditorControls/TextBackgroundColor.js +1 -1
  140. package/docs/src/components/htmlEditorControls/TextColor.js +1 -1
  141. package/docs/src/components/htmlEditorControls/Underline.js +4 -4
  142. package/docs/utils/context.html +2 -0
  143. package/docs/utils/cookie.html +2 -0
  144. package/docs/utils/debounce.html +2 -0
  145. package/docs/utils/drag.html +2 -0
  146. package/docs/utils/elevation.html +2 -0
  147. package/docs/utils/formatTimestamp.html +2 -0
  148. package/docs/utils/object.html +2 -0
  149. package/docs/utils/propConverters.html +2 -0
  150. package/docs/utils/string.html +2 -0
  151. package/docs/utils/theme.html +2 -0
  152. package/docs/utils/toTitleCase.html +2 -0
  153. package/docs/utils/type.html +2 -0
  154. package/docs/utils/wait.html +2 -0
  155. package/docs-src/components/code-editor.page.html +235 -0
  156. package/docs-src/components/html-editor.page.html +528 -214
  157. package/docs-src/index.page.html +6 -0
  158. package/docs-src/nav.fragment.html +2 -0
  159. package/icons/auto_fix_high.svg +1 -0
  160. package/icons/content_copy.svg +1 -0
  161. package/icons/contrast.svg +1 -0
  162. package/icons/frame_source.svg +1 -0
  163. package/icons/fullscreen.svg +1 -0
  164. package/icons/fullscreen_exit.svg +1 -0
  165. package/icons/map.svg +1 -0
  166. package/icons/redo.svg +1 -0
  167. package/icons/text_decrease.svg +1 -0
  168. package/icons/text_increase.svg +1 -0
  169. package/icons/undo.svg +1 -0
  170. package/icons/unfold_less.svg +1 -0
  171. package/icons/unfold_more.svg +1 -0
  172. package/icons/wrap_text.svg +1 -0
  173. package/llm.txt +2 -1
  174. package/package.json +3 -3
  175. package/src/components/CodeEditor.js +495 -0
  176. package/src/components/HtmlEditor.js +527 -152
  177. package/src/components/codeEditorControls/CodeEditorControl.js +134 -0
  178. package/src/components/codeEditorControls/ControlGroup.js +70 -0
  179. package/src/components/codeEditorControls/ControlSpacer.js +23 -0
  180. package/src/components/codeEditorControls/CopyCode.js +37 -0
  181. package/src/components/codeEditorControls/EditorTheme.js +81 -0
  182. package/src/components/codeEditorControls/FindReplace.js +35 -0
  183. package/src/components/codeEditorControls/FoldAll.js +49 -0
  184. package/src/components/codeEditorControls/FontSize.js +45 -0
  185. package/src/components/codeEditorControls/FormatCode.js +37 -0
  186. package/src/components/codeEditorControls/Fullscreen.js +72 -0
  187. package/src/components/codeEditorControls/LanguageSelect.js +74 -0
  188. package/src/components/codeEditorControls/Minimap.js +60 -0
  189. package/src/components/codeEditorControls/Redo.js +35 -0
  190. package/src/components/codeEditorControls/Undo.js +35 -0
  191. package/src/components/codeEditorControls/WordWrap.js +60 -0
  192. package/src/components/htmlEditorControls/AlignCenter.js +2 -4
  193. package/src/components/htmlEditorControls/AlignJustify.js +2 -4
  194. package/src/components/htmlEditorControls/AlignLeft.js +2 -4
  195. package/src/components/htmlEditorControls/AlignRight.js +2 -4
  196. package/src/components/htmlEditorControls/Bold.js +2 -4
  197. package/src/components/htmlEditorControls/BulletList.js +2 -4
  198. package/src/components/htmlEditorControls/ClearFormatting.js +2 -4
  199. package/src/components/htmlEditorControls/CodeBlock.js +3 -19
  200. package/src/components/htmlEditorControls/ControlGroup.js +16 -41
  201. package/src/components/htmlEditorControls/CreateLink.js +3 -5
  202. package/src/components/htmlEditorControls/FormatBlock.js +2 -4
  203. package/src/components/htmlEditorControls/FormatCode.js +7 -0
  204. package/src/components/htmlEditorControls/HtmlEditorControl.js +43 -5
  205. package/src/components/htmlEditorControls/InlineCode.js +3 -5
  206. package/src/components/htmlEditorControls/InsertTable.js +9 -53
  207. package/src/components/htmlEditorControls/Italic.js +2 -4
  208. package/src/components/htmlEditorControls/Mode.js +2 -0
  209. package/src/components/htmlEditorControls/NumberList.js +2 -4
  210. package/src/components/htmlEditorControls/Strikethrough.js +2 -4
  211. package/src/components/htmlEditorControls/TextBackgroundColor.js +0 -6
  212. package/src/components/htmlEditorControls/TextColor.js +0 -6
  213. package/src/components/htmlEditorControls/Underline.js +2 -4
  214. package/tests/components/CodeEditor.browser-test.js +297 -0
  215. package/tests/components/HtmlEditor.browser-test.js +207 -0
  216. package/tests/components/codeEditorControls/CopyCode.browser-test.js +57 -0
  217. package/tests/components/codeEditorControls/EditorTheme.browser-test.js +70 -0
  218. package/tests/components/codeEditorControls/FindReplace.browser-test.js +57 -0
  219. package/tests/components/codeEditorControls/FoldAll.browser-test.js +92 -0
  220. package/tests/components/codeEditorControls/FontSize.browser-test.js +74 -0
  221. package/tests/components/codeEditorControls/Fullscreen.browser-test.js +152 -0
  222. package/tests/components/codeEditorControls/LanguageSelect.browser-test.js +82 -0
  223. package/tests/components/codeEditorControls/Minimap.browser-test.js +84 -0
  224. package/tests/components/codeEditorControls/ModeVisibility.browser-test.js +82 -0
  225. package/tests/components/codeEditorControls/UndoRedo.browser-test.js +85 -0
  226. package/tests/components/codeEditorControls/WordWrap.browser-test.js +95 -0
  227. package/tests/components/htmlEditorControls/Align.browser-test.js +203 -0
  228. package/tests/components/htmlEditorControls/Bold.browser-test.js +127 -0
  229. package/tests/components/htmlEditorControls/BulletList.browser-test.js +127 -0
  230. package/tests/components/htmlEditorControls/CharacterCount.browser-test.js +106 -0
  231. package/tests/components/htmlEditorControls/ClearFormatting.browser-test.js +127 -0
  232. package/tests/components/htmlEditorControls/CodeBlock.browser-test.js +143 -0
  233. package/tests/components/htmlEditorControls/ControlGroup.browser-test.js +116 -0
  234. package/tests/components/htmlEditorControls/ControlSpacer.browser-test.js +69 -0
  235. package/tests/components/htmlEditorControls/CreateLink.browser-test.js +129 -0
  236. package/tests/components/htmlEditorControls/DropdownControl.browser-test.js +138 -0
  237. package/tests/components/htmlEditorControls/FormatBlock.browser-test.js +163 -0
  238. package/tests/components/htmlEditorControls/FormatCode.browser-test.js +155 -0
  239. package/tests/components/htmlEditorControls/InlineCode.browser-test.js +127 -0
  240. package/tests/components/htmlEditorControls/InsertTable.browser-test.js +129 -0
  241. package/tests/components/htmlEditorControls/Italic.browser-test.js +127 -0
  242. package/tests/components/htmlEditorControls/Mode.browser-test.js +138 -0
  243. package/tests/components/htmlEditorControls/NumberList.browser-test.js +127 -0
  244. package/tests/components/htmlEditorControls/Strikethrough.browser-test.js +127 -0
  245. package/tests/components/htmlEditorControls/TextBackgroundColor.browser-test.js +136 -0
  246. package/tests/components/htmlEditorControls/TextColor.browser-test.js +136 -0
  247. package/tests/components/htmlEditorControls/Underline.browser-test.js +127 -0
  248. package/tests/components/htmlEditorControls/WordCount.browser-test.js +106 -0
@@ -0,0 +1,491 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>CodeEditor - Components - Kempo Docs - A Web Components Solution</title>
7
+ <link rel="icon" type="image/png" sizes="48x48" href="../media/icon48.png">
8
+ <link rel="manifest" href="../manifest.json" />
9
+ <link rel="stylesheet" href="../kempo-vars.css" />
10
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/kempo-css@2/dist/kempo.min.css" />
11
+ <link rel="stylesheet" href="../kempo-hljs.css" />
12
+ <link rel="stylesheet" href="../styles.css" />
13
+ <script>window.litDisableBundleWarning = true;</script>
14
+
15
+ </head>
16
+ <body>
17
+
18
+ <k-nav fixed class="bg-primary">
19
+ <button id="toggleNavSideMenu" class="link">
20
+ <k-icon name="menu"></k-icon>
21
+ </button>
22
+ <a href="../" class="d-if ph" style="align-items: center">
23
+ <img src="../media/icon32.png" alt="Kempo UI Icon" class="pr" />
24
+ Kempo UI
25
+ </a>
26
+ <div style="position:relative;margin:0 .25rem;align-self:center;" theme="light">
27
+ <input id="navSearchInput" type="search" placeholder="Search docs..." autocomplete="off" style="width:11rem;" />
28
+ <div id="navSearchDropdown" hidden theme="light" style="position:absolute;top:calc(100% + 4px);left:0;width:min(480px,90vw);max-height:70vh;background:var(--c_bg);border:1px solid var(--c_border);border-radius:var(--radius);overflow:auto;z-index:9999;box-shadow:0 4px 12px rgba(0,0,0,.3);">
29
+ <k-filter-list id="navSearchList" style="display:block;padding:.25rem 0;">
30
+ <k-filter-item filter-keywords="accordion components"><a href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
31
+ <k-filter-item filter-keywords="aside sidebar components"><a href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
32
+ <k-filter-item filter-keywords="card components"><a href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
33
+ <k-filter-item filter-keywords="code editor codeeditor monaco components"><a href="../components/code-editor.html">Code Editor<br><small>Component</small></a></k-filter-item>
34
+ <k-filter-item filter-keywords="color picker colorpicker components"><a href="../components/color-picker.html">Color Picker<br><small>Component</small></a></k-filter-item>
35
+ <k-filter-item filter-keywords="content slider components"><a href="../components/content-slider.html">Content Slider<br><small>Component</small></a></k-filter-item>
36
+ <k-filter-item filter-keywords="context state global components"><a href="../components/context.html">Context<br><small>Component</small></a></k-filter-item>
37
+ <k-filter-item filter-keywords="dialog modal popup components"><a href="../components/dialog.html">Dialog<br><small>Component</small></a></k-filter-item>
38
+ <k-filter-item filter-keywords="dropdown select components"><a href="../components/dropdown.html">Dropdown<br><small>Component</small></a></k-filter-item>
39
+ <k-filter-item filter-keywords="filter list filterlist components"><a href="../components/filter-list.html">Filter List<br><small>Component</small></a></k-filter-item>
40
+ <k-filter-item filter-keywords="focus capture focuscapture components"><a href="../components/focus-capture.html">Focus Capture<br><small>Component</small></a></k-filter-item>
41
+ <k-filter-item filter-keywords="html editor components"><a href="../components/html-editor.html">HTML Editor<br><small>Component</small></a></k-filter-item>
42
+ <k-filter-item filter-keywords="icon components"><a href="../components/icon.html">Icon<br><small>Component</small></a></k-filter-item>
43
+ <k-filter-item filter-keywords="import components"><a href="../components/import.html">Import<br><small>Component</small></a></k-filter-item>
44
+ <k-filter-item filter-keywords="nav navbar navigation components"><a href="../components/nav.html">Nav<br><small>Component</small></a></k-filter-item>
45
+ <k-filter-item filter-keywords="nav spacer navbar spacer navspacer components"><a href="../components/nav-spacer.html">Nav Spacer<br><small>Component</small></a></k-filter-item>
46
+ <k-filter-item filter-keywords="photo viewer photoviewer components"><a href="../components/photo-viewer.html">Photo Viewer<br><small>Component</small></a></k-filter-item>
47
+ <k-filter-item filter-keywords="resize components"><a href="../components/resize.html">Resize<br><small>Component</small></a></k-filter-item>
48
+ <k-filter-item filter-keywords="show more showmore components"><a href="../components/show-more.html">Show More<br><small>Component</small></a></k-filter-item>
49
+ <k-filter-item filter-keywords="sortable drag drop sort components"><a href="../components/sortable.html">Sortable<br><small>Component</small></a></k-filter-item>
50
+ <k-filter-item filter-keywords="spinner loading components"><a href="../components/spinner.html">Spinner<br><small>Component</small></a></k-filter-item>
51
+ <k-filter-item filter-keywords="split pane components"><a href="../components/split.html">Split<br><small>Component</small></a></k-filter-item>
52
+ <k-filter-item filter-keywords="table data grid components"><a href="../components/table.html">Table<br><small>Component</small></a></k-filter-item>
53
+ <k-filter-item filter-keywords="table controls advanced example"><a href="../components/tableControls.html">Table &mdash; Controls<br><small>Advanced Example</small></a></k-filter-item>
54
+ <k-filter-item filter-keywords="table custom fields advanced example"><a href="../components/tableCustomFields.html">Table &mdash; Custom Fields<br><small>Advanced Example</small></a></k-filter-item>
55
+ <k-filter-item filter-keywords="table fetch records advanced example"><a href="../components/tableFetchRecords.html">Table &mdash; Fetch Records<br><small>Advanced Example</small></a></k-filter-item>
56
+ <k-filter-item filter-keywords="table field sort hide advanced example"><a href="../components/tableFieldSortHide.html">Table &mdash; Field Sort &amp; Hide<br><small>Advanced Example</small></a></k-filter-item>
57
+ <k-filter-item filter-keywords="table pagination advanced example"><a href="../components/tablePagination.html">Table &mdash; Pagination<br><small>Advanced Example</small></a></k-filter-item>
58
+ <k-filter-item filter-keywords="table record editing advanced example"><a href="../components/tableRecordEditing.html">Table &mdash; Record Editing<br><small>Advanced Example</small></a></k-filter-item>
59
+ <k-filter-item filter-keywords="table record filtering advanced example"><a href="../components/tableRecordFiltering.html">Table &mdash; Record Filtering<br><small>Advanced Example</small></a></k-filter-item>
60
+ <k-filter-item filter-keywords="table record hiding advanced example"><a href="../components/tableRecordHiding.html">Table &mdash; Record Hiding<br><small>Advanced Example</small></a></k-filter-item>
61
+ <k-filter-item filter-keywords="table record searching advanced example"><a href="../components/tableRecordSearching.html">Table &mdash; Record Searching<br><small>Advanced Example</small></a></k-filter-item>
62
+ <k-filter-item filter-keywords="table record selection advanced example"><a href="../components/tableRecordSelection.html">Table &mdash; Record Selection<br><small>Advanced Example</small></a></k-filter-item>
63
+ <k-filter-item filter-keywords="table row controls advanced example"><a href="../components/tableRowControls.html">Table &mdash; Row Controls<br><small>Advanced Example</small></a></k-filter-item>
64
+ <k-filter-item filter-keywords="table server sync advanced example"><a href="../components/tableServerSync.html">Table &mdash; Server Sync<br><small>Advanced Example</small></a></k-filter-item>
65
+ <k-filter-item filter-keywords="table sorting advanced example"><a href="../components/tableSorting.html">Table &mdash; Sorting<br><small>Advanced Example</small></a></k-filter-item>
66
+ <k-filter-item filter-keywords="table placeholder advanced example"><a href="../components/tablePlaceholder.html">Table &mdash; Placeholder<br><small>Advanced Example</small></a></k-filter-item>
67
+ <k-filter-item filter-keywords="tabs tab panel components"><a href="../components/tabs.html">Tabs<br><small>Component</small></a></k-filter-item>
68
+ <k-filter-item filter-keywords="tags tag input components"><a href="../components/tags.html">Tags<br><small>Component</small></a></k-filter-item>
69
+ <k-filter-item filter-keywords="theme select dropdown dark light components"><a href="../components/theme-select.html">Theme Select<br><small>Component</small></a></k-filter-item>
70
+ <k-filter-item filter-keywords="theme switcher dark light components"><a href="../components/theme-switcher.html">Theme Switcher<br><small>Component</small></a></k-filter-item>
71
+ <k-filter-item filter-keywords="timestamp date time components"><a href="../components/timestamp.html">Timestamp<br><small>Component</small></a></k-filter-item>
72
+ <k-filter-item filter-keywords="toast notification alert components"><a href="../components/toast.html">Toast<br><small>Component</small></a></k-filter-item>
73
+ <k-filter-item filter-keywords="toggle switch checkbox components"><a href="../components/toggle.html">Toggle<br><small>Component</small></a></k-filter-item>
74
+ <k-filter-item filter-keywords="tree treeview components"><a href="../components/tree.html">Tree<br><small>Component</small></a></k-filter-item>
75
+ <k-filter-item filter-keywords="shadow component base"><a href="../components/shadow-component.html">Shadow Component<br><small>Base Component</small></a></k-filter-item>
76
+ <k-filter-item filter-keywords="light component base"><a href="../components/light-component.html">Light Component<br><small>Base Component</small></a></k-filter-item>
77
+ <k-filter-item filter-keywords="hybrid component base"><a href="../components/hybrid-component.html">Hybrid Component<br><small>Base Component</small></a></k-filter-item>
78
+ <k-filter-item filter-keywords="cookie utils utility"><a href="../utils/cookie.html">cookie<br><small>Utility</small></a></k-filter-item>
79
+ <k-filter-item filter-keywords="context utils utility"><a href="../utils/context.html">context<br><small>Utility</small></a></k-filter-item>
80
+ <k-filter-item filter-keywords="debounce utils utility"><a href="../utils/debounce.html">debounce<br><small>Utility</small></a></k-filter-item>
81
+ <k-filter-item filter-keywords="drag utils utility"><a href="../utils/drag.html">drag<br><small>Utility</small></a></k-filter-item>
82
+ <k-filter-item filter-keywords="elevation z-index stacking utils"><a href="../utils/elevation.html">elevation<br><small>Utility</small></a></k-filter-item>
83
+ <k-filter-item filter-keywords="formattimestamp timestamp format date time utils utility"><a href="../utils/formatTimestamp.html">formatTimestamp<br><small>Utility</small></a></k-filter-item>
84
+ <k-filter-item filter-keywords="object utils utility"><a href="../utils/object.html">object<br><small>Utility</small></a></k-filter-item>
85
+ <k-filter-item filter-keywords="propconverters prop converters utils utility"><a href="../utils/propConverters.html">propConverters<br><small>Utility</small></a></k-filter-item>
86
+ <k-filter-item filter-keywords="string utils utility"><a href="../utils/string.html">string<br><small>Utility</small></a></k-filter-item>
87
+ <k-filter-item filter-keywords="theme utils utility"><a href="../utils/theme.html">theme<br><small>Utility</small></a></k-filter-item>
88
+ <k-filter-item filter-keywords="type utils utility"><a href="../utils/type.html">type<br><small>Utility</small></a></k-filter-item>
89
+ <k-filter-item filter-keywords="wait async utils utility"><a href="../utils/wait.html">wait<br><small>Utility</small></a></k-filter-item>
90
+ </k-filter-list>
91
+ </div>
92
+ </div>
93
+ <div class="flex"></div>
94
+ <a href="https://github.com/dustinpoissant/kempo-ui?tab=License-1-ov-file#creative-commons-attribution-noncommercial-sharealike-20" target="_blank"><k-icon name="license"></k-icon></a>
95
+ <a href="https://www.npmjs.com/package/kempo-ui" target="_blank"><k-icon name="npm"></k-icon></a>
96
+ <a href="https://github.com/dustinpoissant/kempo-ui" target="_blank"><k-icon name="github-mark"></k-icon></a>
97
+ <k-theme-switcher></k-theme-switcher>
98
+ </k-nav>
99
+ <div style="width: 100%; height: 4rem;"></div>
100
+ <k-aside id="navSideMenu" main="overlay" state="offscreen">
101
+ <menu>
102
+ <a href="../" class="ta-center bb mb r0">
103
+ <h1 class="tc-primary">Kempo UI</h1>
104
+ <img src="../media/icon128.png" alt="Kempo UI Icon" />
105
+ </a>
106
+
107
+ <div class="pl mb">
108
+ <h3>Components</h3>
109
+ <a href="../components/accordion.html">Accordion</a>
110
+ <a href="../components/aside.html">Aside</a>
111
+ <a href="../components/card.html">Card</a>
112
+ <a href="../components/code-editor.html">Code Editor</a>
113
+ <a href="../components/color-picker.html">ColorPicker</a>
114
+ <a href="../components/content-slider.html">Content Slider</a>
115
+ <a href="../components/context.html">Context</a>
116
+ <a href="../components/dialog.html">Dialog</a>
117
+ <a href="../components/dropdown.html">Dropdown</a>
118
+ <a href="../components/filter-list.html">Filter List</a>
119
+ <a href="../components/focus-capture.html">FocusCapture</a>
120
+ <a href="../components/html-editor.html">HTML Editor</a>
121
+ <a href="../components/icon.html">Icon</a>
122
+ <a href="../components/import.html">Import</a>
123
+ <a href="../components/nav.html">Nav</a>
124
+ <a href="../components/nav-spacer.html">Nav Spacer</a>
125
+ <a href="../components/photo-viewer.html">Photo Viewer</a>
126
+ <a href="../components/resize.html">Resize</a>
127
+ <a href="../components/show-more.html">Show More</a>
128
+ <a href="../components/sortable.html">Sortable</a>
129
+ <a href="../components/spinner.html">Spinner</a>
130
+ <a href="../components/split.html">Split</a>
131
+ <a href="../components/table.html">Table</a>
132
+ <a href="../components/tabs.html">Tabs</a>
133
+ <a href="../components/tags.html">Tags</a>
134
+ <a href="../components/theme-select.html">Theme Select</a>
135
+ <a href="../components/theme-switcher.html">Theme Switcher</a>
136
+ <a href="../components/timestamp.html">Timestamp</a>
137
+ <a href="../components/toast.html">Toast</a>
138
+ <a href="../components/toggle.html">Toggle</a>
139
+ <a href="../components/tree.html">Tree</a>
140
+ </div>
141
+
142
+ <h5 class="mb0">Base Components</h5>
143
+ <div class="pl mb">
144
+ <a href="../components/shadow-component.html">Shadow Component</a>
145
+ <a href="../components/light-component.html">Light Component</a>
146
+ <a href="../components/hybrid-component.html">Hybrid Component</a>
147
+ </div>
148
+
149
+ <h5 class="mb0">Utils</h5>
150
+ <div class="pl mb">
151
+ <a href="../utils/cookie.html">cookie</a>
152
+ <a href="../utils/context.html">context</a>
153
+ <a href="../utils/debounce.html">debounce</a>
154
+ <a href="../utils/drag.html">drag</a>
155
+ <a href="../utils/elevation.html">elevation</a>
156
+ <a href="../utils/formatTimestamp.html">formatTimestamp</a>
157
+ <a href="../utils/object.html">object</a>
158
+ <a href="../utils/propConverters.html">propConverters</a>
159
+ <a href="../utils/string.html">string</a>
160
+ <a href="../utils/theme.html">theme</a>
161
+ <a href="../utils/type.html">type</a>
162
+ <a href="../utils/wait.html">wait</a>
163
+ </div>
164
+ </menu>
165
+ </k-aside>
166
+ <style>
167
+ #navSearchList a{display:block;padding:.25rem .5rem;border-radius:var(--radius);text-decoration:none;color:var(--tc);}
168
+ #navSearchList a:hover{background:rgba(128,128,128,.15);}
169
+ #navSearchList a small{display:block;color:var(--tc_muted);}
170
+ </style>
171
+ <script src="../src/components/Nav.js" type="module"></script>
172
+ <script src="../src/components/FilterList.js" type="module"></script>
173
+ <script src="../src/components/FilterItem.js" type="module"></script>
174
+ <script src="../src/components/Aside.js" type="module"></script>
175
+ <script src="../src/components/Icon.js" type="module"></script>
176
+ <script src="../src/components/ThemeSwitcher.js" type="module"></script>
177
+ <script type="module">
178
+ import debounce from '../src/utils/debounce.js';
179
+
180
+ document.getElementById('toggleNavSideMenu').addEventListener('click', async () => {
181
+ await window.customElements.whenDefined('k-aside');
182
+ document.getElementById('navSideMenu').toggle();
183
+ });
184
+
185
+ document.addEventListener('click', function(e) {
186
+ if(e.target.matches('a[href^="#"]')) {
187
+ e.preventDefault();
188
+ const targetId = e.target.getAttribute('href').replace('#', '');
189
+ const target = document.getElementById(targetId);
190
+ if(target) {
191
+ target.scrollIntoView({ behavior: 'smooth' });
192
+ const url = window.location.pathname + window.location.search + '#' + targetId;
193
+ history.replaceState(null, '', url);
194
+ }
195
+ }
196
+ });
197
+
198
+ /*
199
+ Nav Search
200
+ */
201
+ const searchInput = document.getElementById('navSearchInput');
202
+ const searchDropdown = document.getElementById('navSearchDropdown');
203
+ let navSearchList = null;
204
+
205
+ const openSearch = async () => {
206
+ await customElements.whenDefined('k-filter-list');
207
+ if(!navSearchList) navSearchList = document.getElementById('navSearchList');
208
+ navSearchList.filter(searchInput.value);
209
+ searchDropdown.hidden = false;
210
+ };
211
+
212
+ const closeSearch = () => {
213
+ searchDropdown.hidden = true;
214
+ navSearchList?.clearFocus();
215
+ };
216
+
217
+ searchInput.addEventListener('focus', openSearch);
218
+
219
+ searchInput.addEventListener('input', debounce(e => {
220
+ navSearchList?.filter(e.target.value);
221
+ }, 150));
222
+
223
+ searchInput.addEventListener('keydown', e => {
224
+ if(e.key === 'Escape') {
225
+ searchInput.value = '';
226
+ searchInput.blur();
227
+ closeSearch();
228
+ } else if(e.key === 'ArrowDown' || e.key === 'ArrowUp' || e.key === 'Enter') {
229
+ navSearchList?.handleKeydown(e);
230
+ }
231
+ });
232
+
233
+ searchInput.addEventListener('blur', () => {
234
+ setTimeout(closeSearch, 150);
235
+ });
236
+
237
+ document.addEventListener('keydown', e => {
238
+ let active = document.activeElement;
239
+ while(active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement;
240
+ const tag = active?.tagName;
241
+ if(tag === 'INPUT' || tag === 'TEXTAREA' || active?.isContentEditable) return;
242
+ if(e.metaKey || e.ctrlKey || e.altKey) return;
243
+ if(e.key.length === 1) {
244
+ searchInput.focus();
245
+ }
246
+ });
247
+ </script>
248
+
249
+
250
+ <h1 class="ta-center">CodeEditor</h1>
251
+
252
+ <k-main>
253
+
254
+ <k-accordion persistent-id="toc" class="b r mb">
255
+ <k-accordion-header for-panel="toc-panel">Table of Contents</k-accordion-header>
256
+ <k-accordion-panel name="toc-panel">
257
+ <div class="m pl">
258
+ <h6>Examples</h6>
259
+ <a href="#basicExample">Basic Example</a><br />
260
+ <a href="#controlsExample">Built-in Controls</a><br />
261
+ <a href="#customControls">Custom Controls</a><br />
262
+ <a href="#height">Setting Height</a><br />
263
+ <a href="#jsApi">JavaScript API</a><br />
264
+
265
+ <h6 class="mt"><a href="#jsRef" class="no-link">JavaScript Reference</a></h6>
266
+ <a href="#constructor">Constructor</a><br />
267
+ <a href="#properties">Properties</a><br />
268
+ <a href="#globalConfig">Global Configuration</a><br />
269
+ <a href="#methods">Methods</a><br />
270
+ <a href="#events">Events</a><br />
271
+ <a href="#slots">Toolbar Slots</a><br />
272
+ </div>
273
+ </k-accordion-panel>
274
+ </k-accordion>
275
+
276
+ <p>A Monaco-powered code editor component with language support, theme integration, optional toolbar controls, and form association.</p>
277
+
278
+ <h3 id="basicExample"><a href="#basicExample" class="no-link">Basic Example</a></h3>
279
+ <p>A simple code editor with JavaScript syntax highlighting:</p>
280
+ <div class="row -mx">
281
+ <div class="col m-span-12 px">
282
+ <k-card label="HTML">
283
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-code-editor</span> <span class="hljs-attr">language</span>=<span class="hljs-string">&#x27;javascript&#x27;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-code-editor</span>&gt;</span></code></pre>
284
+ </k-card>
285
+ </div>
286
+ <div class="col m-span-12 px">
287
+ <k-card label="Output">
288
+ <k-code-editor id="basicEditor" language="javascript" class="b r" value="function greet(name) {
289
+ return 'Hello, ' + name + '!';
290
+ }
291
+
292
+ console.log(greet('World'));"></k-code-editor>
293
+ </k-card>
294
+ </div>
295
+ </div>
296
+
297
+ <h3 id="controlsExample"><a href="#controlsExample" class="no-link">Built-in Controls</a></h3>
298
+ <p>Use the <code>controls</code> attribute to show built-in toolbar controls:</p>
299
+ <div class="row -mx">
300
+ <div class="col m-span-12 px">
301
+ <k-card label="HTML">
302
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-code-editor</span> <span class="hljs-attr">language</span>=<span class="hljs-string">&#x27;javascript&#x27;</span> <span class="hljs-attr">controls</span>=<span class="hljs-string">&#x27;full&#x27;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-code-editor</span>&gt;</span></code></pre>
303
+ </k-card>
304
+ </div>
305
+ <div class="col m-span-12 px">
306
+ <k-card label="Output">
307
+ <k-code-editor id="controlsEditor" language="javascript" controls="full" class="b r" value="const arr = [3, 1, 4, 1, 5, 9];
308
+ const sorted = arr.sort((a, b) => a - b);
309
+ console.log(sorted);"></k-code-editor>
310
+ </k-card>
311
+ </div>
312
+ </div>
313
+
314
+ <h3 id="customControls"><a href="#customControls" class="no-link">Custom Controls</a></h3>
315
+ <p>Slot controls into the toolbar for a custom layout:</p>
316
+ <div class="row -mx">
317
+ <div class="col m-span-12 px">
318
+ <k-card label="HTML">
319
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-code-editor</span> <span class="hljs-attr">language</span>=<span class="hljs-string">&#x27;html&#x27;</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">k-cec-format-code</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">&#x27;toolbar-top-left&#x27;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-cec-format-code</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">k-cec-copy-code</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">&#x27;toolbar-top-left&#x27;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-cec-copy-code</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">k-cec-editor-theme</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">&#x27;toolbar-top-right&#x27;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-cec-editor-theme</span>&gt;</span><br> <span class="hljs-tag">&lt;<span class="hljs-name">k-cec-fullscreen</span> <span class="hljs-attr">slot</span>=<span class="hljs-string">&#x27;toolbar-top-right&#x27;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-cec-fullscreen</span>&gt;</span><br><span class="hljs-tag">&lt;/<span class="hljs-name">k-code-editor</span>&gt;</span></code></pre>
320
+ </k-card>
321
+ </div>
322
+ <div class="col m-span-12 px">
323
+ <k-card label="Output">
324
+ <k-code-editor id="customEditor" language="html" class="b r" value="<div class='container'>
325
+ <h1>Hello World</h1>
326
+ <p>This is a paragraph.</p>
327
+ </div>">
328
+ <k-cec-format-code slot="toolbar-top-left"></k-cec-format-code>
329
+ <k-cec-copy-code slot="toolbar-top-left"></k-cec-copy-code>
330
+ <k-cec-editor-theme slot="toolbar-top-right"></k-cec-editor-theme>
331
+ <k-cec-fullscreen slot="toolbar-top-right"></k-cec-fullscreen>
332
+ </k-code-editor>
333
+ </k-card>
334
+ </div>
335
+ </div>
336
+
337
+ <h3 id="height"><a href="#height" class="no-link">Setting Height</a></h3>
338
+ <p>The default height is <code>400px</code>. Override it with an inline style or CSS class on the element:</p>
339
+ <div class="row -mx">
340
+ <div class="col m-span-12 px">
341
+ <k-card label="HTML">
342
+ <pre><code class="hljs xml"><span class="hljs-tag">&lt;<span class="hljs-name">k-code-editor</span> <span class="hljs-attr">style</span>=<span class="hljs-string">&#x27;height: 500px&#x27;</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">k-code-editor</span>&gt;</span></code></pre>
343
+ </k-card>
344
+ </div>
345
+ <div class="col m-span-12 px">
346
+ <k-card label="Output">
347
+ <k-code-editor class="b r" language="javascript" style="height: 500px" value="// Height set to 500px via style attribute
348
+ const x = 42;
349
+ console.log(x);"></k-code-editor>
350
+ </k-card>
351
+ </div>
352
+ </div>
353
+
354
+ <h3 id="jsApi"><a href="#jsApi" class="no-link">JavaScript API</a></h3>
355
+ <p>Interact with the editor programmatically:</p>
356
+ <div class="row -mx">
357
+ <div class="col m-span-12 px">
358
+ <k-card label="JavaScript">
359
+ <pre><code class="hljs javascript"><span class="hljs-keyword">const</span> editor = <span class="hljs-variable language_">document</span>.<span class="hljs-title function_">querySelector</span>(<span class="hljs-string">&#x27;k-code-editor&#x27;</span>);<br><span class="hljs-comment">// Get/set value</span><br>editor.<span class="hljs-title function_">setValue</span>(<span class="hljs-string">&#x27;console.log(&quot;hello&quot;)&#x27;</span>);<br><span class="hljs-keyword">const</span> code = editor.<span class="hljs-title function_">getValue</span>();<br><span class="hljs-comment">// Change language</span><br>editor.<span class="hljs-title function_">setLanguage</span>(<span class="hljs-string">&#x27;html&#x27;</span>);<br><span class="hljs-comment">// Format code</span><br>editor.<span class="hljs-title function_">formatCode</span>();<br><span class="hljs-comment">// Undo / Redo</span><br>editor.<span class="hljs-title function_">undo</span>();<br>editor.<span class="hljs-title function_">redo</span>();<br><span class="hljs-comment">// Copy to clipboard</span><br>editor.<span class="hljs-title function_">copyToClipboard</span>();<br><span class="hljs-comment">// Find &amp; Replace</span><br>editor.<span class="hljs-title function_">openFind</span>();<br><span class="hljs-comment">// Word wrap / Minimap</span><br>editor.<span class="hljs-title function_">setWordWrap</span>(<span class="hljs-literal">true</span>);<br>editor.<span class="hljs-title function_">setMinimap</span>(<span class="hljs-literal">true</span>);<br><span class="hljs-comment">// Font size</span><br>editor.<span class="hljs-title function_">increaseFontSize</span>();<br>editor.<span class="hljs-title function_">decreaseFontSize</span>();<br><span class="hljs-comment">// Fold / Unfold</span><br>editor.<span class="hljs-title function_">foldAll</span>();<br>editor.<span class="hljs-title function_">unfoldAll</span>();<br><span class="hljs-comment">// Change editor theme</span><br>editor.<span class="hljs-title function_">setEditorTheme</span>(<span class="hljs-string">&#x27;dark&#x27;</span>);</code></pre>
360
+ </k-card>
361
+ </div>
362
+ </div>
363
+
364
+ <h2 id="jsRef"><a href="#jsRef" class="no-link">JavaScript Reference</a></h2>
365
+
366
+ <h3 id="constructor"><a href="#constructor" class="no-link">Constructor</a></h3>
367
+ <p>The <code>CodeEditor</code> component is created via its custom element tag <code>&lt;k-code-editor&gt;</code>.</p>
368
+
369
+ <h3 id="properties"><a href="#properties" class="no-link">Properties / Attributes</a></h3>
370
+ <table class="b r">
371
+ <thead>
372
+ <tr><th>Property</th><th>Attribute</th><th>Type</th><th>Default</th><th>Description</th></tr>
373
+ </thead>
374
+ <tbody>
375
+ <tr><td><code>name</code></td><td><code>name</code></td><td>String</td><td><code>''</code></td><td>Form field name</td></tr>
376
+ <tr><td><code>value</code></td><td><code>value</code></td><td>String</td><td><code>''</code></td><td>Editor content</td></tr>
377
+ <tr><td><code>language</code></td><td><code>language</code></td><td>String</td><td><code>'javascript'</code></td><td>Monaco language mode (e.g. <code>javascript</code>, <code>html</code>, <code>css</code>, <code>json</code>, <code>typescript</code>)</td></tr>
378
+ <tr><td><code>controls</code></td><td><code>controls</code></td><td>String</td><td><code>''</code></td><td>Set to <code>'full'</code> for built-in toolbar; <code>'none'</code> or empty for no built-in controls</td></tr>
379
+ <tr><td><code>monacoSrc</code></td><td><code>monaco-src</code></td><td>String</td><td><code>''</code></td><td>Custom Monaco CDN base URL</td></tr>
380
+ <tr><td><code>editorTheme</code></td><td><code>editor-theme</code></td><td>String</td><td><code>'auto'</code></td><td>Theme override: <code>'auto'</code> (matches site theme), <code>'light'</code>, or <code>'dark'</code></td></tr>
381
+ </tbody>
382
+ </table>
383
+
384
+ <h3 id="globalConfig"><a href="#globalConfig" class="no-link">Global Configuration</a></h3>
385
+ <p>Configure the Monaco CDN URL globally before importing the component:</p>
386
+ <pre><code class="hljs javascript"><span class="hljs-variable language_">window</span>.kempo = {<br> <span class="hljs-attr">monacoUrl</span>: <span class="hljs-string">&#x27;https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min&#x27;</span><br>};</code></pre>
387
+
388
+ <h3 id="methods"><a href="#methods" class="no-link">Methods</a></h3>
389
+ <table class="b r">
390
+ <thead>
391
+ <tr><th>Method</th><th>Returns</th><th>Description</th></tr>
392
+ </thead>
393
+ <tbody>
394
+ <tr><td><code>getValue()</code></td><td><code>String</code></td><td>Returns the current editor content</td></tr>
395
+ <tr><td><code>setValue(str)</code></td><td><code>this</code></td><td>Sets the editor content</td></tr>
396
+ <tr><td><code>clear()</code></td><td><code>this</code></td><td>Clears the editor content</td></tr>
397
+ <tr><td><code>formatCode()</code></td><td><code>this</code></td><td>Formats/beautifies the code using Monaco's built-in formatter</td></tr>
398
+ <tr><td><code>selectAll()</code></td><td><code>this</code></td><td>Selects all content</td></tr>
399
+ <tr><td><code>getSelectedText()</code></td><td><code>String</code></td><td>Returns the currently selected text</td></tr>
400
+ <tr><td><code>focus()</code></td><td><code>this</code></td><td>Focuses the editor</td></tr>
401
+ <tr><td><code>setLanguage(lang)</code></td><td><code>this</code></td><td>Changes the syntax language</td></tr>
402
+ <tr><td><code>setEditorTheme(theme)</code></td><td><code>this</code></td><td>Sets theme override: <code>'auto'</code>, <code>'light'</code>, or <code>'dark'</code></td></tr>
403
+ <tr><td><code>copyToClipboard()</code></td><td><code>this</code></td><td>Copies the editor content to the clipboard</td></tr>
404
+ <tr><td><code>undo()</code></td><td><code>this</code></td><td>Undoes the last edit</td></tr>
405
+ <tr><td><code>redo()</code></td><td><code>this</code></td><td>Redoes the last undone edit</td></tr>
406
+ <tr><td><code>setWordWrap(enabled)</code></td><td><code>this</code></td><td>Enables or disables word wrapping</td></tr>
407
+ <tr><td><code>setMinimap(enabled)</code></td><td><code>this</code></td><td>Shows or hides the minimap</td></tr>
408
+ <tr><td><code>openFind()</code></td><td><code>this</code></td><td>Opens Monaco's built-in Find &amp; Replace dialog</td></tr>
409
+ <tr><td><code>increaseFontSize()</code></td><td><code>this</code></td><td>Increases font size by 2px (max 40)</td></tr>
410
+ <tr><td><code>decreaseFontSize()</code></td><td><code>this</code></td><td>Decreases font size by 2px (min 8)</td></tr>
411
+ <tr><td><code>foldAll()</code></td><td><code>this</code></td><td>Folds all code regions</td></tr>
412
+ <tr><td><code>unfoldAll()</code></td><td><code>this</code></td><td>Unfolds all code regions</td></tr>
413
+ </tbody>
414
+ </table>
415
+
416
+ <h3 id="events"><a href="#events" class="no-link">Events</a></h3>
417
+ <table class="b r">
418
+ <thead>
419
+ <tr><th>Event</th><th>detail</th><th>Description</th></tr>
420
+ </thead>
421
+ <tbody>
422
+ <tr><td><code>ready</code></td><td><code>{ value }</code></td><td>Fired when Monaco is initialized and ready</td></tr>
423
+ <tr><td><code>change</code></td><td><code>{ value }</code></td><td>Fired when the content changes</td></tr>
424
+ <tr><td><code>input</code></td><td><code>{ value }</code></td><td>Fired on each keystroke/edit</td></tr>
425
+ </tbody>
426
+ </table>
427
+
428
+ <h3 id="slots"><a href="#slots" class="no-link">Toolbar Slots</a></h3>
429
+ <table class="b r">
430
+ <thead>
431
+ <tr><th>Slot</th><th>Description</th></tr>
432
+ </thead>
433
+ <tbody>
434
+ <tr><td><code>toolbar-top-left</code></td><td>Left section of the top toolbar</td></tr>
435
+ <tr><td><code>toolbar-top-center</code></td><td>Center section of the top toolbar</td></tr>
436
+ <tr><td><code>toolbar-top-right</code></td><td>Right section of the top toolbar</td></tr>
437
+ <tr><td><code>toolbar-top</code></td><td>Full-width top toolbar</td></tr>
438
+ <tr><td><code>toolbar-bottom-left</code></td><td>Left section of the bottom toolbar</td></tr>
439
+ <tr><td><code>toolbar-bottom-center</code></td><td>Center section of the bottom toolbar</td></tr>
440
+ <tr><td><code>toolbar-bottom-right</code></td><td>Right section of the bottom toolbar</td></tr>
441
+ <tr><td><code>toolbar-bottom</code></td><td>Full-width bottom toolbar</td></tr>
442
+ </tbody>
443
+ </table>
444
+
445
+ <h3>Available Controls</h3>
446
+ <table class="b r">
447
+ <thead>
448
+ <tr><th>Element</th><th>Description</th></tr>
449
+ </thead>
450
+ <tbody>
451
+ <tr><td><code>&lt;k-cec-format-code&gt;</code></td><td>Formats the code using Monaco's built-in formatter</td></tr>
452
+ <tr><td><code>&lt;k-cec-copy-code&gt;</code></td><td>Copies the editor content to the clipboard</td></tr>
453
+ <tr><td><code>&lt;k-cec-undo&gt;</code></td><td>Undoes the last edit</td></tr>
454
+ <tr><td><code>&lt;k-cec-redo&gt;</code></td><td>Redoes the last undone edit</td></tr>
455
+ <tr><td><code>&lt;k-cec-word-wrap&gt;</code></td><td>Toggles word wrapping on/off</td></tr>
456
+ <tr><td><code>&lt;k-cec-minimap&gt;</code></td><td>Toggles the minimap on/off</td></tr>
457
+ <tr><td><code>&lt;k-cec-find-replace&gt;</code></td><td>Opens Monaco's Find &amp; Replace dialog</td></tr>
458
+ <tr><td><code>&lt;k-cec-font-size&gt;</code></td><td>Increase/decrease font size buttons</td></tr>
459
+ <tr><td><code>&lt;k-cec-fold-all&gt;</code></td><td>Toggles fold/unfold all code regions</td></tr>
460
+ <tr><td><code>&lt;k-cec-fullscreen&gt;</code></td><td>Toggles the editor in and out of fullscreen — visible in all modes</td></tr>
461
+ <tr><td><code>&lt;k-cec-language&gt;</code></td><td>Select dropdown to change the syntax language</td></tr>
462
+ <tr><td><code>&lt;k-cec-editor-theme&gt;</code></td><td>Select dropdown to switch between auto, light, and dark editor themes</td></tr>
463
+ <tr><td><code>&lt;k-cec-group&gt;</code></td><td>Groups controls visually with shared borders</td></tr>
464
+ <tr><td><code>&lt;k-cec-spacer&gt;</code></td><td>Flexible spacer to push controls apart</td></tr>
465
+ </tbody>
466
+ </table>
467
+
468
+ <script type="module" src="../src/components/CodeEditor.js"></script>
469
+ <script type="module" src="../src/components/codeEditorControls/FormatCode.js"></script>
470
+ <script type="module" src="../src/components/codeEditorControls/CopyCode.js"></script>
471
+ <script type="module" src="../src/components/codeEditorControls/EditorTheme.js"></script>
472
+ <script type="module" src="../src/components/codeEditorControls/Undo.js"></script>
473
+ <script type="module" src="../src/components/codeEditorControls/Redo.js"></script>
474
+ <script type="module" src="../src/components/codeEditorControls/WordWrap.js"></script>
475
+ <script type="module" src="../src/components/codeEditorControls/Minimap.js"></script>
476
+ <script type="module" src="../src/components/codeEditorControls/FindReplace.js"></script>
477
+ <script type="module" src="../src/components/codeEditorControls/FontSize.js"></script>
478
+ <script type="module" src="../src/components/codeEditorControls/FoldAll.js"></script>
479
+ <script type="module" src="../src/components/codeEditorControls/LanguageSelect.js"></script>
480
+ <script type="module" src="../src/components/codeEditorControls/Fullscreen.js"></script>
481
+ <script type="module" src="../src/components/codeEditorControls/ControlGroup.js"></script>
482
+ <script type="module" src="../src/components/codeEditorControls/ControlSpacer.js"></script>
483
+ <script type="module" src="../src/components/Accordion.js"></script>
484
+ <script type="module" src="../src/components/Card.js"></script>
485
+
486
+ </k-main>
487
+ <div style="height:33vh"></div>
488
+ <script type="module" src="../src/components/Main.js"></script>
489
+
490
+ </body>
491
+ </html>
@@ -30,6 +30,7 @@
30
30
  <k-filter-item filter-keywords="accordion components"><a href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
31
31
  <k-filter-item filter-keywords="aside sidebar components"><a href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
32
32
  <k-filter-item filter-keywords="card components"><a href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
33
+ <k-filter-item filter-keywords="code editor codeeditor monaco components"><a href="../components/code-editor.html">Code Editor<br><small>Component</small></a></k-filter-item>
33
34
  <k-filter-item filter-keywords="color picker colorpicker components"><a href="../components/color-picker.html">Color Picker<br><small>Component</small></a></k-filter-item>
34
35
  <k-filter-item filter-keywords="content slider components"><a href="../components/content-slider.html">Content Slider<br><small>Component</small></a></k-filter-item>
35
36
  <k-filter-item filter-keywords="context state global components"><a href="../components/context.html">Context<br><small>Component</small></a></k-filter-item>
@@ -108,6 +109,7 @@
108
109
  <a href="../components/accordion.html">Accordion</a>
109
110
  <a href="../components/aside.html">Aside</a>
110
111
  <a href="../components/card.html">Card</a>
112
+ <a href="../components/code-editor.html">Code Editor</a>
111
113
  <a href="../components/color-picker.html">ColorPicker</a>
112
114
  <a href="../components/content-slider.html">Content Slider</a>
113
115
  <a href="../components/context.html">Context</a>
@@ -30,6 +30,7 @@
30
30
  <k-filter-item filter-keywords="accordion components"><a href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
31
31
  <k-filter-item filter-keywords="aside sidebar components"><a href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
32
32
  <k-filter-item filter-keywords="card components"><a href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
33
+ <k-filter-item filter-keywords="code editor codeeditor monaco components"><a href="../components/code-editor.html">Code Editor<br><small>Component</small></a></k-filter-item>
33
34
  <k-filter-item filter-keywords="color picker colorpicker components"><a href="../components/color-picker.html">Color Picker<br><small>Component</small></a></k-filter-item>
34
35
  <k-filter-item filter-keywords="content slider components"><a href="../components/content-slider.html">Content Slider<br><small>Component</small></a></k-filter-item>
35
36
  <k-filter-item filter-keywords="context state global components"><a href="../components/context.html">Context<br><small>Component</small></a></k-filter-item>
@@ -108,6 +109,7 @@
108
109
  <a href="../components/accordion.html">Accordion</a>
109
110
  <a href="../components/aside.html">Aside</a>
110
111
  <a href="../components/card.html">Card</a>
112
+ <a href="../components/code-editor.html">Code Editor</a>
111
113
  <a href="../components/color-picker.html">ColorPicker</a>
112
114
  <a href="../components/content-slider.html">Content Slider</a>
113
115
  <a href="../components/context.html">Context</a>
@@ -30,6 +30,7 @@
30
30
  <k-filter-item filter-keywords="accordion components"><a href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
31
31
  <k-filter-item filter-keywords="aside sidebar components"><a href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
32
32
  <k-filter-item filter-keywords="card components"><a href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
33
+ <k-filter-item filter-keywords="code editor codeeditor monaco components"><a href="../components/code-editor.html">Code Editor<br><small>Component</small></a></k-filter-item>
33
34
  <k-filter-item filter-keywords="color picker colorpicker components"><a href="../components/color-picker.html">Color Picker<br><small>Component</small></a></k-filter-item>
34
35
  <k-filter-item filter-keywords="content slider components"><a href="../components/content-slider.html">Content Slider<br><small>Component</small></a></k-filter-item>
35
36
  <k-filter-item filter-keywords="context state global components"><a href="../components/context.html">Context<br><small>Component</small></a></k-filter-item>
@@ -108,6 +109,7 @@
108
109
  <a href="../components/accordion.html">Accordion</a>
109
110
  <a href="../components/aside.html">Aside</a>
110
111
  <a href="../components/card.html">Card</a>
112
+ <a href="../components/code-editor.html">Code Editor</a>
111
113
  <a href="../components/color-picker.html">ColorPicker</a>
112
114
  <a href="../components/content-slider.html">Content Slider</a>
113
115
  <a href="../components/context.html">Context</a>
@@ -30,6 +30,7 @@
30
30
  <k-filter-item filter-keywords="accordion components"><a href="../components/accordion.html">Accordion<br><small>Component</small></a></k-filter-item>
31
31
  <k-filter-item filter-keywords="aside sidebar components"><a href="../components/aside.html">Aside<br><small>Component</small></a></k-filter-item>
32
32
  <k-filter-item filter-keywords="card components"><a href="../components/card.html">Card<br><small>Component</small></a></k-filter-item>
33
+ <k-filter-item filter-keywords="code editor codeeditor monaco components"><a href="../components/code-editor.html">Code Editor<br><small>Component</small></a></k-filter-item>
33
34
  <k-filter-item filter-keywords="color picker colorpicker components"><a href="../components/color-picker.html">Color Picker<br><small>Component</small></a></k-filter-item>
34
35
  <k-filter-item filter-keywords="content slider components"><a href="../components/content-slider.html">Content Slider<br><small>Component</small></a></k-filter-item>
35
36
  <k-filter-item filter-keywords="context state global components"><a href="../components/context.html">Context<br><small>Component</small></a></k-filter-item>
@@ -108,6 +109,7 @@
108
109
  <a href="../components/accordion.html">Accordion</a>
109
110
  <a href="../components/aside.html">Aside</a>
110
111
  <a href="../components/card.html">Card</a>
112
+ <a href="../components/code-editor.html">Code Editor</a>
111
113
  <a href="../components/color-picker.html">ColorPicker</a>
112
114
  <a href="../components/content-slider.html">Content Slider</a>
113
115
  <a href="../components/context.html">Context</a>