martinkorelic / joplin-plugin-spoilers

Joplin plugin for creating inline spoilers and spoiler blocks.
29 stars 3 forks source link

Multi-line spoiler renders as not fully inline block #7

Closed deepspaceaxolotl closed 2 years ago

deepspaceaxolotl commented 2 years ago

When wrapping multiple lines of text in spoilers, I would expect it to be completely inline with any text outside of that spoiler. Instead, it renders as a block and text that comes before or after the spoilered text is rendered to the left or right of the block, as well as appearing in its own row if it overflows. For example:

Lorem %%ipsum dolor sit amet,
consectetur adipiscing elit,%% sed do %%eiusmod tempor incididunt ut labore et dolore magna aliqua.%% Ut enim ad minim veniam

Expected behavior (second paragraph is when spoilers are clicked):

multi-line_spoiler_1

How it works at the moment:

multi-line_spoiler_2

deepspaceaxolotl commented 2 years ago

Additionally, long words do not wrap like unspoilered text does, stretching the preview pane and making it scrollable.

martinkorelic commented 2 years ago

Additionally, long words do not wrap like unspoilered text does, stretching the preview pane and making it scrollable.

It seems that the long words problem can be solved in CCS with overflow-wrap: anywhere;, yet I am unsure if this may cause new problems.

As for the multi-line (in-line) spoilers I would need to look additionally in the code to see where the problem is.

deepspaceaxolotl commented 2 years ago

New update fixed the issue, works perfectly now! :D I'll close if that's all right, thank you!