我在我的 React Native 应用程序中使用 Quill 作为文本编辑器。我想在羽毛笔工具栏中添加自定义工具栏图标,有什么解决方案吗?我的代码是:
quill.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<style>
html,body {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
background-color:rgba(0, 0, 0, 0);
}
#editor {
height: calc(100% - 72px);
background-color:rgba(0, 0, 0, 0);
}
</style>
<link rel="stylesheet" type="text/css" href="https://cdn.quilljs.com/1.3.7/quill.snow.css"></link>
</head>
<body>
<div id="editor"></div>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/quill/1.3.7/quill.min.js"
integrity="sha512-P2W2rr8ikUPfa31PLBo5bcBQrsa+TNj8jiKadtaIrHQGMo6hQM6RdPjQYxlNguwHz8AwSQ28VkBK6kHBLgd/8g=="
crossorigin="anonymous"
referrerpolicy="no-referrer"
></script>
<script>
const quill = new Quill('#editor', window.options);
quill.on('text-change', function (delta, oldDelta, source) {
const html = document.querySelector('#editor').children[0].innerHTML; …
Run Code Online (Sandbox Code Playgroud)