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

Allow existing nc-root element #1176

Closed
wants to merge 3 commits into from
Closed

Allow existing nc-root element #1176

wants to merge 3 commits into from

Conversation

talves
Copy link
Collaborator

@talves talves commented Mar 16, 2018

- Summary

Allow for the render of an existing root element for the CMS app.

Solves:

Will allow a React app to be able to wrap the CMS component with a react component to be able to include as a route.
Example Test Repo based on create-react-app

- Test plan

  • yarn build
  • use the dist assets in your app

- Description for the changelog

Allow existing root element nc-root

- A picture of a cute animal (not mandatory but encouraged)
🦈

@verythorough
Copy link
Contributor

verythorough commented Mar 16, 2018

Deploy preview for netlify-cms-www ready!

Built with commit fd8d73a

https://deploy-preview-1176--netlify-cms-www.netlify.com

@verythorough
Copy link
Contributor

verythorough commented Mar 16, 2018

Deploy preview for cms-demo ready!

Built with commit fd8d73a

https://deploy-preview-1176--cms-demo.netlify.com

src/bootstrap.js Outdated
document.body.appendChild(el);
const el = document.getElementById('nc-root');
if (!el) {
document.createElement('div');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be assigned to el, so that you can append it below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I have that on mine, forgot to push 👍 @tech4him1 good catch

@tech4him1
Copy link
Contributor

@talves Doesn't this close #737 as well?

@erquhart
Copy link
Contributor

@talves this is handled under #1173

@erquhart erquhart closed this Mar 28, 2018
@talves talves deleted the init-fix branch May 17, 2018 19:19
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

Successfully merging this pull request may close these issues.

4 participants