Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlaceholderPlugin.reload_page is not a function #3

Closed
BluetriX opened this issue Apr 24, 2023 · 3 comments
Closed

PlaceholderPlugin.reload_page is not a function #3

BluetriX opened this issue Apr 24, 2023 · 3 comments

Comments

@BluetriX
Copy link

Hi!

The plugin is really great :-)

Unfortunately the "Apply new values" button doesn't work anymore:

(index):810 Uncaught TypeError: PlaceholderPlugin.reload_page is not a function
at HTMLButtonElement.onclick ((index):810:141)

Example page: https://mkdocs-placeholder-plugin.six-two.dev/tests/input-tables/ ;-)

Greetings

Erik

@six-two
Copy link
Owner

six-two commented Apr 24, 2023

Hi Erik,

well spotted, the entire JS code was rewritten, which caused this breakage. The apply button(s) will be removed in a future version, since they introduce too many edge cases and updating placeholder values does not (always) need a page refresh anymore. But I may re-expose the reload function, since it seems useful.

Since I am traveling for up to two more weeks it may take some time till I can fix it.

Thanks for reporting,
six-two

@six-two
Copy link
Owner

six-two commented May 1, 2023

Hm I looked into the issue,

to keep placeholder values sane when multiple text boxes exist for the same placeholder, values are no longer updated when you type. Instead you need to confirm them with the enter key.

This means simply reloading the page will now reset the changed values instead of applying them. Since implementing the proper behaviour is hard and I will remove them soon anyways, I will make a small release which makes it so that the buttons will not be added to tables anymore. Then you won't have a useless/broken button on the page anymore.

BR
six-two

@six-two
Copy link
Owner

six-two commented May 1, 2023

Released 0.3.1

@six-two six-two closed this as completed May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants