Open
Description
📝 Provide detailed reproduction steps (if any)
- Create an inline widget plugin based on the Implementing an inline widget guide
- Make the widget insert an SVG, for example, by using this code snippet:
const innerText = viewWriter.createRawElement( 'i', { id: 'foo-1234' }, function( domElement ) {
domElement.innerHTML = `
<svg fill="#000000" width="50px" height="50px" viewBox="-6.5 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path d="M9.281 9.688h2.406v2.406h-2.406v-2.406zM9.813 21.969l2.188 1.031-2.906 6.125-1.906-0.906z"></path>
</svg>
`;
} );
- Build the editor with the plugin included
- Try placing the selection after the inserted SVG
✔️ Expected result
The caret should appear to the right of the SVG, as is the case when inserting text via this method:
text.mov
❌ Actual result
You can't place the caret after the SVG. This example is from Google Chrome:
svg_chrome.mov
📃 Other details
- Browser: different browsers act differently in this case, see comment below for details
- OS: cross-OS
- First affected CKEditor version: N/A
- Installed CKEditor plugins: N/A
If you'd like to see this fixed sooner, add a 👍 reaction to this post.