Changes between Initial Version and Version 1 of Ticket #8031, comment 13
- Timestamp:
- Apr 12, 2013, 1:15:02 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #8031, comment 13
initial v1 5 5 * Remove 'required' attribute from textarea (it should be correctly restored when destroying editor) to prevent those issues with native tooltips. 6 6 * Listen on submit and if data is required and editor is empty, then we should fire editor#required event (although it'd be cool if someone found more suitable event name :D). 7 * By default I'm not planning to do anything more (open alert or block form submitting), because we could break backward compatibility. However we can e.g. allow to block form submitting by setting {{{evt.data = true}}}- IMO it will be useful option:7 * By default I'm not planning to do anything more (open alert or block form submitting), because we could break backward compatibility. However we can e.g. allow to block form submitting by setting returning false - IMO it will be useful option: 8 8 9 9 {{{ 10 10 editor.on( 'required', function( evt ) { 11 11 app.showError( 'Article content is required' ); 12 evt.data = true;12 return false; 13 13 } ); 14 14 }}}