Commit eb998744 authored by Robert Knight's avatar Robert Knight

Rename `textClass` input property for `<markdown>` component

Rename `textClass` input to `customTextClass` as per CR feedback.
parent 32e7f102
...@@ -120,7 +120,7 @@ describe('annotation', function() { ...@@ -120,7 +120,7 @@ describe('annotation', function() {
.component('annotation', annotationComponent()) .component('annotation', annotationComponent())
.component('markdown', { .component('markdown', {
bindings: { bindings: {
textClass: '<?', customTextClass: '<?',
}, },
}); });
}); });
...@@ -1055,7 +1055,7 @@ describe('annotation', function() { ...@@ -1055,7 +1055,7 @@ describe('annotation', function() {
fakeAnnotationUI.isHiddenByModerator.returns(true); fakeAnnotationUI.isHiddenByModerator.returns(true);
var el = createDirective(ann).element; var el = createDirective(ann).element;
assert.deepEqual(el.find('markdown').controller('markdown'), { assert.deepEqual(el.find('markdown').controller('markdown'), {
textClass: { customTextClass: {
'annotation-body is-hidden': true, 'annotation-body is-hidden': true,
}, },
}); });
......
...@@ -165,9 +165,9 @@ module.exports = function($sanitize) { ...@@ -165,9 +165,9 @@ module.exports = function($sanitize) {
restrict: 'E', restrict: 'E',
scope: { scope: {
customTextClass: '<?',
readOnly: '<', readOnly: '<',
text: '<?', text: '<?',
textClass: '<?',
onEditText: '&', onEditText: '&',
}, },
template: require('../templates/markdown.html'), template: require('../templates/markdown.html'),
......
...@@ -254,8 +254,8 @@ describe('markdown', function () { ...@@ -254,8 +254,8 @@ describe('markdown', function () {
describe('custom text class', function () { describe('custom text class', function () {
it('should apply custom text class to text container', function () { it('should apply custom text class to text container', function () {
var editor = util.createDirective(document, 'markdown', { var editor = util.createDirective(document, 'markdown', {
customTextClass: 'fancy-effect',
readOnly: true, readOnly: true,
textClass: 'fancy-effect',
}); });
var viewEl = viewElement(editor); var viewEl = viewElement(editor);
assert.include(viewEl.className, 'fancy-effect'); assert.include(viewEl.className, 'fancy-effect');
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
overflow-hysteresis="20" overflow-hysteresis="20"
content-data="vm.state().text"> content-data="vm.state().text">
<markdown text="vm.state().text" <markdown text="vm.state().text"
text-class="{'annotation-body is-hidden':vm.isHiddenByModerator()}" custom-text-class="{'annotation-body is-hidden':vm.isHiddenByModerator()}"
on-edit-text="vm.setText(text)" on-edit-text="vm.setText(text)"
read-only="!vm.editing()"> read-only="!vm.editing()">
</markdown> </markdown>
......
...@@ -17,6 +17,6 @@ ...@@ -17,6 +17,6 @@
ng-show="showEditor()" ng-show="showEditor()"
ng-click="$event.stopPropagation()"></textarea> ng-click="$event.stopPropagation()"></textarea>
<div class="markdown-body js-markdown-preview" <div class="markdown-body js-markdown-preview"
ng-class="(preview && 'markdown-preview') || textClass" ng-class="(preview && 'markdown-preview') || customTextClass"
ng-dblclick="togglePreview()" ng-dblclick="togglePreview()"
ng-show="!showEditor()"></div> ng-show="!showEditor()"></div>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment