MugishoMp / obsidian-editor-width-slider

With this plugin you can set the line width of the editor in obsidian.
MIT License
45 stars 4 forks source link

Do not work #3

Closed Asthestarsfalll closed 11 months ago

Asthestarsfalll commented 1 year ago

After I adjust the slider, the width of editor do not change.

MugishoMp commented 1 year ago

O, that's weird, which version of the app are you using?

Asthestarsfalll commented 1 year ago

1.3.5 on manjaro linux

MugishoMp commented 1 year ago

Do you know if this issue only persists in Manjaro Linux or also in windows or Mac?

leofdecarvalho commented 1 year ago

Same for me here. After I adjust the slider, the width of editor do not change. I'm using obsidian 1.3.7 in Windows 10

MugishoMp commented 1 year ago

Oh, okay. Thanks for letting me know. That's a problem. I will try to take a look at it later today. So sorry for the wait in advance.

leofdecarvalho commented 1 year ago

Seems that there is a "}" missing in the code below:

styleElement.innerText = body { --file-line-width: calc(700px + 10 * ${this.settings.sliderPercentage}px); ; Closing the body tag with "}" works for me.

MugishoMp commented 1 year ago

@leofdecarvalho Thank you very much for noticing finding the issue. @Asthestarsfalll Sorry that it took this long to get it fixed. But the issue as been addressed in the latest release. So please take a look at it: https://github.com/MugishoMp/obsidian-editor-width-slider/releases/tag/1.0.3

For now I will close this issue. But if any other similar issues arrive please feel free to reopen this issue!

wolsoot commented 1 year ago

This is still happening on Windows 10, Obsidian 1.4.5, obsidian-editor-width-slider 1.0.3. All other community plugins disabled, no community themes installed.

leofdecarvalho commented 1 year ago

the problem has returned for me too. I had added a "!important" flag in the body tag and it works again. Seems a css issue in the new versions.

styleElement.innerText = body { --file-line-width: calc(700px + 10 * ${this.settings.sliderPercentage}px) !important;}

MugishoMp commented 1 year ago

Hey, sorry for the late response @wolsoot, I havent been able to take the time to update obsidian yet so I was unaware of this issue. I'm happy to see that @leofdecarvalho was able to find the issue already. I'll try to release a patched version by the end of this day. Thank you @leofdecarvalho!