Hi,
Smart Editor can work offline in a JavaScript PWA, but the recommended approach is to make the PWA responsible for offline support, not the editor itself. The Smart UI team recommends bundling all editor assets locally and using a Service Worker with a cache-first strategy so the editor loads without a network connection.
Example setup:
Register the Service Worker:
if ('serviceWorker' in navigator) {
navigator.serviceWorker.register('/sw.js');
}
A simple cache-first strategy:
const CACHE = 'support-dashboard-v1';
self.addEventListener('fetch', event => {
event.respondWith(
caches.match(event.request).then(cached => {
return cached || fetch(event.request);
})
);
});
Regards,
Markov