我遇到了一个问题,我正在为Froala编辑器正确加载 JS 和 CSS 文件,但由于某种原因,我相信某个地方是 jQuery 脚本,它没有采用我的表单并用正确的 CSS 样式替换它。
这是我的观点(#blog-editor 是我想使用编辑器的地方):
<html>
<head>
<% include ../partials/head %>
<script src="/js/froala_editor.min.js"></script>
</head>
<body>
<header>
<% include ../partials/header %>
</header>
<div class="grid grid-pad">
<div class="col-1-1">
<h1>Blog Create</h1>
<form action="/admin/posts/create" method="POST">
Title: <input type="text" name="title"><br>
Author:
<select name="author">
<option value="Author">Connor Phillips</option>
</select><br>
Category:
<select name="category">
<option value="Analytics/SEO/SEM">Analytics/SEO/SEM</option>
<option value="Advice">Advice</option>
<option value="Programming">Programming</option>
<option value="Thoughts">Thoughts</option>
</select><br>
Tagline: <input type="text" maxlength="160" name="tagline"><br>
Content:<br>
<textarea name="content" id="blog-editor" rows="10" cols="80">
</textarea><br>
Tags: <input type="text" name="tags"><br>
<input type="submit" value="Submit">
</form>
</div>
</div>
<script>
$(function() {
$('#blog-editor').editable()
});
</script>
<footer>
<% include ../partials/footer %>
</footer>
</body>
</html>