Show story description markdown preview by default
Change-Id: I1567c12f7fcd39f058de723691eb30271d377d47 Task: 30800 Story: 2005596
This commit is contained in:
parent
6f9f826d25
commit
fe148b7d1e
|
@ -41,7 +41,8 @@ angular.module('sb.services')
|
||||||
link: function(scope, elem) {
|
link: function(scope, elem) {
|
||||||
scope.$watch('content', function(newVal) {
|
scope.$watch('content', function(newVal) {
|
||||||
var html = md.render(newVal);
|
var html = md.render(newVal);
|
||||||
elem.html('<div>' + $sanitize(html) + '</div>');
|
elem.html('<div class="preview-story">' +
|
||||||
|
$sanitize(html) + '</div>');
|
||||||
}, true);
|
}, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
<textarea id="description"
|
<textarea id="description"
|
||||||
class="form-control"
|
class="form-control new-textArea"
|
||||||
ng-model="story.description"
|
ng-model="story.description"
|
||||||
msd-elastic
|
msd-elastic
|
||||||
required
|
required
|
||||||
|
|
|
@ -43,4 +43,41 @@
|
||||||
|
|
||||||
#query .dropdown-menu > li{
|
#query .dropdown-menu > li{
|
||||||
padding-left:1rem;
|
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;
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue