From 4eda0a5dc73d4d6d401d8b2ca99d8d8c28b1c112 Mon Sep 17 00:00:00 2001 From: Justis R Date: Sat, 9 Dec 2023 16:39:58 +0000 Subject: [PATCH] Update alpine.md with better info about proxy limitations The issue described in #1515 is now mentioned in the Alpine documentation so that readers understand why the example does not store the editor as component data and why they should not do so either. --- docs/installation/alpine.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/alpine.md b/docs/installation/alpine.md index 439e9e06b95..365e8d42fe6 100644 --- a/docs/installation/alpine.md +++ b/docs/installation/alpine.md @@ -48,7 +48,7 @@ import StarterKit from '@tiptap/starter-kit' document.addEventListener('alpine:init', () => { Alpine.data('editor', (content) => { - let editor + let editor // Alpine's reactive engine automatically wraps component properties in proxy objects. Attempting to use a proxied editor instance to apply a transaction will cause a "Range Error: Applying a mismatched transaction", so be sure to unwrap it using Alpine.raw(), or simply avoid storing your editor as a component property, as shown in this example. return { updatedAt: Date.now(), // force Alpine to rerender on selection change