[PR #11894] [MERGED] Closes #11294: Markdown Preview #13866

Closed
opened 2025-12-29 23:21:15 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/11894
Author: @aronjohanns
Created: 3/3/2023
Status: Merged
Merged: 3/9/2023
Merged by: @jeremystretch

Base: developHead: 11294-markdown-preview


📝 Commits (10+)

  • 3f64112 MarkdownWidget
  • ca06acf Change border and color of active markdown tab
  • 376d386 Fix template name typo
  • 53ac57e Add render markdown endpoint
  • b362024 Static assets for markdown widget
  • 3af52aa widget style fix and unique ids based on name
  • 525f53c Replace SmallTextArea with SmallMarkdownWidget
  • 58a7216 Clear innerHTML before swapping
  • ed9e959 render markdown directly in template
  • a385658 change render markdown view path

📊 Changes

22 files changed (+150 additions, -58 deletions)

View changed files

📝 netbox/circuits/forms/bulk_edit.py (+1 -4)
📝 netbox/dcim/forms/bulk_edit.py (+1 -12)
📝 netbox/extras/forms/__init__.py (+1 -0)
netbox/extras/forms/misc.py (+14 -0)
📝 netbox/extras/urls.py (+2 -0)
📝 netbox/extras/views.py (+17 -1)
📝 netbox/ipam/forms/bulk_edit.py (+1 -12)
📝 netbox/project-static/dist/netbox-dark.css (+1 -1)
📝 netbox/project-static/dist/netbox-light.css (+1 -1)
📝 netbox/project-static/dist/netbox-print.css (+1 -1)
📝 netbox/project-static/dist/netbox.js (+7 -7)
📝 netbox/project-static/dist/netbox.js.map (+2 -2)
📝 netbox/project-static/src/buttons/index.ts (+2 -0)
netbox/project-static/src/buttons/markdownPreview.ts (+45 -0)
📝 netbox/project-static/styles/netbox.scss (+22 -7)
📝 netbox/tenancy/forms/bulk_edit.py (+1 -2)
📝 netbox/utilities/forms/fields/fields.py (+1 -1)
📝 netbox/utilities/forms/widgets.py (+5 -0)
📝 netbox/utilities/templates/form_helpers/render_field.html (+1 -1)
netbox/utilities/templates/widgets/markdown_input.html (+22 -0)

...and 2 more files

📄 Description

Closes: #11294

  • New markdown widget that has preview button
  • Render markdown endpoint in extras
  • CommentField uses new markdown widget

🔄 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/netbox-community/netbox/pull/11894 **Author:** [@aronjohanns](https://github.com/aronjohanns) **Created:** 3/3/2023 **Status:** ✅ Merged **Merged:** 3/9/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `11294-markdown-preview` --- ### 📝 Commits (10+) - [`3f64112`](https://github.com/netbox-community/netbox/commit/3f641122d4d2821119ecfcc1fbe428653264bdd6) MarkdownWidget - [`ca06acf`](https://github.com/netbox-community/netbox/commit/ca06acf9da4d2e968f8980e2a5bbd940bb360629) Change border and color of active markdown tab - [`376d386`](https://github.com/netbox-community/netbox/commit/376d3866ca406e024ba6ba6c7dcd435eac050f41) Fix template name typo - [`53ac57e`](https://github.com/netbox-community/netbox/commit/53ac57e8a61d64b38151cc9e7cf29134ac5ffd11) Add render markdown endpoint - [`b362024`](https://github.com/netbox-community/netbox/commit/b362024b12c3a029d15af1425c48be35ed6565e0) Static assets for markdown widget - [`3af52aa`](https://github.com/netbox-community/netbox/commit/3af52aaf13b824a0f8e5513aa7486fe841f15864) widget style fix and unique ids based on name - [`525f53c`](https://github.com/netbox-community/netbox/commit/525f53c13b192dff5e09e709cf790dce613ecace) Replace SmallTextArea with SmallMarkdownWidget - [`58a7216`](https://github.com/netbox-community/netbox/commit/58a7216d2d4e3e1bffe12ed5bd0c5dcefc04ab1a) Clear innerHTML before swapping - [`ed9e959`](https://github.com/netbox-community/netbox/commit/ed9e95911c9a756296497a221dc2dd534eb98634) render markdown directly in template - [`a385658`](https://github.com/netbox-community/netbox/commit/a385658f249f8859f2671ff4bd5ca9723fe153d4) change render markdown view path ### 📊 Changes **22 files changed** (+150 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `netbox/circuits/forms/bulk_edit.py` (+1 -4) 📝 `netbox/dcim/forms/bulk_edit.py` (+1 -12) 📝 `netbox/extras/forms/__init__.py` (+1 -0) ➕ `netbox/extras/forms/misc.py` (+14 -0) 📝 `netbox/extras/urls.py` (+2 -0) 📝 `netbox/extras/views.py` (+17 -1) 📝 `netbox/ipam/forms/bulk_edit.py` (+1 -12) 📝 `netbox/project-static/dist/netbox-dark.css` (+1 -1) 📝 `netbox/project-static/dist/netbox-light.css` (+1 -1) 📝 `netbox/project-static/dist/netbox-print.css` (+1 -1) 📝 `netbox/project-static/dist/netbox.js` (+7 -7) 📝 `netbox/project-static/dist/netbox.js.map` (+2 -2) 📝 `netbox/project-static/src/buttons/index.ts` (+2 -0) ➕ `netbox/project-static/src/buttons/markdownPreview.ts` (+45 -0) 📝 `netbox/project-static/styles/netbox.scss` (+22 -7) 📝 `netbox/tenancy/forms/bulk_edit.py` (+1 -2) 📝 `netbox/utilities/forms/fields/fields.py` (+1 -1) 📝 `netbox/utilities/forms/widgets.py` (+5 -0) 📝 `netbox/utilities/templates/form_helpers/render_field.html` (+1 -1) ➕ `netbox/utilities/templates/widgets/markdown_input.html` (+22 -0) _...and 2 more files_ </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Closes: #11294 <!-- Please include a summary of the proposed changes below. --> - New markdown widget that has preview button - Render markdown endpoint in extras - CommentField uses new markdown widget --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 23:21:15 +01:00
adam closed this issue 2025-12-29 23:21:15 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13866