Skip to content

Instantly share code, notes, and snippets.

@jordanburke
jordanburke / editableTextAngular.js
Last active December 4, 2017 14:27
WYSIWYG directive for xeditable using textAngular
angular.module('xeditable').directive('editableTextAngular', ['editableDirectiveFactory',
function (editableDirectiveFactory) {
return editableDirectiveFactory({
directiveName: 'editableTextAngular',
inputTpl: '<div text-angular></div>',
addListeners: function () {
var self = this;
self.parent.addListeners.call(self);
// submit textarea by ctrl+enter even with buttons
if (self.single && self.buttons !== 'no') {