首先,我是法国人,所以请为我糟糕的英语道歉,二十年前我也经历过一次严重的中风,所以对我来说理解新工具是相当困难的(尽管如此,我仍然有一些很好的 php 知识, html、mysql、css 和 javascript ),但我在理解鹅毛笔和模块的工作原理方面遇到了一些问题,例如,我想添加一个图像调整器模块,但我没有成功..有人可以帮助我,并显示我做这种事情的正确方法是什么? (用一段代码举例,应该很好uou)
提前非常感谢, 纪尧姆。
我在互联网上尝试了一些教程,但我没有成功/理解这些教程..所以我转向你。提前致谢。 纪尧姆。
大家好(当时我就想到了!) 这是我当前的代码:
<html>
<head>
<!-- Include stylesheet -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/quill.snow.css" rel="stylesheet" />
</head>
<div id="editor">
<p>Hello World!</p>
一些初始粗体文字
var 工具栏选项 = [ ['bold', 'italic', 'underline', 'strike'], // 切换按钮
['块引用', '代码块'],
`[{ 'header': 1 }, { 'header': 2 }],` // `custom button values`
[{ 'list': 'ordered'}, { 'list': 'bullet' }],
[{ 'script': 'sub'}, { 'script': 'super' }],
// superscript/subscript
[{ 'indent': '-1'}, { 'indent': '+1' }],
// 减少缩进/缩进
[{ 'direction': 'rtl' }],
// text direction
[{ 'size': ['small', false, 'large', 'huge'] }], // custom dropdown
[{ 'header': [1, 2, 3, 4, 5, 6, false] }],
`[ 'link', 'image', 'video', 'formula' ],` // `add's image support`
`[{ 'color': [] }, { 'background': [] }],` // `dropdown with defaults from theme`
[{'字体':[]}],
[{ '对齐': [] }],
`['clean']` // `remove formatting button`
];
var quill = new Quill('#editor', {
模块:{
工具栏:工具栏选项
},
图像调整大小:{},
主题:“雪”
});
函数 logHtmlContent() {
console.log(quill.root.innerHTML);
}
</body>
</html>
所以,除了调整大小模块之外,一切都正常,..如果您能帮忙? 提前谢谢了! 纪尧姆。