Disabling cursorToEnd?
Version
1.1.1
Test Environment
Firefox, Win10
Current Behavior
When I have markdown enabled as default in the editor then the window will automatically scroll to show the editor (if it needs to be scrolled to, to be seen). If I have WYSIWYG enabled as default then the window will not scroll to the editor.
My guess would be that cursorToEnd is true by default. How can I disable this?
Expected Behavior
I'd like the window not to scroll to the editor's position unless I ask it to.
I did not really understand your issue. Does scrolling automatically scroll to where the editor is? Or does the editor have an initial content and scroll to the end of the content?
Does scrolling automatically scroll to where the editor is?
Yes, it seems that the page automatically shows the editor when you have markdown enabled. It does not focus on the editor, just shows it.
Or does the editor have an initial content and scroll to the end of the content?
Yes here as well. The editor does have initial content and when shown in markdown-mode problem occurs. The problem does not occur in WYSIWYG-mode.
We do have the same issue when using the editor with a v-model. When the value of the editor is changed from the outside (e.g. when the database query is finished) the watcher for value triggers setValue() of the JS component with cursorToEnd = true. This causes the JS component to set the cursor which also scrolls down the page if the editor is not within the viewport.
Would it make sense to just pass cursorToEnd = false as default? That fixes it for me locally.