-TextNode.prototype.transformations.register(transformations.createContextTransformation({
- name: 'rng.breakContent',
- // impl: function(args) {
- // var node = this.context,
- // newNodes, emptyNode, emptyText;
- // newNodes = node.transform('smartxml.split', {offset: args.offset});
- // [newNodes.first, newNodes.second].some(function(newNode) {
- // if(!(newNode.contents().length)) {
- // newNode.transform('smartxml.append', {text: ''});
- // return true; // break
- // }
- // });
- // return _.extend(newNodes, {emptyText: emptyText});
- // },
- impl: function(args) {
- var node = this,
- newNodes, emptyNode, emptyText;
- newNodes = node.split({offset: args.offset});
- [newNodes.first, newNodes.second].some(function(newNode) {
- if(!(newNode.contents().length)) {
- newNode.append({text: ''});
- return true; // break
- }
- });
- return _.extend(newNodes, {emptyText: emptyText});
- },
- getChangeRoot: function() {
- return this.context.parent().parent();
- },
- isAllowed: function(args) {
- var parent = this.parent();
- return !!(parent && parent.parent());
- }
-}));
-
-
-ElementNode.prototype.transformations.register(transformations.createContextTransformation({
- name: 'smartxml.setText',
- impl: function(args) {
- this.setText(args.text);
- },
- getChangeRoot: function() {
- return this.context;
- }
-}));
+// TextNode.prototype.transformations.register(transformations.createContextTransformation({
+// name: 'rng.breakContent',
+// // impl: function(args) {
+// // var node = this.context,
+// // newNodes, emptyNode, emptyText;
+// // newNodes = node.transform('smartxml.split', {offset: args.offset});
+// // [newNodes.first, newNodes.second].some(function(newNode) {
+// // if(!(newNode.contents().length)) {
+// // newNode.transform('smartxml.append', {text: ''});
+// // return true; // break
+// // }
+// // });
+// // return _.extend(newNodes, {emptyText: emptyText});
+// // },
+// impl: function(args) {
+// var node = this,
+// newNodes, emptyNode, emptyText;
+// newNodes = node.split({offset: args.offset});
+// [newNodes.first, newNodes.second].some(function(newNode) {
+// if(!(newNode.contents().length)) {
+// newNode.append({text: ''});
+// return true; // break
+// }
+// });
+// return _.extend(newNodes, {emptyText: emptyText});
+// },
+// getChangeRoot: function() {
+// return this.context.parent().parent();
+// },
+// isAllowed: function(args) {
+// var parent = this.parent();
+// return !!(parent && parent.parent());
+// }
+// }));
+
+
+// ElementNode.prototype.transformations.register(transformations.createContextTransformation({
+// name: 'smartxml.setText',
+// impl: function(args) {
+// this.setText(args.text);
+// },
+// getChangeRoot: function() {
+// return this.context;
+// }
+// }));