Skip to content

Commit ed177a6

Browse files
committed
Improve ContentLink documentation structure
- Add overall title before TOC - Remove 'Table of Contents' header text - Simplify title to match other components - Regenerate table of contents
1 parent b958521 commit ed177a6

1 file changed

Lines changed: 37 additions & 39 deletions

File tree

docs/content-link.md

Lines changed: 37 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,4 @@
1-
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
2-
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
3-
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
4-
5-
- [`<ContentLink/>` component for Visual Editing with click-to-edit overlays](#contentlink-component-for-visual-editing-with-click-to-edit-overlays)
6-
- [What is Visual Editing?](#what-is-visual-editing)
7-
- [Out-of-the-box features](#out-of-the-box-features)
8-
- [Installation](#installation)
9-
- [Basic Setup](#basic-setup)
10-
- [1. Fetch content with stega encoding](#1-fetch-content-with-stega-encoding)
11-
- [2. Add the ContentLink component](#2-add-the-contentlink-component)
12-
- [Framework integrations](#framework-integrations)
13-
- [Next.js App Router](#nextjs-app-router)
14-
- [React Router](#react-router)
15-
- [Enabling click-to-edit](#enabling-click-to-edit)
16-
- [1. Via prop (persistent)](#1-via-prop-persistent)
17-
- [2. Via keyboard shortcut (temporary)](#2-via-keyboard-shortcut-temporary)
18-
- [Flash-all highlighting](#flash-all-highlighting)
19-
- [Props](#props)
20-
- [Advanced usage: the `useContentLink` hook](#advanced-usage-the-usecontentlink-hook)
21-
- [Hook API](#hook-api)
22-
- [Example: Custom editing toolbar](#example-custom-editing-toolbar)
23-
- [Example: Conditional editing in different environments](#example-conditional-editing-in-different-environments)
24-
- [StructuredText integration](#structuredtext-integration)
25-
- [Edit groups](#edit-groups)
26-
- [Edit boundaries for embedded blocks](#edit-boundaries-for-embedded-blocks)
27-
- [Complete example with both attributes](#complete-example-with-both-attributes)
28-
- [Manual overlays](#manual-overlays)
29-
- [Low-level utilities](#low-level-utilities)
30-
- [`decodeStega`](#decodestega)
31-
- [`stripStega`](#stripstega)
32-
- [Troubleshooting](#troubleshooting)
33-
- [Click-to-edit overlays not appearing](#click-to-edit-overlays-not-appearing)
34-
- [Navigation not syncing with Web Previews plugin](#navigation-not-syncing-with-web-previews-plugin)
35-
- [StructuredText blocks not clickable](#structuredtext-blocks-not-clickable)
36-
37-
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
38-
39-
# `<ContentLink/>` component for Visual Editing with click-to-edit overlays
1+
# ContentLink component for Visual Editing
402

413
`<ContentLink />` is a React component that enables **Visual Editing** for your DatoCMS content. It allows content editors to click directly on content in your website preview to edit it in the DatoCMS interface, making content management intuitive and efficient.
424

@@ -47,6 +9,42 @@ Visual Editing works by:
479
- Supporting keyboard shortcuts (Alt/Option key) for temporary click-to-edit mode
4810
- Providing bidirectional communication between your preview and the DatoCMS editor
4911

12+
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
13+
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
14+
15+
- [What is Visual Editing?](#what-is-visual-editing)
16+
- [Out-of-the-box features](#out-of-the-box-features)
17+
- [Installation](#installation)
18+
- [Basic Setup](#basic-setup)
19+
- [1. Fetch content with stega encoding](#1-fetch-content-with-stega-encoding)
20+
- [2. Add the ContentLink component](#2-add-the-contentlink-component)
21+
- [Framework integrations](#framework-integrations)
22+
- [Next.js App Router](#nextjs-app-router)
23+
- [React Router](#react-router)
24+
- [Enabling click-to-edit](#enabling-click-to-edit)
25+
- [1. Via prop (persistent)](#1-via-prop-persistent)
26+
- [2. Via keyboard shortcut (temporary)](#2-via-keyboard-shortcut-temporary)
27+
- [Flash-all highlighting](#flash-all-highlighting)
28+
- [Props](#props)
29+
- [Advanced usage: the `useContentLink` hook](#advanced-usage-the-usecontentlink-hook)
30+
- [Hook API](#hook-api)
31+
- [Example: Custom editing toolbar](#example-custom-editing-toolbar)
32+
- [Example: Conditional editing in different environments](#example-conditional-editing-in-different-environments)
33+
- [StructuredText integration](#structuredtext-integration)
34+
- [Edit groups](#edit-groups)
35+
- [Edit boundaries for embedded blocks](#edit-boundaries-for-embedded-blocks)
36+
- [Complete example with both attributes](#complete-example-with-both-attributes)
37+
- [Manual overlays](#manual-overlays)
38+
- [Low-level utilities](#low-level-utilities)
39+
- [`decodeStega`](#decodestega)
40+
- [`stripStega`](#stripstega)
41+
- [Troubleshooting](#troubleshooting)
42+
- [Click-to-edit overlays not appearing](#click-to-edit-overlays-not-appearing)
43+
- [Navigation not syncing with Web Previews plugin](#navigation-not-syncing-with-web-previews-plugin)
44+
- [StructuredText blocks not clickable](#structuredtext-blocks-not-clickable)
45+
46+
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
47+
5048
## What is Visual Editing?
5149

5250
Visual Editing transforms how content editors interact with your website. Instead of navigating through forms and fields in a CMS, editors can:

0 commit comments

Comments
 (0)