Editmode for React
Editmode allows you to turn plain text in your React app into easily inline-editable bits of content that can be managed by anyone with no technical knowledge.
Installation
npm install editmode-reactyarn add editmode-reactUsage
Step 1:
import { Editmode } from "editmode-react";
// 👉 `project_id` can be found in the URL:
// https://editmode.com/projects/{project_id}/chunks
ReactDOM.render(
<React>
<Editmode projectId={project_id}>
<App />
</Editmode>
</React>,
document.getElementById("root")
);import { Editmode } from "editmode-react";
// Branches are used to create separate "versions" of your content, which can
// be useful for staging, running a/b tests, or developing locally on teams.
// Branches are created within the content hub at https://app.editmode.com
// Specifying a branch id when initializing Editmode will load all content
// from that specific branch.
ReactDOM.render(
<React>
<Editmode projectId={project_id} branchId={branch_id}>
<App />
</Editmode>
</React>,
document.getElementById("root")
);Step 2:
Rendering a chunk:
Rendering a chunk collection:
ChunkFieldValue Attributes
Variables
Image Transformations
Image Transformation PropertiesUsing the Magic Editor
Last updated