abcjs 6.0.0-beta.7 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (204) hide show
  1. package/.github/workflows/tests.yml +29 -0
  2. package/CODE_OF_CONDUCT.md +76 -0
  3. package/CONTRIBUTING.md +1 -0
  4. package/LICENSE.md +1 -1
  5. package/README.md +92 -3
  6. package/RELEASE.md +957 -1
  7. package/abcjs-audio.css +14 -5
  8. package/dist/.gitignore +1 -2
  9. package/dist/abcjs-basic-min.js +3 -0
  10. package/dist/abcjs-basic-min.js.LICENSE +23 -0
  11. package/dist/abcjs-basic.js +28231 -0
  12. package/dist/abcjs-basic.js.map +1 -0
  13. package/dist/abcjs-plugin-min.js +3 -0
  14. package/dist/abcjs-plugin-min.js.LICENSE +23 -0
  15. package/dist/report-basic.html +37 -0
  16. package/dist/report-before-glyph-compress.html +37 -0
  17. package/dist/report-brown-ts-target-es5.html +37 -0
  18. package/dist/report-dev-orig-no-babel.html +37 -0
  19. package/dist/report-synth.html +37 -0
  20. package/docker-build.sh +1 -0
  21. package/glyphs.json +1 -0
  22. package/index.js +27 -2
  23. package/{static-wrappers/license.js → license.js} +1 -1
  24. package/package.json +26 -29
  25. package/{src/plugin/abc_plugin.js → plugin.js} +31 -19
  26. package/src/api/abc_animation.js +1 -17
  27. package/src/api/abc_tablatures.js +144 -0
  28. package/src/api/abc_timing_callbacks.js +234 -116
  29. package/src/api/abc_tunebook.js +18 -67
  30. package/src/api/abc_tunebook_svg.js +38 -46
  31. package/src/data/abc_tune.js +232 -972
  32. package/src/data/deline-tune.js +199 -0
  33. package/src/edit/abc_editarea.js +112 -0
  34. package/src/edit/abc_editor.js +95 -221
  35. package/src/midi/abc_midi_create.js +48 -50
  36. package/src/parse/abc_common.js +0 -14
  37. package/src/parse/abc_parse.js +167 -1321
  38. package/src/parse/abc_parse_book.js +62 -0
  39. package/src/parse/abc_parse_directive.js +164 -41
  40. package/src/parse/abc_parse_header.js +116 -145
  41. package/src/parse/abc_parse_key_voice.js +26 -20
  42. package/src/parse/abc_parse_music.js +1337 -0
  43. package/src/parse/abc_tokenizer.js +21 -15
  44. package/src/parse/abc_transpose.js +3 -15
  45. package/src/parse/tune-builder.js +896 -0
  46. package/src/parse/wrap_lines.js +205 -453
  47. package/src/synth/abc_midi_flattener.js +1292 -0
  48. package/src/{midi → synth}/abc_midi_renderer.js +44 -17
  49. package/src/synth/abc_midi_sequencer.js +648 -0
  50. package/src/synth/active-audio-context.js +3 -14
  51. package/src/synth/cents-to-factor.js +10 -0
  52. package/src/synth/create-note-map.js +21 -32
  53. package/src/synth/create-synth-control.js +20 -103
  54. package/src/synth/create-synth.js +185 -77
  55. package/src/synth/download-buffer.js +7 -21
  56. package/src/synth/get-midi-file.js +13 -20
  57. package/src/synth/images/{loading.svg → loading.svg.js} +4 -0
  58. package/src/synth/images/loop.svg.js +65 -0
  59. package/src/synth/images/pause.svg.js +10 -0
  60. package/src/synth/images/play.svg.js +9 -0
  61. package/src/synth/images/{reset.svg → reset.svg.js} +5 -1
  62. package/src/synth/instrument-index-to-name.js +1 -16
  63. package/src/synth/load-note.js +37 -76
  64. package/src/synth/pitch-to-note-name.js +0 -15
  65. package/src/synth/pitches-to-perc.js +64 -0
  66. package/src/synth/place-note.js +78 -68
  67. package/src/synth/play-event.js +17 -18
  68. package/src/synth/register-audio-context.js +11 -23
  69. package/src/synth/sounds-cache.js +0 -15
  70. package/src/synth/supports-audio.js +9 -23
  71. package/src/synth/synth-controller.js +80 -49
  72. package/src/synth/synth-sequence.js +20 -34
  73. package/src/tablatures/instruments/guitar/guitar-fonts.js +19 -0
  74. package/src/tablatures/instruments/guitar/guitar-patterns.js +23 -0
  75. package/src/tablatures/instruments/guitar/tab-guitar.js +50 -0
  76. package/src/tablatures/instruments/string-patterns.js +277 -0
  77. package/src/tablatures/instruments/string-tablature.js +56 -0
  78. package/src/tablatures/instruments/tab-note.js +282 -0
  79. package/src/tablatures/instruments/tab-notes.js +41 -0
  80. package/src/tablatures/instruments/violin/tab-violin.js +47 -0
  81. package/src/tablatures/instruments/violin/violin-fonts.js +19 -0
  82. package/src/tablatures/instruments/violin/violin-patterns.js +23 -0
  83. package/src/tablatures/tab-absolute-elements.js +310 -0
  84. package/src/tablatures/tab-common.js +29 -0
  85. package/src/tablatures/tab-renderer.js +243 -0
  86. package/src/tablatures/transposer.js +110 -0
  87. package/src/test/abc_midi_lint.js +5 -22
  88. package/src/test/abc_midi_sequencer_lint.js +11 -14
  89. package/src/test/abc_parser_lint.js +136 -32
  90. package/src/test/abc_vertical_lint.js +94 -32
  91. package/src/test/rendering-lint.js +38 -5
  92. package/src/write/abc_absolute_element.js +112 -120
  93. package/src/write/abc_abstract_engraver.js +102 -253
  94. package/src/write/abc_beam_element.js +30 -290
  95. package/src/write/abc_brace_element.js +12 -121
  96. package/src/write/abc_create_clef.js +21 -32
  97. package/src/write/abc_create_key_signature.js +8 -26
  98. package/src/write/abc_create_note_head.js +107 -0
  99. package/src/write/abc_create_time_signature.js +2 -21
  100. package/src/write/abc_crescendo_element.js +3 -50
  101. package/src/write/abc_decoration.js +7 -30
  102. package/src/write/abc_dynamic_decoration.js +3 -37
  103. package/src/write/abc_ending_element.js +1 -57
  104. package/src/write/abc_engraver_controller.js +111 -234
  105. package/src/write/abc_glyphs.js +9 -19
  106. package/src/write/abc_relative_element.js +57 -97
  107. package/src/write/abc_renderer.js +10 -832
  108. package/src/write/abc_spacing.js +0 -15
  109. package/src/write/abc_staff_group_element.js +14 -349
  110. package/src/write/abc_tempo_element.js +9 -117
  111. package/src/write/abc_tie_element.js +5 -68
  112. package/src/write/abc_triplet_element.js +6 -124
  113. package/src/write/abc_voice_element.js +7 -222
  114. package/src/write/add-chord.js +103 -0
  115. package/src/write/add-text-if.js +33 -0
  116. package/src/write/bottom-text.js +79 -0
  117. package/src/write/calcHeight.js +17 -0
  118. package/src/write/classes.js +100 -0
  119. package/src/write/draw/absolute.js +68 -0
  120. package/src/write/draw/beam.js +56 -0
  121. package/src/write/draw/brace.js +106 -0
  122. package/src/write/draw/crescendo.js +38 -0
  123. package/src/write/draw/debug-box.js +8 -0
  124. package/src/write/draw/draw.js +56 -0
  125. package/src/write/draw/dynamics.js +20 -0
  126. package/src/write/draw/ending.js +46 -0
  127. package/src/write/draw/group-elements.js +66 -0
  128. package/src/write/draw/horizontal-line.js +25 -0
  129. package/src/write/draw/non-music.js +50 -0
  130. package/src/write/draw/print-line.js +24 -0
  131. package/src/write/draw/print-path.js +7 -0
  132. package/src/write/draw/print-stem.js +30 -0
  133. package/src/write/draw/print-symbol.js +59 -0
  134. package/src/write/draw/print-vertical-line.js +18 -0
  135. package/src/write/draw/relative.js +77 -0
  136. package/src/write/draw/round-number.js +5 -0
  137. package/src/write/draw/selectables.js +59 -0
  138. package/src/write/draw/separator.js +16 -0
  139. package/src/write/draw/set-paper-size.js +45 -0
  140. package/src/write/{sprintf.js → draw/sprintf.js} +0 -0
  141. package/src/write/draw/staff-group.js +226 -0
  142. package/src/write/draw/staff-line.js +9 -0
  143. package/src/write/draw/staff.js +33 -0
  144. package/src/write/draw/tab-line.js +40 -0
  145. package/src/write/draw/tempo.js +45 -0
  146. package/src/write/draw/text.js +71 -0
  147. package/src/write/draw/tie.js +97 -0
  148. package/src/write/draw/triplet.js +46 -0
  149. package/src/write/draw/voice.js +102 -0
  150. package/src/write/format-jazz-chord.js +15 -0
  151. package/src/write/free-text.js +41 -0
  152. package/src/write/get-font-and-attr.js +37 -0
  153. package/src/write/get-text-size.js +56 -0
  154. package/src/write/highlight.js +11 -0
  155. package/src/write/layout/VoiceElements.js +121 -0
  156. package/src/write/layout/beam.js +213 -0
  157. package/src/write/layout/get-left-edge-of-staff.js +56 -0
  158. package/src/write/layout/getBarYAt.js +6 -0
  159. package/src/write/layout/layout.js +94 -0
  160. package/src/write/layout/setUpperAndLowerElements.js +232 -0
  161. package/src/write/layout/staffGroup.js +146 -0
  162. package/src/write/layout/triplet.js +75 -0
  163. package/src/write/layout/voice.js +137 -0
  164. package/src/write/selection.js +188 -70
  165. package/src/write/separator.js +10 -0
  166. package/src/write/set-class.js +21 -0
  167. package/src/write/subtitle.js +12 -0
  168. package/src/write/svg.js +95 -43
  169. package/src/write/top-text.js +54 -0
  170. package/src/write/unhighlight.js +11 -0
  171. package/temp.txt +17 -0
  172. package/test.js +27 -64
  173. package/types/index.d.ts +1095 -0
  174. package/version.js +1 -1
  175. package/.babelrc +0 -5
  176. package/.eslintrc +0 -3
  177. package/.gitmodules +0 -3
  178. package/abcjs-midi.css +0 -166
  179. package/build-utils/loadPresets.js +0 -14
  180. package/build-utils/presets/webpack.analyze.js +0 -6
  181. package/build-utils/presets/webpack.optimize.js +0 -30
  182. package/build-utils/webpack.development.js +0 -14
  183. package/build-utils/webpack.production.js +0 -35
  184. package/deploy-docs.sh +0 -25
  185. package/docs/README.md +0 -33
  186. package/fix-versions.sh +0 -23
  187. package/mei.js +0 -43
  188. package/midi.js +0 -62
  189. package/src/api/abc_tunebook_midi.js +0 -116
  190. package/src/midi/abc_midi_controls.js +0 -701
  191. package/src/midi/abc_midi_flattener.js +0 -1119
  192. package/src/midi/abc_midi_js_preparer.js +0 -243
  193. package/src/midi/abc_midi_sequencer.js +0 -401
  194. package/src/midi/abc_midi_ui_generator.js +0 -86
  195. package/src/plugin/abc_plugin_midi.js +0 -220
  196. package/src/synth/images/loop.svg +0 -61
  197. package/src/synth/images/pause.svg +0 -6
  198. package/src/synth/images/play.svg +0 -5
  199. package/src/transform/abc2abc_write.js +0 -395
  200. package/static-wrappers/basic.js +0 -2
  201. package/static-wrappers/midi.js +0 -2
  202. package/static-wrappers/plugin-midi.js +0 -6
  203. package/static-wrappers/plugin.js +0 -6
  204. package/webpack.config.js +0 -29
@@ -0,0 +1,199 @@
1
+ function delineTune(inputLines, options) {
2
+ if (!options) options = {};
3
+ var lineBreaks = !!options.lineBreaks;
4
+ var outputLines = [];
5
+ var inMusicLine = false;
6
+ var currentMeter = [];
7
+ var currentKey = [];
8
+ var currentClef = [];
9
+ var currentVocalFont = [];
10
+ var currentGChordFont = [];
11
+ var currentTripletFont = [];
12
+ var currentAnnotationFont = [];
13
+ for (var i = 0; i < inputLines.length; i++) {
14
+ var inputLine = inputLines[i];
15
+ if (inputLine.staff) {
16
+ if (inMusicLine && !inputLine.vskip) {
17
+ var outputLine = outputLines[outputLines.length-1];
18
+ //findMismatchKeys(inputLine, outputLine, ["staff", "staffGroup"], "line", i)
19
+ for (var s = 0; s < outputLine.staff.length; s++) {
20
+ var inputStaff = inputLine.staff[s];
21
+ var outputStaff = outputLine.staff[s];
22
+ if (inputStaff) {
23
+ if (!objEqual(inputStaff.meter, currentMeter[s])) {
24
+ // The meter changed for this line, otherwise it wouldn't have been set
25
+ addMeterToVoices(inputStaff.meter, inputStaff.voices)
26
+ currentMeter[s] = inputStaff.meter;
27
+ delete inputStaff.meter;
28
+ }
29
+ if (!objEqual(inputStaff.key, currentKey[s])) {
30
+ addKeyToVoices(inputStaff.key, inputStaff.voices);
31
+ currentKey[s] = inputStaff.key;
32
+ delete inputStaff.key;
33
+ }
34
+ if (inputStaff.title)
35
+ outputStaff.abbrevTitle = inputStaff.title;
36
+ if (!objEqual(inputStaff.clef, currentClef[s])) {
37
+ addClefToVoices(inputStaff.clef, inputStaff.voices);
38
+ currentClef[s] = inputStaff.clef;
39
+ delete inputStaff.clef;
40
+ }
41
+ if (!objEqual(inputStaff.vocalfont, currentVocalFont[s])) {
42
+ addFontToVoices(inputStaff.vocalfont, inputStaff.voices, 'vocalfont')
43
+ currentVocalFont[s] = inputStaff.vocalfont;
44
+ delete inputStaff.vocalfont;
45
+ }
46
+ if (!objEqual(inputStaff.gchordfont, currentGChordFont[s])) {
47
+ addFontToVoices(inputStaff.gchordfont, inputStaff.voices, 'gchordfont')
48
+ currentGChordFont[s] = inputStaff.gchordfont;
49
+ delete inputStaff.gchordfont;
50
+ }
51
+ if (!objEqual(inputStaff.tripletfont, currentTripletFont[s])) {
52
+ addFontToVoices(inputStaff.tripletfont, inputStaff.voices, 'tripletfont')
53
+ currentTripletFont[s] = inputStaff.tripletfont;
54
+ delete inputStaff.tripletfont;
55
+ }
56
+ if (!objEqual(inputStaff.annotationfont, currentAnnotationFont[s])) {
57
+ addFontToVoices(inputStaff.annotationfont, inputStaff.voices, 'annotationfont')
58
+ currentAnnotationFont[s] = inputStaff.annotationfont;
59
+ delete inputStaff.annotationfont;
60
+ }
61
+ }
62
+ //findMismatchKeys(inputStaff, outputStaff, ["voices", "title", "abbrevTitle", "barNumber", "meter", "key", "clef", "vocalfont", "gchordfont", "tripletfont", "annotationfont"], "staff", i + ' ' + s)
63
+ if (inputStaff) {
64
+ for (var v = 0; v < outputStaff.voices.length; v++) {
65
+ var outputVoice = outputStaff.voices[v];
66
+ var inputVoice = inputStaff.voices[v];
67
+ if (lineBreaks)
68
+ outputVoice.push({el_type: "break"});
69
+ if (inputVoice)
70
+ outputStaff.voices[v] = outputVoice.concat(inputVoice)
71
+ }
72
+ }
73
+ }
74
+ } else {
75
+ for (var ii = 0; ii < inputLine.staff.length; ii++) {
76
+ currentKey[ii] = inputLine.staff[ii].key;
77
+ currentMeter[ii] = inputLine.staff[ii].meter;
78
+ currentClef[ii] = inputLine.staff[ii].clef;
79
+ }
80
+ // copy this because we are going to change it and we don't want to change the original.
81
+ outputLines.push(cloneLine(inputLine));
82
+ }
83
+ inMusicLine = true;
84
+ } else {
85
+ inMusicLine = false;
86
+ outputLines.push(inputLine);
87
+ }
88
+ }
89
+ return outputLines;
90
+ }
91
+ // function findMismatchKeys(input, output, ignore, context, context2) {
92
+ // if (!input) {
93
+ // return;
94
+ // }
95
+ // var outputKeys = Object.keys(output);
96
+ // var inputKeys = Object.keys(input);
97
+ // for (var ii = 0; ii < ignore.length; ii++) {
98
+ // if (outputKeys.indexOf(ignore[ii]) >= 0) {
99
+ // outputKeys.splice(outputKeys.indexOf(ignore[ii]), 1);
100
+ // }
101
+ // if (inputKeys.indexOf(ignore[ii]) >= 0) {
102
+ // inputKeys.splice(inputKeys.indexOf(ignore[ii]), 1);
103
+ // }
104
+ // }
105
+ // if (inputKeys.join(",") !== outputKeys.join(",")) {
106
+ // console.log("keys mismatch "+context + ' ' + context2, input, output);
107
+ // }
108
+ // for (var k = 0; k < inputKeys.length; k++) {
109
+ // var key = inputKeys[k];
110
+ // if (ignore.indexOf(key) < 0) {
111
+ // var inputValue = JSON.stringify(input[key], replacer);
112
+ // var outputValue = JSON.stringify(output[key], replacer);
113
+ // if (inputValue !== outputValue)
114
+ // console.log("value mismatch "+context + ' ' + context2 + ' ' + key, inputValue, outputValue)
115
+ // }
116
+ // }
117
+ // }
118
+ function replacer(key, value) {
119
+ // Filtering out properties
120
+ if (key === 'abselem') {
121
+ return 'abselem';
122
+ }
123
+ return value;
124
+ }
125
+
126
+ function addMeterToVoices(meter, voices) {
127
+ meter.el_type = "meter";
128
+ meter.startChar = -1;
129
+ meter.endChar = -1;
130
+ for (var i = 0; i < voices.length; i++) {
131
+ voices[i].unshift(meter);
132
+ }
133
+ }
134
+
135
+ function addKeyToVoices(key, voices) {
136
+ key.el_type = "key";
137
+ key.startChar = -1;
138
+ key.endChar = -1;
139
+ for (var i = 0; i < voices.length; i++) {
140
+ voices[i].unshift(key);
141
+ }
142
+ }
143
+
144
+ function addClefToVoices(clef, voices) {
145
+ clef.el_type = "clef";
146
+ clef.startChar = -1;
147
+ clef.endChar = -1;
148
+ for (var i = 0; i < voices.length; i++) {
149
+ voices[i].unshift(clef);
150
+ }
151
+ }
152
+
153
+ function addFontToVoices(font, voices, type) {
154
+ font.el_type = "font";
155
+ font.type = type;
156
+ font.startChar = -1;
157
+ font.endChar = -1;
158
+ for (var i = 0; i < voices.length; i++) {
159
+ voices[i].unshift(font);
160
+ }
161
+ }
162
+
163
+ function objEqual(input, output) {
164
+ if (!input)
165
+ return true; // the default is whatever the old output is.
166
+ var inputValue = JSON.stringify(input, replacer);
167
+ var outputValue = JSON.stringify(output, replacer);
168
+ return inputValue === outputValue;
169
+ }
170
+
171
+ function cloneLine(line) {
172
+ var output = {};
173
+ var keys = Object.keys(line);
174
+ for (var i = 0; i < keys.length; i++) {
175
+ if (keys[i] !== "staff")
176
+ output[keys[i]] = line[keys[i]];
177
+ else {
178
+ output.staff = [];
179
+ for (var j = 0; j < line.staff.length; j++) {
180
+ var staff = {};
181
+ var keys2 = Object.keys(line.staff[j]);
182
+ for (var k = 0; k < keys2.length; k++) {
183
+ if (keys2[k] !== "voices")
184
+ staff[keys2[k]] = line.staff[j][keys2[k]];
185
+ else {
186
+ staff.voices = [];
187
+ for (var v = 0; v < line.staff[j].voices.length; v++) {
188
+ staff.voices.push([].concat(line.staff[j].voices[v]));
189
+ }
190
+ }
191
+ }
192
+ output.staff.push(staff)
193
+ }
194
+ }
195
+ }
196
+ return output;
197
+ }
198
+
199
+ module.exports = delineTune;
@@ -0,0 +1,112 @@
1
+ // abc_editor.js
2
+
3
+ // window.ABCJS.Editor is the interface class for the area that contains the ABC text. It is responsible for
4
+ // holding the text of the tune and calling the parser and the rendering engines.
5
+ //
6
+ // EditArea is an example of using a textarea as the control that is shown to the user. As long as
7
+ // the same interface is used, window.ABCJS.Editor can use a different type of object.
8
+ //
9
+ // EditArea:
10
+ // - constructor(textareaid)
11
+ // This contains the id of a textarea control that will be used.
12
+ // - addSelectionListener(listener)
13
+ // A callback class that contains the entry point fireSelectionChanged()
14
+ // - addChangeListener(listener)
15
+ // A callback class that contains the entry point fireChanged()
16
+ // - getSelection()
17
+ // returns the object { start: , end: } with the current selection in characters
18
+ // - setSelection(start, end)
19
+ // start and end are the character positions that should be selected.
20
+ // - getString()
21
+ // returns the ABC text that is currently displayed.
22
+ // - setString(str)
23
+ // sets the ABC text that is currently displayed, and resets the initialText variable
24
+ // - getElem()
25
+ // returns the textarea element
26
+ // - string initialText
27
+ // Contains the starting text. This can be compared against the current text to see if anything changed.
28
+ //
29
+
30
+ // Polyfill for CustomEvent for old IE versions
31
+ try {
32
+ if (typeof window.CustomEvent !== "function") {
33
+ var CustomEvent = function (event, params) {
34
+ params = params || {bubbles: false, cancelable: false, detail: undefined};
35
+ var evt = document.createEvent('CustomEvent');
36
+ evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
37
+ return evt;
38
+ };
39
+ CustomEvent.prototype = window.Event.prototype;
40
+ window.CustomEvent = CustomEvent;
41
+ }
42
+ } catch (e) {
43
+ // if we aren't in a browser, this code will crash, but it is not needed then either.
44
+ }
45
+
46
+ var EditArea = function(textareaid) {
47
+ this.textarea = document.getElementById(textareaid);
48
+ this.initialText = this.textarea.value;
49
+ this.isDragging = false;
50
+ }
51
+
52
+ EditArea.prototype.addSelectionListener = function(listener) {
53
+ this.textarea.onmousemove = function(ev) {
54
+ if (this.isDragging)
55
+ listener.fireSelectionChanged();
56
+ };
57
+ };
58
+
59
+ EditArea.prototype.addChangeListener = function(listener) {
60
+ this.changelistener = listener;
61
+ this.textarea.onkeyup = function() {
62
+ listener.fireChanged();
63
+ };
64
+ this.textarea.onmousedown = function() {
65
+ this.isDragging = true;
66
+ listener.fireSelectionChanged();
67
+ };
68
+ this.textarea.onmouseup = function() {
69
+ this.isDragging = false;
70
+ listener.fireChanged();
71
+ };
72
+ this.textarea.onchange = function() {
73
+ listener.fireChanged();
74
+ };
75
+ };
76
+
77
+ //TODO won't work under IE?
78
+ EditArea.prototype.getSelection = function() {
79
+ return {start: this.textarea.selectionStart, end: this.textarea.selectionEnd};
80
+ };
81
+
82
+ EditArea.prototype.setSelection = function(start, end) {
83
+ if(this.textarea.setSelectionRange)
84
+ this.textarea.setSelectionRange(start, end);
85
+ else if(this.textarea.createTextRange) {
86
+ // For IE8
87
+ var e = this.textarea.createTextRange();
88
+ e.collapse(true);
89
+ e.moveEnd('character', end);
90
+ e.moveStart('character', start);
91
+ e.select();
92
+ }
93
+ this.textarea.focus();
94
+ };
95
+
96
+ EditArea.prototype.getString = function() {
97
+ return this.textarea.value;
98
+ };
99
+
100
+ EditArea.prototype.setString = function(str) {
101
+ this.textarea.value = str;
102
+ this.initialText = this.getString();
103
+ if (this.changelistener) {
104
+ this.changelistener.fireChanged();
105
+ }
106
+ };
107
+
108
+ EditArea.prototype.getElem = function() {
109
+ return this.textarea;
110
+ };
111
+
112
+ module.exports = EditArea;