overtype 1.1.0 → 1.1.3

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
@@ -140,6 +140,26 @@ editors.forEach((editor, index) => {
140
140
  });
141
141
  ```
142
142
 
143
+ ### Form Integration
144
+
145
+ ```javascript
146
+ // Use with form validation
147
+ const [editor] = new OverType('#message', {
148
+ placeholder: 'Your message...',
149
+ textareaProps: {
150
+ required: true,
151
+ maxLength: 500,
152
+ name: 'message'
153
+ }
154
+ });
155
+
156
+ // The textarea will work with native form validation
157
+ document.querySelector('form').addEventListener('submit', (e) => {
158
+ const content = editor.getValue();
159
+ // Form will automatically validate required field
160
+ });
161
+ ```
162
+
143
163
  ### Custom Theme
144
164
 
145
165
  ```javascript
@@ -270,6 +290,14 @@ new OverType(target, options)
270
290
  placeholder: 'Start typing...',
271
291
  value: '',
272
292
 
293
+ // Native textarea properties
294
+ textareaProps: {
295
+ required: true,
296
+ maxLength: 500,
297
+ name: 'content',
298
+ // Any HTML textarea attribute
299
+ },
300
+
273
301
  // Stats bar
274
302
  showStats: false, // Enable/disable stats bar
275
303
  statsFormatter: (stats) => { // Custom stats format