| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
ve.ce.DocumentNode = function VeCeDocumentNode( model, surface, config ) { |
| 19 |
|
| 20 |
this.surface = surface; |
| 21 |
|
| 22 |
|
| 23 |
ve.ce.DocumentNode.super.call( this, model, config ); |
| 24 |
|
| 25 |
|
| 26 |
ve.ce.ContentEditableNode.call( this ); |
| 27 |
|
| 28 |
|
| 29 |
this.setRoot( this ); |
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
this.$element |
| 34 |
.addClass( 've-ce-documentNode ve-ce-attachedRootNode ve-ce-rootNode' ) |
| 35 |
.attr( 'tabindex', 0 ); |
| 36 |
|
| 37 |
this.$element.attr( 'data-gramm', 'false' ); |
| 38 |
|
| 39 |
this.$element.attr( 'role', 'textbox' ); |
| 40 |
}; |
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
OO.inheritClass( ve.ce.DocumentNode, ve.ce.BranchNode ); |
| 45 |
OO.mixinClass( ve.ce.DocumentNode, ve.ce.ContentEditableNode ); |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
ve.ce.DocumentNode.static.name = 'document'; |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
ve.ce.DocumentNode.prototype.getOuterLength = function () { |
| 63 |
return this.length; |
| 64 |
}; |
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
ve.ce.DocumentNode.prototype.getSurface = function () { |
| 72 |
return this.surface; |
| 73 |
}; |
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
ve.ce.nodeFactory.register( ve.ce.DocumentNode ); |