Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Suggestion/workaround request: Have Elements remember editor position

  • Hello! I have been working with GP for the past few weeks and enjoying it quite a lot.

    I am using the Elements functionality extensively to tailor specific post types or particular pages with styles and code.

    Everything works perfectly on the technical side, but whenever I save changes to the Element, the page and the code window scroll back to the beginning (technically, the page is reloaded post-submission and the textarea/scroll position thus resets to the start, but effect is the same in practice). So if I have a longish Element and want to iterate changes, I have to constantly scroll down/search to find the place I was editing again. This is really annoying – it is the only real gripe I have with the overall GP philosophy.

    Is there any way to make the editor remember the position? Something like saving the current line on submission in a browser cookie and scrolling back to it on reload/submit would be more than enough. (Of course, saving via AJAX requests or something of the sort would be more elegant, but it would be much more involved).

    Either way, I would suggest you consider adding such a functionality to new versions of GP. (Other improvements for this use case would be a dedicated CSS / PHP mode and the ability to read the parameters to the hooks, but one step at a time :))

  • Hi there,

    So if I have a longish Element and want to iterate changes, I have to constantly scroll down/search to find the place I was editing again.

    This is not the WP block editor’s default behaviour(the elements use the same block editor as posts/pages).
    It should stay where you are when clicking the publish/save button.

    Can you check if you’ve changed the editor preferences or if there’s a plugin that changed its behaviour?

  • Hi,

    Thanks for your reply, and sorry for not being more specific. I’m not using the blocks editor because I’m not dealing with blocks – I’m using the “Hook” element type, which inserts raw HTML/code. The editor is a textarea with syntax highlighting, not the Gutenberg editor.

    Best regards!

  • Ah, OK, I see!

    I don’t think we are going to make any changes to the hook element, as most users are using the block editor nowadays, so our focus will be on the block elements.

    But I’ll mark this topic as a feature request, the dev team will review it and decide whether it’s worth adding 🙂

  • Thanks, I appreciate it. (And, for the record, I think that the hook functionality really sets GP apart – it simplifies a lot of tedious stuff).

    If you track the feature requests internally, feel free to mark the issue as resolved.

    Have a nice day!

  • You too, have a nice day 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.