-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Docs: migrate Beta Features - Custom Mount Element (#7059)
* Update Docs: migrate Beta Features - Custom Mount Element * Update Docs: add more details to Custom Mounting --------- Co-authored-by: Martin Jagodic <jagodicmartin1@gmail.com>
- Loading branch information
1 parent
c21b30d
commit 4411cc0
Showing
2 changed files
with
17 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
title: Custom Mount Element | ||
weight: 90 | ||
group: Customization | ||
--- | ||
|
||
Decap CMS always creates its own DOM element for mounting the application, which means it always takes over the entire page, and is generally inflexible if you're trying to do something creative, like injecting it into a shared context. | ||
|
||
You can now provide your own element for Decap CMS to mount in by setting the target element's ID as `id="nc-root"`. If Decap CMS finds an element with this ID during initialization, it will mount within that element instead of creating its own. | ||
|
||
This is useful if you want to create a wrapper around the CMS, like a custom header, footer, or sidebar. | ||
|
||
**Example** | ||
|
||
Adding the following div to `admin/index.html` will cause the CMS to load within it: | ||
|
||
<div id="nc-root"></div> |