ng-cut

Handler for cut event

Description

The ng-cut directive allows you to specify custom behavior when an element is cut.

Parameters


ng-cut

  • Type: Expression

  • Description: Expression to evaluate upon cut event. ClipboardEvent object is available as $event.

  • Example:

    <div contenteditable="true" ng-cut="$ctrl.onCut($event)">
      Cuttable content
    </div>
    

Demo

<section ng-app>
  <div class="border p-2" ng-cut="cut = true" contenteditable="true">
    Cut text from this box via Ctrl-X
  </div>
  {{ cut }}
</section>
Cut text from this box via Ctrl-X
{{ cut }}