这是我的夏季笔记配置
$('.summernote-block').summernote({
height: 250,
focus: true,
toolbar: [
// [groupName, [list of button]]
['insert', ['link', 'picture','videoAttributes','media', 'video', 'table', 'hr']],
['style', ['bold', 'italic', 'underline','style']],
['fontsize', ['fontsize']],
['color', ['color']],
['para', ['style', 'ul', 'ol', 'paragraph']],
['height', ['height']],
['view', ['fullscreen']]
],
popover: {
airMode: true,
image: [
['imagesize', ['imageSize100', 'imageSize50', 'imageSize25']],
['float', ['floatLeft', 'floatRight', 'floatNone']],
['remove', ['removeMedia']]
],
video: [
['providers', ['YouTube', 'Vimeo', 'Vine', 'Instagram', 'DailyMotion', 'Youku']]
],
link: [
['link', ['linkDialogShow', 'unlink']]
],
air: [
['color', ['color']],
['font', ['bold', 'underline', 'clear']],
['para', ['ul', 'paragraph']],
['table', ['table']],
['insert', ['link', 'picture','video']]
]
}
});
我在html文件的头标记中包含了什么。
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" />
<link href="https://use.fontawesome.com/releases/v5.0.6/css/all.css" rel="stylesheet">
<!-- CSS Files -->
<link href="../assets/css/bootstrap.min.css" rel="stylesheet" />
<link href="../assets/css/now-ui-dashboard.css?v=1.1.0" rel="stylesheet" />
<!-- CSS Just for demo purpose, don't include it in your project -->
<!-- <link href="../assets/demo/demo.css" rel="stylesheet" /> -->
<link href="../assets/js/plugins/summernote/summernote-bs4.css" rel="stylesheet">
也位于关闭主体的底部
<script src="../assets/js/core/jquery.min.js"></script>
<script src="../assets/js/core/popper.min.js"></script>
<script src="../assets/js/core/bootstrap.min.js"></script>
// <script src="../assets/js/plugins/perfect-scrollbar.jquery.min.js"></script>
<!-- include summernote css/js -->
<script src="../assets/js/plugins/summernote/summernote-bs4.min.js"></script>
<!-- Google Maps Plugin -->
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
<!-- Chart JS -->
<script src="../assets/js/plugins/chartjs.min.js"></script>
<!-- Notifications Plugin -->
<script src="../assets/js/plugins/bootstrap-notify.js"></script>
<!-- Control Center for Now Ui Dashboard: parallax effects, scripts for the example pages etc -->
<script src="../assets/js/now-ui-dashboard.min.js?v=1.1.0" type="text/javascript"></script>
<!-- Now Ui Dashboard DEMO methods, don't include it in your project! -->
<script src="../assets/demo/demo.js"></script>
<script>
$(document).ready(function() {
// Javascript method's body can be found in assets/js/demos.js
demo.initGoogleMaps();
});
</script>
我试图做什么?
1。我尝试将 summernote 包含script
标记替换为其他脚本,除了bootstrap
popper
或jQuery
2.T尝试使用summernote的简单配置,我删除所有配置并将此代码粘贴到下面
$(document).ready(function() {
$('#summernote').summernote();
});
3。我尝试在Summernote中使用一些视频插件。
还在 codepen 中,我看到了很多示例,这些示例粘贴视频时没有任何配置,并且在我的情况下包含相同的文件,并且效果很好。
拜托。
答案 0 :(得分:1)
在尝试插入视频时,您是否在控制台中看到任何错误(按F12键打开devtools)?您是否有任何可能会干扰的adblock软件或阻止youtube的代理?
我猜您是在本地运行的,是否可以将代码移到公共Web服务器上进行测试?这是与您看到的错误相关的一些帖子,也许会对您有所帮助...
File URL "Not allowed to load local resource" in the Internet Browser
Cannot open local file - Chrome: Not allowed to load local resource