Show story description markdown preview by default

Change-Id: I1567c12f7fcd39f058de723691eb30271d377d47
Task: 30800
Story: 2005596
This commit is contained in:
Fatema Sherif 2020-10-09 03:11:14 +02:00
parent 6f9f826d25
commit fe148b7d1e
3 changed files with 40 additions and 2 deletions

View File

@ -41,7 +41,8 @@ angular.module('sb.services')
link: function(scope, elem) {
scope.$watch('content', function(newVal) {
var html = md.render(newVal);
elem.html('<div>' + $sanitize(html) + '</div>');
elem.html('<div class="preview-story">' +
$sanitize(html) + '</div>');
}, true);
}
};

View File

@ -41,7 +41,7 @@
<div class="col-sm-10">
<textarea id="description"
class="form-control"
class="form-control new-textArea"
ng-model="story.description"
msd-elastic
required

View File

@ -43,4 +43,41 @@
#query .dropdown-menu > li{
padding-left:1rem;
}
.preview-story {
/* scroll bar shown if needed*/
max-height: 200px;
overflow-y: auto;
pre{
background-color: #fff;
border: none;
}
/* scroll bar styling*/
/* width */
&::-webkit-scrollbar {
width: 10px;
}
/* Track */
&::-webkit-scrollbar-track {
box-shadow: inset 0 0 5px grey;
border-radius: 10px;
}
/* Handle */
&::-webkit-scrollbar-thumb {
background: grey;
border-radius: 10px;
}
}
.new-textArea{
/* scroll bar shown if needed*/
max-height: 200px;
overflow-y: auto;
}