1 define(function(require) {
5 var _ = require('libs/underscore'),
6 plugin = {documentExtension: {textNode: {}}};
9 plugin.documentExtension.textNode.transformations = {
11 impl: function(args) {
14 newNodes = node.split({offset: args.offset});
15 [newNodes.first, newNodes.second].some(function(newNode) {
16 if(!(newNode.contents().length)) {
17 emptyText = newNode.append({text: ''});
21 return _.extend(newNodes, {emptyText: emptyText});
23 getChangeRoot: function() {
24 return this.context.parent().parent();