@phuong-tran-redoc/document-engine-core 0.0.28 → 0.0.29

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@phuong-tran-redoc/document-engine-core",
3
- "version": "0.0.28",
3
+ "version": "0.0.29",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Duc Phuong (Jack) <tdp99.business@gmail.com>",
@@ -69,8 +69,8 @@ import { Node, mergeAttributes } from '@tiptap/core';
69
69
  // Regex để xóa dấu {{ và }} và khoảng trắng thừa
70
70
  const id = rawText.replace(/{{|}}/g, '').trim();
71
71
  // 2. Trích xuất Label từ attribute cũ
72
- // CKEditor dùng 'dynamicfieldname' hoặc 'name'
73
- const label = element.getAttribute('dynamicfieldname') || element.getAttribute('name') || id; // Fallback nếu không tìm thấy label
72
+ // CKEditor dùng 'value', 'dynamicfieldname' hoặc 'name'
73
+ const label = element.getAttribute('value') || element.getAttribute('dynamicfieldname') || element.getAttribute('name') || id; // Fallback nếu không tìm thấy label
74
74
  // Trả về object khớp với cấu trúc 'addAttributes' ở trên
75
75
  return {
76
76
  fieldId: id,