You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I changed the value outside of the editor, it did not update the actual text, inside the editor.
So i started to dig into the editor's source code and find the modelValue's watcher:
The issue now is when setting the value, we lose the cursor's position. So this could be a solution, to keep the editor's content up-to-date, even if we modify it from outside, while keeping the cursor's position:
Hi, and thanks for creating & sharing this project!
I find an issue while trying to replace line breaks (
\n
) to double spaces and\n
in the editor's model.The code looks like this:
When I changed the
value
outside of the editor, it did not update the actual text, inside the editor.So i started to dig into the editor's source code and find the modelValue's watcher:
Then I started to play, and remove the whole if-else logic to always reach the
simplemde.value
setter:The issue now is when setting the value, we lose the cursor's position.
So this could be a solution, to keep the editor's content up-to-date, even if we modify it from outside, while keeping the cursor's position:
What do you think? Can this be implemented in this repo? Will it cause this any other issue?
The text was updated successfully, but these errors were encountered: