How can I create a code-mirror instance?

Hello.
I want to show the user in one of my modals a little instance of the editor, but I have no idea of how to do it.
I don’t want to add stuff to the editor, I just want a mini-editor inside my modal so people can edit text with the same features than the normal editor.
Is this even possible>

I am noticing that a lot of this questions are going unanswered.
Is anyone watching this boards? Are they overloaded?

Is this the style of editor you’re looking for? Basically upon Obsidian’s own one.

Yes that is exactly what I’m looking for

After doing a research and exploring for a while, I haven’t found any satisfactory solution for this exact task, which you want to achieve. I havent quite understood, what kind of editor you want, like, if you want the exact Obsidian’s Live Preview Editor, then there is no direct way to do this, atleast I havent found one. But if you want a basic editor, then you can go with Codemirror. I personally felt it to complex and a lengthy process, and I was not sure if the end result would be worth it. Because I wanted a proper Live editor, just like the normal one, where users can paste images and documents directly.

Just sharing, incase if this helps : Obsidian Editor inside AddOrEditTaskModal · Issue #50 · tu2-atmanand/Task-Board · GitHub

Also here is something, you might wanna try : How to get Obsidian Editor inside Modal - #3 by unxok

Embeddable CM Markdown Editor

2 Likes

Not only can, I must do that because otherwise it will be too confusing for the end user.
Do you know how to use the same exact settings?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.