LaTeX blocks should get focus after creation

Is your feature request related to a problem? Please describe.
When creating certain blocks, the need for an additional click to activate the block before being able to edit the block gets in the way of the writing flow.

Describe the solution you’d like
All blocks should get focus (i.e. the cursor should be active in the block) directly after creating the block. This is already the case for:

  • Text blocks
  • List blocks
  • Code snippet

But this should also be the case for:

  • Bookmarks (when creating a bookmark, ideally the content of the clipboard should be pasted automatically when containing a URL)
  • LaTeX (also here it might be possible to parse the clipboard contents to find out whether any LaTeX content is present so it can be pasted automatically after creation of the block)
  • Relations (adding content to a Relation block requires you to click inside the Relation content part of the block. I’m happy that subsequent entries can be added immediately after confirming the first object with the Return key, for example when adding multiple tags).

This could also be setup for:

  • File/picture/pdf/audio/video blocks (sometimes you might want to add a placeholder for a file, but I think for most of the times you’d want to add/attach a file immediately, so an “upload file” dialog could be shown directly after creating the block. The other probably often used method to get this kind of content onto the canvas is by drag-and-drop, which should not require the creation of a block in advance)

Describe alternatives you’ve considered
:musical_note: Just keep clicking, just keep clicking :musical_note:

Additional context
I was quite sure I saw a similar topic on the forum already for bookmark blocks already, but I could not find it back… (I guess I should have bookmarked it :joy:)

3 Likes

Is your feature request related to a problem? Please describe.

I use Anytype to take notes, often with lots of embedded maths. With this in mind, Inline LaTeX Addition is probably my #1 request, but aside from that, I think there could be some workflow improvements to the current block LaTeX support.

After typing “/math” and pressing enter:
2022-04-14T19:13:48,115953515+10:00

A new math block is created, as I’d expect, however in order to start editing said math block, I need to grab my mouse and manually click on the math block.

In addition, once I’m done editing the math block, I need to manually click somewhere outside the math block to exit. As far as I’m away there isn’t e.g.: a keyboard shortcut to exit the block (for example, repeatedly pressing the “down” or “up” arrows when at the bottom or top of the math block editor doesn’t get me anywhere - I am permanently stuck inside the block until I use my mouse to click outside.

Describe the solution you’d like

I would expect after typing “/math” and hitting enter, the editor would jump straight to this. (with a blinking cursor ready to go in the “editor” section)

In addition, it would be nice if I could get out of that math block using e.g.: up/down arrow keys (currently am stuck until I use the mouse).

Finally, if I’m outside of the math block, e.g. cursor is underneath the math block here:

2022-04-14T19:20:25,156890903+10:00

… and I hit the “up” arrow, then it selects the math block, which makes sense. But it would be nice to have some keyboard shortcut which I could press (e.g.: “enter” key while the block is selected), which will allow me to enter edit mode again, without having to click on the math block with the mouse.

Describe alternatives you’ve considered

I hate to jump on the “clone all Notion features” bandwagon, but I just tried this out in Notion, and it handles this “keyboard-driven” workflow pretty-much how I’d expect (except it forces me to use “shift+enter” to add a new line, which I’m not a fan of).

I’ve considered just using my mouse more, but it’s like an order of magnitude slower when e.g.: taking live lecture notes.

Thanks very much for all the work you’ve put into Anytype thus far! Despite some minor workflow impediments such as this issue, I’ve been using it for a lot of my note-taking these days.

7 Likes

@Razor The blocks mentioned by sam were fixed. Is the “LaTex” block as mentioned by @neon64 also planned to support this?

I think I’ve missed this, I was fixing it in a separate issue from our product team, and Latex logic is a bit different from the problem I was solving in other blocks (media, bookmark, etc.).

Could you please file a bug report on Latex?

This issue has been added to our issue tracker and was received by the Development Team.

I just turned this FR into a Bug Report :slight_smile:

1 Like

I can’t reproduce this anymore in the pre-relase 0.32.23.
Seems to be fixed.