neiki-editor 2.4.0 → 2.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -11,7 +11,7 @@
11
11
  <img src="https://img.shields.io/badge/css-%23663399.svg?style=for-the-badge&logo=css&logoColor=white" alt="CSS">
12
12
  <br>
13
13
  <img src="https://img.shields.io/badge/License-MIT-2563EB?style=for-the-badge&logo=open-source-initiative&logoColor=white&labelColor=000F15&logoWidth=20" alt="License">
14
- <img src="https://img.shields.io/badge/Version-2.4.0-2563EB?style=for-the-badge&logo=semantic-release&logoColor=white&labelColor=000F15&logoWidth=20" alt="Version">
14
+ <img src="https://img.shields.io/badge/Version-2.6.0-2563EB?style=for-the-badge&logo=semantic-release&logoColor=white&labelColor=000F15&logoWidth=20" alt="Version">
15
15
  </p>
16
16
 
17
17
  <p align="center">
@@ -41,14 +41,14 @@
41
41
  Just one file — CSS is embedded automatically:
42
42
 
43
43
  ```html
44
- <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.4.0/dist/neiki-editor.min.js"></script>
44
+ <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.6.0/dist/neiki-editor.min.js"></script>
45
45
  ```
46
46
 
47
47
  Or if you prefer loading CSS separately:
48
48
 
49
49
  ```html
50
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.4.0/dist/neiki-editor.css">
51
- <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.4.0/dist/neiki-editor.js"></script>
50
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.6.0/dist/neiki-editor.css">
51
+ <script src="https://cdn.jsdelivr.net/gh/neikiri/neiki-editor@2.6.0/dist/neiki-editor.js"></script>
52
52
  ```
53
53
 
54
54
  ### Package Manager
@@ -137,7 +137,7 @@ const editor = new NeikiEditor('#editor', {
137
137
  | `spellcheck` | `boolean` | `true` | Enable browser spellcheck |
138
138
  | `readonly` | `boolean` | `false` | Make editor read-only |
139
139
  | `theme` | `string` | `'light'` | `'light'` or `'dark'` |
140
- | `language` | `string` | `'en'` | UI language: `'en'` (English) or `'cs'` (Czech) |
140
+ | `language` | `string` | `'en'` | UI language `en`, `cs`, `zh`, `es`, `de`, `fr`, `pt`, `ja` |
141
141
  | `translations` | `object\|null` | `null` | Custom translation keys (merged with built-in) |
142
142
  | `toolbar` | `array` | *(see above)* | Toolbar button configuration |
143
143
  | `onChange` | `function\|null` | `null` | Callback on content change |
@@ -173,8 +173,8 @@ Use the `toolbar` array to customize which buttons appear and in what order. Use
173
173
  | `heading` | Select | Paragraph, H1, H2, H3, H4, H5, H6. Defaults to Paragraph. |
174
174
  | `fontSize` | Widget | Font size widget with **[−]** / **[+]** buttons, text input, and dropdown presets: 8, 9, 10, 11, 12, 14, 18, 24, 30, 36, 48, 60, 72, 96 |
175
175
  | `fontFamily` | Select | Sans Serif (Arial), Serif (Georgia), Monospace (Consolas), Cursive (Comic Sans MS) |
176
- | `foreColor` | Color Picker | Text color picker with reset option |
177
- | `backColor` | Color Picker | Background color picker with reset option |
176
+ | `foreColor` | Color Picker | Text color palette, native color input, hex code input |
177
+ | `backColor` | Color Picker | Background color palette, native color input, hex code input |
178
178
 
179
179
  ### Alignment & Lists
180
180
 
@@ -263,6 +263,12 @@ Neiki Editor supports multiple UI languages. Built-in:
263
263
 
264
264
  - **English** (`en`) — default
265
265
  - **Czech** (`cs`)
266
+ - **Chinese** (`zh`)
267
+ - **Spanish** (`es`)
268
+ - **German** (`de`)
269
+ - **French** (`fr`)
270
+ - **Portuguese** (`pt`)
271
+ - **Japanese** (`ja`)
266
272
 
267
273
  ### Set language on init:
268
274
 
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * NeikiEditor - Production-Ready WYSIWYG Rich Text Editor
3
3
  * CSS Stylesheet
4
- * Version: 2.4.0
4
+ * Version: 2.6.0
5
5
  */
6
6
 
7
7
  /* ============================================
@@ -585,21 +585,96 @@
585
585
  top: 100%;
586
586
  left: 0;
587
587
  z-index: 1000;
588
- width: 220px;
589
588
  background: var(--neiki-bg-primary);
590
589
  border: 1px solid var(--neiki-border-color);
591
590
  border-radius: 8px;
592
591
  box-shadow: var(--neiki-shadow-lg);
593
592
  padding: 8px;
594
593
  margin-top: 4px;
594
+ display: flex;
595
+ flex-direction: column;
596
+ gap: 6px;
597
+ }
598
+
599
+ .neiki-color-grid {
595
600
  display: grid;
596
601
  grid-template-columns: repeat(10, 1fr);
597
602
  gap: 2px;
598
603
  }
599
604
 
605
+ .neiki-color-custom {
606
+ display: flex;
607
+ align-items: center;
608
+ gap: 6px;
609
+ padding-top: 6px;
610
+ border-top: 1px solid var(--neiki-border-color);
611
+ }
612
+
613
+ .neiki-color-custom-input {
614
+ -webkit-appearance: none;
615
+ -moz-appearance: none;
616
+ appearance: none;
617
+ width: 28px;
618
+ height: 28px;
619
+ border: 1px solid var(--neiki-border-color);
620
+ border-radius: 4px;
621
+ padding: 2px;
622
+ cursor: pointer;
623
+ background: transparent;
624
+ }
625
+
626
+ .neiki-color-custom-input::-webkit-color-swatch-wrapper {
627
+ padding: 0;
628
+ }
629
+
630
+ .neiki-color-custom-input::-webkit-color-swatch {
631
+ border: none;
632
+ border-radius: 2px;
633
+ }
634
+
635
+ .neiki-color-custom-input::-moz-color-swatch {
636
+ border: none;
637
+ border-radius: 2px;
638
+ }
639
+
640
+ .neiki-color-hex-input {
641
+ flex: 1;
642
+ height: 28px;
643
+ padding: 0 8px;
644
+ border: 1px solid var(--neiki-border-color);
645
+ border-radius: 4px;
646
+ font-size: 12px;
647
+ font-family: monospace;
648
+ background: var(--neiki-bg-secondary);
649
+ color: var(--neiki-text-primary);
650
+ outline: none;
651
+ }
652
+
653
+ .neiki-color-hex-input:focus {
654
+ border-color: var(--neiki-accent-color);
655
+ box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.15);
656
+ }
657
+
658
+ .neiki-color-apply-btn {
659
+ height: 28px;
660
+ padding: 0 10px;
661
+ border: none;
662
+ border-radius: 4px;
663
+ font-size: 12px;
664
+ font-weight: 500;
665
+ background: var(--neiki-accent-color);
666
+ color: #fff;
667
+ cursor: pointer;
668
+ transition: background 0.15s;
669
+ }
670
+
671
+ .neiki-color-apply-btn:hover {
672
+ background: var(--neiki-accent-hover);
673
+ }
674
+
600
675
  .neiki-color-swatch {
601
- width: 20px;
602
- height: 20px;
676
+ width: 22px;
677
+ height: 22px;
603
678
  border-radius: 3px;
604
679
  cursor: pointer;
605
680
  border: 1px solid var(--neiki-border-color);
@@ -980,6 +1055,15 @@
980
1055
  border-top: 1px solid var(--neiki-border-color);
981
1056
  }
982
1057
 
1058
+ .neiki-modal-footer .neiki-btn {
1059
+ width: auto;
1060
+ height: 38px;
1061
+ padding: 0 16px;
1062
+ font-size: 14px;
1063
+ font-weight: 500;
1064
+ border-radius: 6px;
1065
+ }
1066
+
983
1067
  /* Form Elements */
984
1068
  .neiki-form-group {
985
1069
  margin-bottom: 16px;
@@ -1623,6 +1707,11 @@
1623
1707
  padding: 0 4px;
1624
1708
  font-size: 11px;
1625
1709
  }
1710
+
1711
+ .neiki-color-picker {
1712
+ left: auto;
1713
+ right: 0;
1714
+ }
1626
1715
  }
1627
1716
 
1628
1717
  @media (max-width: 480px) {