Persist Editor Layout Plugin

One last question. Which version of the plugin do you have installed? Because I've added the settings view for the plugin in version v1.1.0. Before the plugin had no settings and thus no dedicated entry in the settings view.
Otherwise there went something wrong I cannot explain... maybe a re-install of the plugin might help. Because there's no difference in the implementation between this plugin and my others.

v.1.1.1
Will do reinstall

no remedy after delete-quit-open-install-restart—just suspect a BIG diff tween Win & Mac apps…

Sorting the plugins by name would be another nice addition, it feels kinda chaotic at the moment.

1 Like

Thanks for this and your other great plugins!

It would be very natural to also have the context menu item show up from the editor, not just the note list. Your other extensions already provide that. Could you please add that to this extension as well?

Thank you so much for your feedback!

I've added the command to the editor context menu in the new verstion v1.1.2, I've just released.

But be aware that this is only available for the markdown editor view (editor, split view). The context menus for rendered markdown or the rich text editor can currently not be extended via the plugin API.

3 Likes

Great plugin! I raised this on GitHub, but perhaps it should be discussed here first - would it be possible to get the layout selection to kick in when a note is selected after a search? More details and a video of what I mean here: Layout is not set correctly on search · Issue #7 · benji300/joplin-persistent-layout · GitHub

Many thanks!

Thanks for your detailed error description. I can confirm the behavior for the layout:richtext.

But unfortunately I've no idea how to fix/workaround it. From my point of view it seems to be an issue in the App itself. It seems that the internal event onNoteSelectionChange is triggered twice after the global search is executed. See my comment on GitHub.

Thanks @benji300 - yes, I'd notice this "flicker" in the UI. @laurent is this a known limitation of the plugin architecture, or a bug, or...?

Small nitpick....

I can invoke the plugin from a note list. However, I can also select multiple notes from the list and click the button that appears for multi-note options.

I can't think of any use for that button. Can you remove it? It gives a false sense that something useful will happen when clicking it.

Sorry, I don't understand what you mean? Could you share a screenshot or something?

I can select more than one note in Joplin, from a notebook, search result, tag, etc.

When I do so I get a series of buttons. "Persist Editor Layout" is one of those buttons, but it doesn't achieve anything to click it (which view would it change each selected note to?).

My suggestion is to simply remove that button, and also the right-click context menu when more than one note is selected.

Ah okay... now I see.
In case of multiple notes are selected this button persists the current active layout for each of them.
Actually I'm using this functionality so I'm afraid that I can't remove the button.

Ok, now I'm confused. What do you mean it persists the "current active" layout? Isn't that just just the standard Joplin split view for notes in a list that are not selected / open? I thought the point of the attachment was to prevent Joplin from reverting to default for some notes.

Perhaps there some trick functionality I'm missing here!

Ah! I get it now. I see how this works. Although I can select multiple notes, whatever the view in my last current note's window was, will get applied to the notes I select. I wasn't aware I could do this.

Great plugin!

Right now the option is under Tools. Doesn't it make more sense under note

1 Like

I've changed it in the last version of the plugin.

1 Like

There is a new, completely revamped, version of the plugin:

Now it is possible to define your own (custom) tags for the specific layouts.
That means you don't have to use the predefined ones (e.g. layout:editor) anymore.
How this works you can find in the README.
But don`t worry, by default the old predefined labels are set in the options. So you should not notice any difference at first.

But there is a small disadvantage: I had to remove the command persistEditorLayout.
I just didn't find a suitable solution to implement it the correctly with the custom tags (which one to set? etc...).
But the app or external plugins offer enough possibilities to add tags to a note :wink:

It should be available in the App soon.

A new version of the plugin has just been released and published to the plugin repository.

:warning: CAUTION - Requires Joplin v1.8.2 or newer

Changed

  • Updated plugin API to version v1.8.2 ( registerSettings ) to support app version v2.2.4 or newer (see here for details)
2 Likes

@benji300 , thank you for your nice plugin. In my use cases, some of my notes are almost read-only. So, the plugin very fits my situations. If you have add an optional feature such as the following, it would make me happier. How do you think about it?

[Feature Request]

  • One more alternative for Default editor layout option. When a note without-persistent-layout is selected, the layout of the PREVIOUS note without-persistent-layout is restored.

[Description]

  • I know None option, but it brings the editor only to the specified layout.
  • In my usual work flows, I usually evenly edit or view notes WITHOUT-persistent-layout, and sometimes visit to a read-only note WITH-persistent-layout (viewer) for browsing. After browsing, I want to go back to the previous note with its previous layout (editor or viewer) to keep my concentration.