ckeditor5 icon indicating copy to clipboard operation
ckeditor5 copied to clipboard

when editing lots of content ,will lag and be very slow in Vue2

Open NorthWind17 opened this issue 1 year ago • 5 comments

editing lots of content, the editor will lag and be very slow in Vue2 "vue": "^2.7.14", "@ckeditor/ckeditor5-vue2": "^3.0.1", "ckeditor5-custom-build": "file:ckeditor5", <ckeditor ref="ckeditor" :value="editorData" :editor="editor" :config="editorConfig" :disabled="!isEdit" @ready="onReady" @input="onEditorInput" @destroy="onEditorDestroy" @blur="onBlurFn" ></ckeditor> import CKEditor from '@ckeditor/ckeditor5-vue2' import Editor from 'ckeditor5-custom-build/build/ckeditor'

but if i use ClassicEditor.create(document.querySelector('.stEditorCopy'), config) .then((editor) => { window.editor = editor }) .catch((error) => { console.error('Oops, something went wrong!') console.error( 'Please, report the following error on https://github.com/ckeditor/ckeditor5/issues with the build id and the error stack trace:' ) console.warn('Build id: w2x4hsrl3dlt-xws7pn8ntdyc') console.error(error) }) Having the same amount of content won't lag and slow,This is strange

NorthWind17 avatar Jun 04 '24 07:06 NorthWind17

Hi! We would need additional information. The above examples show a bit of apples to oranges comparison. If, for example, @input="onEditorInput" does some heavy operation, it can block the editor.

Witoso avatar Jun 04 '24 08:06 Witoso

Hi! We would need additional information. The above examples show a bit of apples to oranges comparison. If, for example, @input="onEditorInput" does some heavy operation, it can block the editor.

onEditorInput(html) { this.$emit('update:editorHtml', html) this.$emit('change', html) }, This is the only operation ,

I delete the operation, still lag。how should I show you more code?

NorthWind17 avatar Jun 04 '24 09:06 NorthWind17

Hi! We would need additional information. The above examples show a bit of apples to oranges comparison. If, for example, @input="onEditorInput" does some heavy operation, it can block the editor.

I have built a simple project that can reproduce this problem ,address is [email protected]:NorthWind17/cktest.git

NorthWind17 avatar Jun 05 '24 02:06 NorthWind17

Hi! We would need additional information. The above examples show a bit of apples to oranges comparison. If, for example, @input="onEditorInput" does some heavy operation, it can block the editor.

i use this <script src="./ckeditor5/build/ckeditor.js"></script> ClassicEditor.create(document.querySelector('.stEditorCopy'), config) .then((editor) => { window.editor = editor }) .catch((error) => { console.error('Oops, something went wrong!') console.error( 'Please, report the following error on https://github.com/ckeditor/ckeditor5/issues with the build id and the error stack trace:' ) console.warn('Build id: w2x4hsrl3dlt-xws7pn8ntdyc') console.error(error) }) if i write editor.model.document.on('change:data', () => { console.log('==', editor.getData()) }),it will lag and slow,If don't write, it's okay

NorthWind17 avatar Jun 05 '24 04:06 NorthWind17

We have the same issue in Angular. Repro is very simple, once you get pages of content editor becomes very laggy. The more content, the slow typing gets. Eventually, if you add even more content we get a Chrome out of memory crash.

I created a new angular project with just a plain vanilla CKEditor (no add-ons, etc).

Relevant code:

app.component.html <ckeditor [editor]="Editor" data="

Hello, world!

">

app.module.ts import { CKEditorModule } from '@ckeditor/ckeditor5-angular';

... imports: [ CKEditorModule, ...

Copy/paste numerous pages of text into the editor. The more you paste, the slower it gets.

MikeDoctorNow avatar Jun 28 '24 16:06 MikeDoctorNow

There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.

CKEditorBot avatar Jun 28 '25 23:06 CKEditorBot

We've closed your issue due to inactivity. We understand that the issue may still be relevant. If so, feel free to open a new one (and link this issue to it).

CKEditorBot avatar Jul 29 '25 23:07 CKEditorBot