ui/bindings/preventdefault
module
Functions
preventDefault( view ) → ListenerBindinginternalmodule:ui/bindings/preventdefault~preventDefaultA helper which executes a native
Event.preventDefault()if the target of an event equals the element of the view. It shortens the definition of a template.// In a class extending View. import { preventDefault } from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault'; // ... this.setTemplate( { tag: 'div', on: { // Prevent the default mousedown action on this view. mousedown: preventDefault( this ) } } );Copy codeParameters
view : ViewView instance that defines the template.
Returns