When I pasting some large image files It's vertical scrollbar moving back to the top always.
I want to fix my scrollbar at the cursor position.
How can I do it?
Video Link: https://youtu.be/Ezg_Pqq2vyE
I checked it and it has some other problem on my app.
But I have an question.
Is it possible to scroll down automatically accordingly it's cursor position when I pasting image.
Hi Kyung,
We have validated your requirement and your requirement, to scroll down automatically when an image is pasted in the Rich Text Editor can be achieved by using the “scrollIntoView” method with respective to the pasted image in the “imageUploadSuccess” event. We have prepared a sample for your reference.
Code Snippet:
|
<template> <div> <ejs-richtexteditor :toolbarSettings="toolbarSettings" :insertImageSettings="insertImageSettings" :imageUploadSuccess="imageUploadSuccessEvent"> </ejs-richtexteditor> </div> </template>
<script> import { RichTextEditorComponent, Toolbar, Link, Image, HtmlEditor, Table, QuickToolbar, PasteCleanup, } from "@syncfusion/ej2-vue-richtexteditor";
export default { . . . methods: { imageUploadSuccessEvent: function (args) { args.element.scrollIntoView(); }, }, data() { return { insertImageSettings: { saveUrl: https://ej2.syncfusion.com/services/api/uploadbox/Save, removeUrl: https://ej2.syncfusion.com/services/api/uploadbox/Remove, }, . . . }; }, provide: { richtexteditor: [ Toolbar, Link, Image, HtmlEditor, Table, QuickToolbar, PasteCleanup,], }, }; </script> |
Sample: https://codesandbox.io/s/thirsty-chaum-w476uf
Please check the above code snippet, the sample, and the documentation, and let us know if it resolves the issue on your end.
Regards,
Revanth