我正在尝试通过其 Angularjs 模块ng-showdown使用堆栈而不是流降价编辑器摊牌
一切都很好,但包含的图像是它们的实际/原始大小。
如何调整它们的大小以适合文本?
下面给出的是一个显示相同问题的假人。
非常感谢!!!
<html ng-app="theShowdown">
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular-route.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular-animate.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/1.2.1/ui-bootstrap-tpls.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.3.0/showdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.5.0/angular-sanitize.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ng-showdown/1.1.0/ng-showdown.min.js"></script>
<script>
var theShowdown = angular.module('theShowdown', ['ngRoute', 'ngSanitize', 'ngAnimate', 'ui.bootstrap', 'ng-showdown']);
theShowdown.config(function() {
})
theShowdown.controller('theMain', function($scope, $showdown) {
$scope.mymarkdown = `**Hello** _Stackover Flow_ ![Showdown][sd-logo]
[sd-logo]: http://logz.io/wp-content/uploads/2016/02/stack-overflow-logo.png`;
var htmlValue = $showdown.makeHtml($scope.mymarkdown)
})
</script>
</head>
<body ng-controller="theMain">
<p markdown-to-html="mymarkdown"></p>
<textarea rows="4" cols="150" ng-model="mymarkdown"></textarea>
</body>
</html>