зеркало из
https://github.com/rs-pro/activeadmin-quill_editor.git
synced 2026-09-03 18:25:51 +03:00
feat: Add ActiveAdmin 4 and Propshaft support
- Switch to ActiveAdmin 4 beta with Tailwind CSS - Replace Sprockets with Propshaft for Rails 8 - Migrate from jQuery to vanilla JavaScript - Implement proper module initialization without setTimeout hacks - Add esbuild for JavaScript bundling with clean import aliases - Configure Tailwind CSS build process with ActiveAdmin plugin - Update engine configuration for both Propshaft and Sprockets - Add comprehensive documentation for AA4 gem updates - Maintain backward compatibility with legacy AA versions 🤖 Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
Этот коммит содержится в:
26
spec/dummy/app/javascript/active_admin.js
Обычный файл
26
spec/dummy/app/javascript/active_admin.js
Обычный файл
@@ -0,0 +1,26 @@
|
||||
// Import ActiveAdmin - this already includes all features and Rails UJS
|
||||
// DO NOT import Rails separately as it's already included and started in ActiveAdmin
|
||||
import '@activeadmin/activeadmin';
|
||||
|
||||
// Import Quill from NPM and make it globally available
|
||||
import Quill from 'quill';
|
||||
window.Quill = Quill;
|
||||
|
||||
// Import the image uploader plugin if available (optional)
|
||||
try {
|
||||
const ImageUploader = require('quill-image-uploader');
|
||||
window.ImageUploader = ImageUploader.default || ImageUploader;
|
||||
} catch(e) {
|
||||
// Image uploader is optional (silent failure)
|
||||
}
|
||||
|
||||
// Import the Quill Editor initialization module
|
||||
import QuillEditorModule from 'activeadmin_quill_editor';
|
||||
|
||||
// Now that Quill is available, initialize the editors
|
||||
// This ensures proper initialization order without setTimeout hacks
|
||||
if (window.QuillEditor && window.QuillEditor.init) {
|
||||
window.QuillEditor.init();
|
||||
} else if (QuillEditorModule && QuillEditorModule.init) {
|
||||
QuillEditorModule.init();
|
||||
}
|
||||
Ссылка в новой задаче
Block a user