Summernote 它可能已被移动或删除(无法粘贴视频)
Summernote it may have been moved or deleted (can't paste video)
无法在 summernote js
中粘贴视频
这是我的 summernote 配置
$('.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 文件的 head 标签中包含的内容。
<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.I 尝试用 bootstrap
popper
或 [=17= 以外的其他脚本替换 summernote include script
标签]
2.T 尝试使用 summernote 的简单配置我删除所有配置并粘贴下面的代码
$(document).ready(function() {
$('#summernote').summernote();
});
3.I尝试使用summernote中的一些视频插件
另外,在 codepen 中,我看到了很多示例,它们在没有任何配置的情况下粘贴视频,并且包含相同的文件,就像我的情况一样,它工作得很好。
请帮忙。
尝试插入视频时,您是否在控制台中看到任何错误(按 F12 打开开发工具)?您是否有任何可能干扰 adblock 的软件或阻止 youtube 的代理?
我猜你是 运行 这个本地的,你能把你的代码移动到 public 网络服务器来测试吗?以下是一些与您看到的错误相关的帖子,也许它们会有所帮助...
无法在 summernote js
这是我的 summernote 配置
$('.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 文件的 head 标签中包含的内容。
<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.I 尝试用 bootstrap
popper
或 [=17= 以外的其他脚本替换 summernote include script
标签]
2.T 尝试使用 summernote 的简单配置我删除所有配置并粘贴下面的代码
$(document).ready(function() {
$('#summernote').summernote();
});
3.I尝试使用summernote中的一些视频插件
另外,在 codepen 中,我看到了很多示例,它们在没有任何配置的情况下粘贴视频,并且包含相同的文件,就像我的情况一样,它工作得很好。
请帮忙。
尝试插入视频时,您是否在控制台中看到任何错误(按 F12 打开开发工具)?您是否有任何可能干扰 adblock 的软件或阻止 youtube 的代理?
我猜你是 运行 这个本地的,你能把你的代码移动到 public 网络服务器来测试吗?以下是一些与您看到的错误相关的帖子,也许它们会有所帮助...