@adminforth/markdown 1.2.10 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,10 +10,10 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@milkdown/kit": "^7.18.0",
14
- "@milkdown/theme-nord": "^7.18.0",
15
- "@milkdown/vue": "^7.18.0",
16
13
  "dompurify": "^3.2.4",
17
- "marked": "^15.0.7"
14
+ "monaco-editor": "^0.45.0",
15
+ "marked": "^15.0.7",
16
+ "turndown": "^7.2.2",
17
+ "turndown-plugin-gfm": "^1.0.2"
18
18
  }
19
19
  }
package/dist/index.js CHANGED
@@ -86,7 +86,6 @@ export default class MarkdownPlugin extends AdminForthPlugin {
86
86
  meta: {
87
87
  pluginInstanceId: this.pluginInstanceId,
88
88
  columnName: fieldName,
89
- pluginType: 'crepe',
90
89
  uploadPluginInstanceId: (_a = this.uploadPlugin) === null || _a === void 0 ? void 0 : _a.pluginInstanceId,
91
90
  },
92
91
  };
@@ -95,7 +94,6 @@ export default class MarkdownPlugin extends AdminForthPlugin {
95
94
  meta: {
96
95
  pluginInstanceId: this.pluginInstanceId,
97
96
  columnName: fieldName,
98
- pluginType: 'crepe',
99
97
  uploadPluginInstanceId: (_b = this.uploadPlugin) === null || _b === void 0 ? void 0 : _b.pluginInstanceId,
100
98
  },
101
99
  };
@@ -126,7 +124,6 @@ export default class MarkdownPlugin extends AdminForthPlugin {
126
124
  [options.attachments.attachmentResourceIdFieldName]: resourceConfig.resourceId,
127
125
  },
128
126
  adminUser,
129
- response: {}
130
127
  });
131
128
  console.log('Successfully created record for:', s3Path);
132
129
  }
@@ -151,7 +148,6 @@ export default class MarkdownPlugin extends AdminForthPlugin {
151
148
  recordId: a[attachmentPrimaryKeyField.name],
152
149
  adminUser,
153
150
  record: a,
154
- response: {}
155
151
  });
156
152
  })));
157
153
  });
package/index.ts CHANGED
@@ -91,7 +91,6 @@ export default class MarkdownPlugin extends AdminForthPlugin {
91
91
  meta: {
92
92
  pluginInstanceId: this.pluginInstanceId,
93
93
  columnName: fieldName,
94
- pluginType: 'crepe',
95
94
  uploadPluginInstanceId: this.uploadPlugin?.pluginInstanceId,
96
95
  },
97
96
  };
@@ -101,7 +100,6 @@ export default class MarkdownPlugin extends AdminForthPlugin {
101
100
  meta: {
102
101
  pluginInstanceId: this.pluginInstanceId,
103
102
  columnName: fieldName,
104
- pluginType: 'crepe',
105
103
  uploadPluginInstanceId: this.uploadPlugin?.pluginInstanceId,
106
104
  },
107
105
  };
@@ -140,7 +138,6 @@ export default class MarkdownPlugin extends AdminForthPlugin {
140
138
  [options.attachments.attachmentResourceIdFieldName]: resourceConfig.resourceId,
141
139
  },
142
140
  adminUser,
143
- response: {} as any
144
141
  }
145
142
  );
146
143
  console.log('Successfully created record for:', s3Path);
@@ -170,7 +167,6 @@ export default class MarkdownPlugin extends AdminForthPlugin {
170
167
  recordId: a[attachmentPrimaryKeyField.name],
171
168
  adminUser,
172
169
  record: a,
173
- response: {} as any
174
170
  }
175
171
  )
176
172
  }))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/markdown",
3
- "version": "1.2.10",
3
+ "version": "1.3.0",
4
4
  "description": "Markdown plugin for adminforth",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
package/types.ts CHANGED
@@ -32,7 +32,10 @@ export interface PluginOptions {
32
32
 
33
33
  /**
34
34
  * When attachment is created, it will be linked to the resource, by storing id of the resource with editor in attachment resource.
35
+ * Here you define the field name where this id will be stored.
35
36
  * For example when RichEditor installed on description field of apartment resource, it will store id of apartment resource.
37
+ *
38
+ * Why we force to store and ask for resource id if we already have record id? Because in amny use cases attachments resource is shared between multiple resources, and record id might be not be unique across resources, but resource id + record id will be always unique.
36
39
  */
37
40
  attachmentResourceIdFieldName: string; // e.g. 'apartment_resource_id',
38
41
  },