Closed rotoshine closed 11 years ago
Can you add a unit test ? (with Editor.getReadOnly
)
Shouldn't this be a readonly attribute?
Why not. You want to standardize it as well ?
I mean instead of doing <textarea ui-ace="{readOnly: true}">
shouldn't it be <textarea ui-ace readonly>
or in other words if (angular.isDefined(attrs.readonly)) { ...
Although It should probably be attrs.$observe('readonly')
or something similar.
Alright.
The same thing will work on Codemirror.
And in ui-map
readonly could directly disable all events and controls. Something like that :
{
// Event
draggable: false, zoomControl: false, scrollwheel: false, disableDoubleClickZoom: true,
// UI
disableDefaultUI: true
}
What you think ?
Sounds good to me, but I was at the very least primarily focused on form inputs since <textarea readonly>
is a valid HTML attribute, where as it's more ambiguous (but not necessarily a bad idea) on non-form elements.
add readOnly option.