Cannot insert link by insertEmbed API
See original GitHub issueI cannot insert link by insertEmbed API (version 1.3.7).
<link href="https://cdn.bootcdn.net/ajax/libs/quill/1.3.7/quill.snow.min.css" rel="stylesheet">
<div id="editor">
<p>Hello World!</p>
</div>
<script src="https://cdn.bootcdn.net/ajax/libs/quill/1.3.7/quill.min.js"></script>
<script>
var editor = new Quill('#editor', { theme: 'snow' });
editor.insertEmbed(0, 'image', 'https://www.baidu.com/img/flexible/logo/pc/result.png', 'api'); // it works
editor.insertEmbed(1, 'link', { href: 'https://www.google.com', innerText: 'google' }, 'api'); // not works
</script>
Issue Analytics
- State:
- Created 3 years ago
- Comments:6
Top Results From Across the Web
Insert a link in a specific index in quill editor - Stack Overflow
But i am getting this error , Cannot read property 'dangerouslyPasteHTML' of undefined. But i have defined the editor already. IS there a...
Read more >API - Quill Rich Text Editor
insertEmbed. Insert embedded content into the editor, returning a Delta representing the change. Source may be "user" , "api" , or "silent" ....
Read more >Insert a video from YouTube or another site - Microsoft Support
On the toolbar ribbon, select the Insert tab, select Video, and then select Online Video. The Insert Video dialog box opens. Paste the...
Read more >Insert/Embed other file formats like .xlsx and .docx (but not ...
sql, .xlsx, .txt, .docx, etc. I believe I can achieve this by [text link](absolute file path), but can't make it work for a...
Read more >Cloning Medium with Parchment · Quill官方中文文档 - 看云
开发者可以通过简单的API来控制编辑器的内容。 ... Block blots cannot. ... Our click handler calls insertEmbed() , which does not as convienently determine, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
While I do not know if Quill supports inserting a link using the
insertEmbed
method, it does support inserting a link using theinsertText
method.Here’s the related
insertText
API:Found this example under docs for
find
.I have tested with version 1.3.7 and it works.
make sure you have registered the insert class correctly
the quill will find your blots in all registered blots firstly