From 0b720e5dcf7c0f45eb2c57ddc786859d62673413 Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 5 Jun 2026 12:08:04 +0200 Subject: [PATCH 1/3] console.log in dev release --- .../locked-placeholder-plugin/utils/replace-content-function.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.ts b/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.ts index e8f37f9e..47996709 100644 --- a/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.ts +++ b/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.ts @@ -34,6 +34,7 @@ export default function replaceLockedPlaceholderContent( return true; }); placeholdersWithPos.reverse(); + console.log(placeholdersWithPos); const monads = []; const valuesResolved = typeof values === 'function' ? values(initialState) : values; From 384b25d3d14e0cc6b8dfe99242c9715bff6a2e59 Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 5 Jun 2026 14:35:43 +0200 Subject: [PATCH 2/3] Revert "console.log in dev release" This reverts commit 0b720e5dcf7c0f45eb2c57ddc786859d62673413. --- .../locked-placeholder-plugin/utils/replace-content-function.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.ts b/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.ts index 47996709..e8f37f9e 100644 --- a/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.ts +++ b/addon/plugins/locked-placeholder-plugin/utils/replace-content-function.ts @@ -34,7 +34,6 @@ export default function replaceLockedPlaceholderContent( return true; }); placeholdersWithPos.reverse(); - console.log(placeholdersWithPos); const monads = []; const valuesResolved = typeof values === 'function' ? values(initialState) : values; From be7ffcf1928f284b60aef82e8203211f65695a9b Mon Sep 17 00:00:00 2001 From: Oscar Date: Fri, 5 Jun 2026 14:41:03 +0200 Subject: [PATCH 3/3] wait document content on insert --- addon/components/common/documents/preview.gts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addon/components/common/documents/preview.gts b/addon/components/common/documents/preview.gts index 7c07f6d9..4ba84ce3 100644 --- a/addon/components/common/documents/preview.gts +++ b/addon/components/common/documents/preview.gts @@ -14,6 +14,7 @@ import t from 'ember-intl/helpers/t'; import { SayController } from '@lblod/ember-rdfa-editor'; import { PreviewableDocument } from './types'; import { VoteStarUnfilledIcon } from '../vote-star-unfilled-icon'; +import perform from 'ember-concurrency/helpers/perform'; interface Signature { Args: { @@ -31,10 +32,10 @@ export default class DocumentPreview< @tracked controller?: SayController; @tracked isExpanded = false; - @action - onInsert() { + onInsert = task(async () => { + await this.contentTask.perform(); this.args.onInsert(this.args.doc); - } + }); @action togglePreview() { @@ -101,7 +102,7 @@ export default class DocumentPreview<