ozntel / oz-image-in-editor-obsidian

This Obsidian plugin to view Images, Transclusions, iFrames and PDF Files within the Editor without a necessity to switch to Preview.
339 stars 13 forks source link

How do I solve the problem of selecting text in WYSIWYG mode and not being able to position it? #28

Closed zhl111 closed 3 years ago

ozntel commented 3 years ago

I didn't understand your question, to be honest. Can you explain with an example and include some recording/screenshots so that I can check what the issue is? Btw WYSIWYG mode only includes additional CSS to the application when you turn on the settings. In case you have anything that doesn't work properly, you can overwrite the styling to ensure it works properly.

zhl111 commented 3 years ago

sorry。theme:California oast 动画

Mara-Li commented 3 years ago

Hello! As I said to Ozan on discord, you can't repear this behavior with CSS. It's because CodeMirror don't have a select and the active line (used in this snippet) is disabled when you select some text.

That's why the cm-formatting disappear. Also, more you have space difference between the two (active and non active) more the hightlight will be difficult to use. It's specially visible with links.

The only way in CSS, to have a better behavior is to minimize the space between the two mode. For example, in my snippet I totally disabled the rendering of link.

I dunno if it's possible to force the active line rendering with JS when the text is selected.


source