Skip to content

Commit 000703a

Browse files
committed
chore: no textarea compatibility for now... sry.
1 parent 7dfcb07 commit 000703a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

demo/demo.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ <h1>Mode-Changing demo</h1>
112112
</div>
113113
<div class="row" ng-controller="CodemirrorCtrl">
114114
<div class="col-md-12">
115-
<textarea ui-codemirror="cmOption" ng-model="cmModel"></textarea>
115+
<div ui-codemirror="cmOption" ng-model="cmModel"></div>
116116
</div>
117117
<div class="col-md-6">
118118
Mode : <select class="form-control" ng-model="mode" ng-options="m for m in modes" ng-change="modeChanged()"></select>

src/ui-codemirror.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ angular.module('ui.codemirror', [])
2626
value = iElement.text();
2727

2828
if (iElement[0].tagName === 'TEXTAREA') {
29-
codeMirror = window.CodeMirror.fromTextArea(iElement[0], {
30-
value: value
31-
});
29+
throw new Error('NOPE');
30+
// codeMirror = window.CodeMirror.fromTextArea(iElement[0], {
31+
// value: value
32+
// });
3233
} else {
3334
iElement.html('');
3435
codeMirror = new window.CodeMirror(function(cm_el) {

test/codemirror.spec.js

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ describe('uiCodemirror', function () {
6363

6464
shouldDestroyTest('an element', '<ui-codemirror></ui-codemirror>');
6565
shouldDestroyTest('an attribute', '<div ui-codemirror=""></div>');
66-
shouldDestroyTest('an attribute of a textearea', '<textarea ui-codemirror=""></textarea>');
6766

6867
});
6968

0 commit comments

Comments
 (0)