Quill 带Alpine Js的羽毛笔工具栏选项
大家好,我希望你们能想出一些办法 我不熟悉Alpine JS,但因为我需要在我有Livewire的视图上使用Quill,所以这个解决方案似乎很有效。我需要启用一些额外的工具栏选项,如第二个脚本(代码块、图像、视频等):Quill 带Alpine Js的羽毛笔工具栏选项,quill,alpine.js,Quill,Alpine.js,大家好,我希望你们能想出一些办法 我不熟悉Alpine JS,但因为我需要在我有Livewire的视图上使用Quill,所以这个解决方案似乎很有效。我需要启用一些额外的工具栏选项,如第二个脚本(代码块、图像、视频等): {!!$body!!} 以下是我需要如何配置纬管: <script> var toolbarOptions = [ ['bold', 'italic', 'underline', 'strik
{!!$body!!}
以下是我需要如何配置纬管:
<script>
var toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block'],
[{ 'header': 1 }, { 'header': 2 }], // custom button values
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
// superscript/subscript
// outdent/indent
// text direction
[{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[ 'link', 'image', 'video'], // add's image support
[{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
[{ 'align': [] }],
['clean'] // remove formatting button
];
var quill = new Quill('#editor', {
modules: {
toolbar: toolbarOptions
},
theme: 'snow'
});
</script>
变量工具栏选项=[
['bold'、'italic'、'underline'、'strike'],//切换按钮
['blockquote','code block'],
[{'header':1},{'header':2}],//自定义按钮值
[{'list':'ordered'},{'list':'bullet'}],
//上标/下标
//凸出/缩进
//文本方向
[{'size':['small',false',large',mage']},//自定义下拉列表
[{'header':[1,2,3,4,5,6,false]},
[‘链接’、‘图像’、‘视频’],//添加的图像支持
[{'color':[]},{'background':[]}],//主题中带有默认值的下拉列表
[{'align':[]}],
['clean']//删除格式化按钮
];
var quill=新的quill(“#编辑器”{
模块:{
工具栏:工具栏选项
},
主题:“雪”
});
codepen将有助于调试您的问题
<script>
var toolbarOptions = [
['bold', 'italic', 'underline', 'strike'], // toggled buttons
['blockquote', 'code-block'],
[{ 'header': 1 }, { 'header': 2 }], // custom button values
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
// superscript/subscript
// outdent/indent
// text direction
[{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
[ 'link', 'image', 'video'], // add's image support
[{ 'color': [] }, { 'background': [] }], // dropdown with defaults from theme
[{ 'align': [] }],
['clean'] // remove formatting button
];
var quill = new Quill('#editor', {
modules: {
toolbar: toolbarOptions
},
theme: 'snow'
});
</script>