From b930a2fe77c2890c1e173dbd7a0cd66b2c556fb1 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Fri, 30 Aug 2024 13:36:26 -0400 Subject: [PATCH] Iframe example should load assets from a consistent place We were mixing up local assets with CDN assets and that was causing issues. This loads everything from local, but adds some better comments to show how to load them from CDN instead. --- dist/examples/iframe/child.html | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/dist/examples/iframe/child.html b/dist/examples/iframe/child.html index 36a3ff86b..9caf581e4 100644 --- a/dist/examples/iframe/child.html +++ b/dist/examples/iframe/child.html @@ -20,7 +20,8 @@ --> Rapid - + + @@ -50,10 +51,9 @@ newScript.onload = checkScript; newScript.onerror = checkScript; -// at some point, replace this with the cdn link -newScript.src = '../../rapid.js'; -// newScript.src = 'https://cdn.jsdelivr.net/npm/@rapideditor/rapid@2/dist/rapid.js'; // debug -// newScript.src = 'https://cdn.jsdelivr.net/npm/@rapideditor/rapid@2/dist/rapid.min.js'; // production + newScript.src = '../../rapid.js'; // local development +// newScript.src = 'https://cdn.jsdelivr.net/npm/@rapideditor/rapid@2/dist/rapid.js'; // CDN debug +// newScript.src = 'https://cdn.jsdelivr.net/npm/@rapideditor/rapid@2/dist/rapid.min.js'; // CDN production document.getElementsByTagName('head')[0].appendChild(newScript); @@ -65,7 +65,8 @@ } else { const context = new Rapid.Context(); context.containerNode = container; - context.assetPath = 'https://cdn.jsdelivr.net/npm/@rapideditor/rapid@2/dist/'; + context.assetPath = '../../'; // local development + // context.assetPath = 'https://cdn.jsdelivr.net/npm/@rapideditor/rapid@2/dist/'; // CDN context.buildID = ''; context.buildSHA = ''; context.buildDate = '';