[PR #1695] Custom HTML at the Top of "<body>" #1807

Open
opened 2026-02-28 02:13:04 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/tzapu/WiFiManager/pull/1695
Author: @ab-tools
Created: 1/1/2024
Status: 🔄 Open

Base: masterHead: CustomTopBodyElement


📝 Commits (1)

  • 2604230 Added setCustomTopBodyElement allowing to define custom HTML to be added at the top of the "" tag.

📊 Changes

2 files changed (+17 additions, -2 deletions)

View changed files

📝 WiFiManager.cpp (+11 -0)
📝 WiFiManager.h (+6 -2)

📄 Description

Added setCustomTopBodyElement allowing to define custom HTML to be added at the top of the "" tag.

This is very useful to add a custom HTML header, e. g. also a logo at the top of the page.

I know this would in general be possible with WIFI_MANAGER_OVERRIDE_STRINGS and copying the whole wm_strings_en.h file, however, if the only goal is to add a single line of HTML code at the top of the page this seems like a bad idea:
Whenever something would get added in that file, these changes would need to be copied over manually to the custom file again.

Having the option to just "inject" and additional HTML code at the top of the body tag (similar as it is already possible to inject something at the bottom of the "head" tag) seems a much better option.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/tzapu/WiFiManager/pull/1695 **Author:** [@ab-tools](https://github.com/ab-tools) **Created:** 1/1/2024 **Status:** 🔄 Open **Base:** `master` ← **Head:** `CustomTopBodyElement` --- ### 📝 Commits (1) - [`2604230`](https://github.com/tzapu/WiFiManager/commit/2604230a778e61857f20b33f1ab8f3454900d183) Added setCustomTopBodyElement allowing to define custom HTML to be added at the top of the "<body>" tag. ### 📊 Changes **2 files changed** (+17 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `WiFiManager.cpp` (+11 -0) 📝 `WiFiManager.h` (+6 -2) </details> ### 📄 Description Added setCustomTopBodyElement allowing to define custom HTML to be added at the top of the "<body>" tag. This is very useful to add a custom HTML header, e. g. also a logo at the top of the page. I know this would in general be possible with `WIFI_MANAGER_OVERRIDE_STRINGS` and copying the whole `wm_strings_en.h` file, however, if the only goal is to add a single line of HTML code at the top of the page this seems like a bad idea: Whenever something would get added in that file, these changes would need to be copied over manually to the custom file again. Having the option to just "inject" and additional HTML code at the top of the body tag (similar as it is already possible to inject something at the bottom of the "head" tag) seems a much better option. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1807
No description provided.