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() {
.component('annotation', annotationComponent())
.component('markdown', {
bindings: {
textClass: '<?',
customTextClass: '<?',
},
});
});
......@@ -1055,7 +1055,7 @@ describe('annotation', function() {
fakeAnnotationUI.isHiddenByModerator.returns(true);
var el = createDirective(ann).element;
assert.deepEqual(el.find('markdown').controller('markdown'), {
textClass: {
customTextClass: {
'annotation-body is-hidden': true,
},
});
......
......@@ -165,9 +165,9 @@ module.exports = function($sanitize) {
restrict: 'E',
scope: {
customTextClass: '<?',
readOnly: '<',
text: '<?',
textClass: '<?',
onEditText: '&',
},
template: require('../templates/markdown.html'),
......
......@@ -254,8 +254,8 @@ describe('markdown', function () {
describe('custom text class', function () {
it('should apply custom text class to text container', function () {
var editor = util.createDirective(document, 'markdown', {
customTextClass: 'fancy-effect',
readOnly: true,
textClass: 'fancy-effect',
});
var viewEl = viewElement(editor);
assert.include(viewEl.className, 'fancy-effect');
......
......@@ -82,7 +82,7 @@
overflow-hysteresis="20"
content-data="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)"
read-only="!vm.editing()">
</markdown>
......
......@@ -17,6 +17,6 @@
ng-show="showEditor()"
ng-click="$event.stopPropagation()"></textarea>
<div class="markdown-body js-markdown-preview"
ng-class="(preview && 'markdown-preview') || textClass"
ng-class="(preview && 'markdown-preview') || customTextClass"
ng-dblclick="togglePreview()"
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