Closed Mati365 closed 2 months ago
Add CDN implementation
Integrations common https://github.com/ckeditor/ckeditor5-integrations-common Related React integration: https://github.com/ckeditor/ckeditor5-react/pull/510 Related Angular integration: https://github.com/ckeditor/ckeditor5-angular/pull/431
Added demo: http://localhost:5173/demos/editor-cdn/index.html
useCKEditorCloud
import type * as CKEditor5 from 'https://cdn.ckeditor.com/typings/ckeditor5.d.ts'; const cloud = useCKEditorCloud( { version: '43.0.0' } ); watchEffect( () => { if ( !cloud.data.value ) { return; } const { ClassicEditor, Paragraph, ... } = cloud.data.value.CKEditor; // .... } ); ...
A more advanced example that allows to specify whether external stylesheets or scripts should be loaded:
const cloud = useCKEditorCloud({ version: '43.0.0', plugins: { YourPlugin: { scripts: ["https://example.com/your-plugin.js"], stylesheets: ["https://example.com/your-plugin.css"], getExportedEntries: () => window.YourPlugin, }, }, }); ...
<script setup lang="ts"> // .. const { CKEditor } = await loadCKEditorCloud( { version: '43.0.0' } ); const { Paragraph } = CKEditor; // .. </script>
Suggested merge commit message (convention)
Add CDN implementation
Additional information
Integrations common https://github.com/ckeditor/ckeditor5-integrations-common Related React integration: https://github.com/ckeditor/ckeditor5-react/pull/510 Related Angular integration: https://github.com/ckeditor/ckeditor5-angular/pull/431
Added demo: http://localhost:5173/demos/editor-cdn/index.html
🔧 General format of the
useCKEditorCloud
hook callA more advanced example that allows to specify whether external stylesheets or scripts should be loaded:
🔧 Experimental Vue 3.x suspense support