Bug report
The position of the editor shifts with SideToc plugin.
edit mode
preview mode
It can be circumvented, though not perfectly, with the following logic
componentDidUpdate() {
const mdeLayout = document.querySelector(".mde-layout")!;
const editor = document.querySelector<HTMLDivElement>(".editor")!;
editor.style.width = mdeLayout.clientWidth - Settings.currentWidth + "px";
}
※ Settings
is Sidetoc’s class.
Is there a way to resolve this on the plugin side?
In Japanese
SideToc plugin にて
inkdrop.layouts.insertComponentToLayoutAfter(layoutName, "Editor", componentName);
で差し込んだ領域を使って段落を表示していますが
5.8.2 beta2 になってから editor の位置が左にずれるようになりました。
Environment
- Platform: macOS/Windows
- Platform version: macOS Sonoma 14.4/windows11
- App Version:5.6.8-beta2
How to reproduce
ipm install sidetoc