PluginProbe ʕ •ᴥ•ʔ
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel / 1.2.2
WP All Export – Drag & Drop Export to Any Custom CSV, XML & Excel v1.2.2
trunk 0.9.0 0.9.1 1.0.0 1.0.1 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.2.0 1.2.1 1.2.10 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 1.3.0 1.3.1 1.3.2 1.3.3 1.3.4 1.3.5 1.3.6 1.3.7 1.3.8 1.3.9 1.4.0 1.4.1 1.4.10 1.4.11 1.4.12 1.4.13 1.4.14 1.4.15 1.4.2 1.4.3 1.4.4 1.4.5 1.4.6 1.4.7 1.4.8 1.4.9 1.5.0
wp-all-export / frontend / src / common / contenteditable.directive.js
wp-all-export / frontend / src / common Last commit date
mapping 7 years ago angular-chosen.directive.js 7 years ago attributes.service.js 7 years ago autodetect.directive.js 7 years ago cascade.directive.js 7 years ago contenteditable.directive.js 7 years ago currency.service.js 7 years ago droppable.directive.js 7 years ago export.service.js 7 years ago focusMeWhenEnabled.directive.js 7 years ago googleCategoriesService.js 7 years ago main.controller.js 7 years ago styledInput.directive.js 7 years ago template.service.js 7 years ago tipsy.directive.js 7 years ago wpHttp.service.js 7 years ago
contenteditable.directive.js
32 lines
1 GoogleMerchants.directive('contenteditable', ['$sce', function($sce) {
2 return {
3 restrict: 'A', // only activate on element attribute
4 require: '?ngModel', // get a hold of NgModelController
5 link: function(scope, element, attrs, ngModel) {
6 if (!ngModel) return; // do nothing if no ng-model
7
8 // Specify how UI should be updated
9 ngModel.$render = function() {
10 element.html($sce.getTrustedHtml(ngModel.$viewValue || ''));
11 };
12
13 // Listen for change events to enable binding
14 element.on('blur keyup change', function() {
15 scope.$evalAsync(read);
16 });
17 read(); // initialize
18
19 // Write data to the model
20 function read() {
21 var html = element.html();
22 // When we clear the content editable the browser leaves a <br> behind
23 // If strip-br attribute is provided then we strip this out
24 if (attrs.stripBr && html === '<br>') {
25 html = '';
26 }
27 ngModel.$setViewValue(html);
28 }
29 }
30 };
31 }]);
32