add readonly mode for markdown property editor
This commit is contained in:
@@ -20,6 +20,10 @@
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wmd-panel .btn-toolbar-container[readonly] .btn-toolbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* unset the negative margin applied in button-groups.less to avoid flickering when hovering the button bar */
|
||||
.wmd-panel .btn-toolbar .btn-group>.btn+.btn {
|
||||
margin-left: 0;
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
<div class="wmd-panel" ng-controller="Umbraco.PropertyEditors.MarkdownEditorController">
|
||||
|
||||
<ng-form name="modelValueForm">
|
||||
<div id="wmd-button-bar-{{editorId}}"></div>
|
||||
<div class="btn-toolbar-container" id="wmd-button-bar-{{editorId}}" ng-attr-readonly="{{ readonly || undefined }}"></div>
|
||||
|
||||
<textarea name="modelValue" class="wmd-input" id="wmd-input-{{editorId}}" ng-model="model.value" ng-required="model.validation.mandatory"></textarea>
|
||||
<textarea
|
||||
name="modelValue"
|
||||
class="wmd-input"
|
||||
id="wmd-input-{{editorId}}"
|
||||
ng-model="model.value"
|
||||
ng-required="model.validation.mandatory"
|
||||
ng-readonly="readonly">
|
||||
</textarea>
|
||||
|
||||
<div class="wmd-panel wmd-preview" id="wmd-preview-{{editorId}}" ng-show="model.config.preview"></div>
|
||||
</ng-form>
|
||||
|
||||
Reference in New Issue
Block a user