operation.directive.js 755 B

12345678910111213141516171819202122232425
  1. angular.module('kityminderEditor')
  2. .directive('operation', function() {
  3. return {
  4. restrict: 'E',
  5. templateUrl: 'ui/directive/operation/operation.html',
  6. scope: {
  7. minder: '='
  8. },
  9. replace: true,
  10. link: function($scope) {
  11. $scope.editNode = function() {
  12. var receiverElement = editor.receiver.element;
  13. var fsm = editor.fsm;
  14. var receiver = editor.receiver;
  15. receiverElement.innerText = minder.queryCommandValue('text');
  16. fsm.jump('input', 'input-request');
  17. receiver.selectAll();
  18. }
  19. }
  20. }
  21. });