adtec-core-package 3.0.2 → 3.0.3

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": "adtec-core-package",
3
- "version": "3.0.2",
3
+ "version": "3.0.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -107,7 +107,10 @@ function handlePanelShown() {
107
107
  }
108
108
  if (!rootWasHidden) return
109
109
  rootWasHidden = false
110
- if (!ready.value) return
110
+ if (!ready.value) {
111
+ void bootstrapEditor()
112
+ return
113
+ }
111
114
  void applyEditableStateWithRetry()
112
115
  if (editable.value) {
113
116
  void ensureBlockImageNodeView()
@@ -281,7 +284,7 @@ function buildUmoMountOptions(content: string) {
281
284
  menus:
282
285
  props.showToolbar && editableNow
283
286
  ? [...OFFICIAL_TOOLBAR_MENUS]
284
- : (['base'] as unknown as string[]),
287
+ : [],
285
288
  },
286
289
  page: {
287
290
  layouts: ['page', 'web'],
@@ -431,9 +434,12 @@ async function bootstrapEditor() {
431
434
 
432
435
  await nextTick()
433
436
  await waitEditorPaintFrames()
434
- await waitEditorPaintFrames()
435
437
  ready.value = true
436
438
  await nextTick()
439
+ const pendingHtml = model.value ?? ''
440
+ if (pendingHtml && pendingHtml !== getRawHtml()) {
441
+ applyEditorHtml(pendingHtml, false)
442
+ }
437
443
  await applyEditableStateWithRetry()
438
444
  syncEditorPresentation()
439
445
  if (editable.value) {
@@ -544,6 +550,7 @@ defineExpose({
544
550
  applyEditorHtml(html, focus)
545
551
  }
546
552
  },
553
+ isReady: () => ready.value,
547
554
  })
548
555
 
549
556
  onUnmounted(() => {