Skip to content

Commit

Permalink
fix: Move to alpinejs
Browse files Browse the repository at this point in the history
  • Loading branch information
lee-to committed Aug 14, 2024
1 parent debe65c commit ce809ef
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions public/js/ckeditor-init.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
document.addEventListener('alpine:init', () => {
Alpine.data('ckeditor', (attachmentRoute) => ({
init() {
const t = this

this.$nextTick(function() {
CKEDITOR.ClassicEditor.create(document.getElementById(t.$el.id), {
CKEDITOR.ClassicEditor.create(this.$el, {
// https://ckeditor.com/docs/ckeditor5/latest/features/toolbar/toolbar.html#extended-toolbar-configuration-format
toolbar: {
items: [
Expand Down Expand Up @@ -152,7 +149,6 @@ document.addEventListener('alpine:init', () => {
'MathType'
]
});
})
},
}))
})

0 comments on commit ce809ef

Please sign in to comment.