我正在尝试实现引导-wysihtml5 5编辑器,但是没有一个按钮显示为样式:
我包括来自wysihtml5、引导-wysihtml5 5和官方自举文档的gitrepo下载的脚本。
jsFiddle
<?php
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>wysihtml5</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-theme.min.css" rel="stylesheet">
<link href="css/bootstrap-wysihtml5.css" rel="stylesheet">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
body {
padding-top: 70px;
}
</style>
</head>
<body>
<div class="container">
<div class="panel panel-primary">
<div class="panel-heading">
<h4 class="panel-title">wysihtml5</h4>
</div>
<div class="panel-body">
<form method="post" action="submit-content.php">
<div class="form-group">
<textarea id="wysihtml5" class="form-control" rows="20" placeholder="Enter text..."></textarea>
</div>
<div class="form-group text-right">
<button type="submit" class="btn btn-primary">Create Article</button>
</div>
</form>
</div>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/wysihtml5-0.3.0.min.js"></script>
<script src="js/bootstrap-wysihtml5.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#wysihtml5').wysihtml5();
});
</script>
</body>
</html>发布于 2014-04-10 12:08:57
这些按钮错过了btn-default类,因为它在Bootstrap 3中是必需的。
您可以为按钮如文档所示提供模板,也可以通过jQuery添加类。
或者更好地分叉项目并将其更新为引导3,然后考虑向原始存储库发出拉请求。
https://stackoverflow.com/questions/22987544
复制相似问题