Word wrap in Preview mode

Hello,

Is there a way to enable word wrap in preview mode, see my example below, I’d love it if i could get the preview to wrap the same way the editor does:

Thanks,

Hi @Phillip_Easterbrook,

From your screenshot I could see the word-wrap is enabled.

What is not enabled or not available is the word wrap of the code preview.
Am I explaining your problem correctly?

Thanks

1 Like

Hello,

Yes that is correct, thanks for clarifying.

Hi,

I understand your preference.
I’m afraid that I would like to keep it simple and I would not like to add many settings for small behaviors.
But you can change the word wrap in the preview pane by making a simple plugin which applies a custom CSS.
The default preview theme is based on GitHub’s stylesheet which has white-space: pre. You can override it like so:

.editor .mde .mde-preview pre > code {
  white-space: pre-wrap !important;
}

It’d be nice to name it preview-word-wrap or something like that :slight_smile:
This documentation would be helpful to make plugins: https://doc.inkdrop.info/manual/plugin-word-count
Hope it helps.

Thanks for the suggestion.

1 Like

Hi,

Thanks, I will take a look.