Skip to content

Commit cbabda7

Browse files
committed
docs: update RichEditor and Markdown plugin documentation with new resource and import paths
1 parent 8380ce0 commit cbabda7

File tree

2 files changed

+37
-9
lines changed

2 files changed

+37
-9
lines changed

adminforth/documentation/docs/tutorial/05-Plugins/04-RichEditor.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ npm i @adminforth/upload --save
167167
npm i @adminforth/storage-adapter-local --save
168168
```
169169

170-
```typescript title="./resources/description_image.ts"
171-
import AdminForthStorageAdapterLocalFilesystem from "../../adapters/adminforth-storage-adapter-local";
172-
import { AdminForthResourceInput } from "../../adminforth";
173-
import UploadPlugin from "../../plugins/adminforth-upload";
170+
```typescript title="./resources/description_images.ts"
171+
import AdminForthStorageAdapterLocalFilesystem from "@adminforth/storage-adapter-local";
172+
import { AdminForthResourceInput } from "adminforth";
173+
import UploadPlugin from "@adminforth/upload";
174174
import { v1 as uuid } from "uuid";
175175

176176
export default {
@@ -237,6 +237,20 @@ export default {
237237
],
238238
} as AdminForthResourceInput;
239239
```
240+
Next, add new resource to `index.ts`:
241+
242+
```typescript title="./index.ts"
243+
import descriptionImage from './resources/description_images.js';
244+
245+
...
246+
247+
resources: [
248+
usersResource,
249+
apartments,
250+
// diff-add
251+
descriptionImage
252+
],
253+
```
240254

241255
Next, add attachments to RichEditor plugin:
242256

adminforth/documentation/docs/tutorial/05-Plugins/14-markdown.md

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ npm i @adminforth/upload --save
5959
npm i @adminforth/storage-adapter-local --save
6060
```
6161

62-
```typescript title="./resources/description_image.ts"
63-
import AdminForthStorageAdapterLocalFilesystem from "../../adapters/adminforth-storage-adapter-local";
64-
import { AdminForthResourceInput } from "../../adminforth";
65-
import UploadPlugin from "../../plugins/adminforth-upload";
62+
```typescript title="./resources/description_images.ts"
63+
import AdminForthStorageAdapterLocalFilesystem from "@adminforth/storage-adapter-local";
64+
import { AdminForthResourceInput } from "adminforth";
65+
import UploadPlugin from "@adminforth/upload";
6666
import { v1 as uuid } from "uuid";
6767

6868
export default {
@@ -129,6 +129,20 @@ export default {
129129
],
130130
} as AdminForthResourceInput;
131131
```
132+
Next, add new resource to `index.ts`:
133+
134+
```typescript title="./index.ts"
135+
import descriptionImage from './resources/description_images.js';
136+
137+
...
138+
139+
resources: [
140+
usersResource,
141+
apartments,
142+
// diff-add
143+
descriptionImage
144+
],
145+
```
132146

133147
Next, add attachments to Markdown plugin:
134148

@@ -139,7 +153,7 @@ import MarkdownPlugin from '@adminforth/markdown';
139153

140154
plugins: [
141155
new MarkdownPlugin({
142-
fieldName: "description"
156+
fieldName: "description",
143157
// diff-add
144158
attachments: {
145159
// diff-add

0 commit comments

Comments
 (0)