@cyberyozh/text-editor 0.1.8 → 0.1.9

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/dist/render.js CHANGED
@@ -687,6 +687,13 @@ var BaseFigure = import_extension_image.default.extend({
687
687
  caption: {
688
688
  default: null,
689
689
  parseHTML: (element) => element.querySelector("figcaption")?.textContent || null
690
+ },
691
+ storageKey: {
692
+ default: null,
693
+ parseHTML: (element) => element.getAttribute("data-storage-key"),
694
+ renderHTML: (attributes) => ({
695
+ "data-storage-key": attributes.storageKey
696
+ })
690
697
  }
691
698
  };
692
699
  },
@@ -1128,6 +1135,32 @@ var BaseLegacyBookAlert = import_core15.Node.create({
1128
1135
  return {
1129
1136
  type: {
1130
1137
  default: "error"
1138
+ },
1139
+ bgColor: {
1140
+ default: null,
1141
+ parseHTML: (element) => {
1142
+ if (typeof element === "string") return null;
1143
+ return element.getAttribute("data-bg-color");
1144
+ },
1145
+ renderHTML: (attributes) => {
1146
+ if (!attributes.bgColor) return {};
1147
+ return {
1148
+ "data-bg-color": attributes.bgColor
1149
+ };
1150
+ }
1151
+ },
1152
+ emoji: {
1153
+ default: null,
1154
+ parseHTML: (element) => {
1155
+ if (typeof element === "string") return null;
1156
+ return element.getAttribute("data-emoji");
1157
+ },
1158
+ renderHTML: (attributes) => {
1159
+ if (!attributes.emoji) return {};
1160
+ return {
1161
+ "data-emoji": attributes.emoji
1162
+ };
1163
+ }
1131
1164
  }
1132
1165
  };
1133
1166
  },
@@ -1157,6 +1190,32 @@ var BaseLegacyBookTip = import_core15.Node.create({
1157
1190
  return {
1158
1191
  type: {
1159
1192
  default: "info"
1193
+ },
1194
+ bgColor: {
1195
+ default: null,
1196
+ parseHTML: (element) => {
1197
+ if (typeof element === "string") return null;
1198
+ return element.getAttribute("data-bg-color");
1199
+ },
1200
+ renderHTML: (attributes) => {
1201
+ if (!attributes.bgColor) return {};
1202
+ return {
1203
+ "data-bg-color": attributes.bgColor
1204
+ };
1205
+ }
1206
+ },
1207
+ emoji: {
1208
+ default: null,
1209
+ parseHTML: (element) => {
1210
+ if (typeof element === "string") return null;
1211
+ return element.getAttribute("data-emoji");
1212
+ },
1213
+ renderHTML: (attributes) => {
1214
+ if (!attributes.emoji) return {};
1215
+ return {
1216
+ "data-emoji": attributes.emoji
1217
+ };
1218
+ }
1160
1219
  }
1161
1220
  };
1162
1221
  },