Simplify CKEditor config - keep only text alignment buttons
ISSUE: User reported alignment tools not showing and delete not working
ROOT CAUSE: Over-complicated toolbar config with too many additions
- Added Strike, Subscript, Superscript (not in standard build)
- Added Image (might not be in build)
- Added ShowBlocks (might not be in build)
- Added extra config options that might conflict
SOLUTION: Return to ORIGINAL working toolbar + ONLY alignment buttons
- Restored original toolbar config that was working
- Kept ONLY the alignment row: JustifyLeft, Center, Right, Block
- Removed Strike, Subscript, Superscript, Image, ShowBlocks
- Removed extra config: allowedContent, entities, fillEmptyBlocks, etc.
- Delete function unchanged (already fixed in commit d025111)
TOOLBAR NOW:
✅ Original working buttons (Source, Undo, Redo, Bold, Italic, etc.)
✅ Text alignment buttons (JustifyLeft, Center, Right, Block) - USER'S REQUEST
❌ Removed bonus features that caused issues
This is minimal change - only adds what user asked for.
This commit is contained in:
parent
8461cae263
commit
7587384338
|
|
@ -475,20 +475,15 @@ $status = (int) ($edit['status'] ?? 1);
|
|||
toolbar: [
|
||||
{ name: 'document', items: ['Source'] },
|
||||
{ name: 'clipboard', items: ['Undo', 'Redo'] },
|
||||
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', 'RemoveFormat'] },
|
||||
{ name: 'basicstyles', items: ['Bold', 'Italic', 'Underline', 'RemoveFormat'] },
|
||||
{ name: 'paragraph', items: ['NumberedList', 'BulletedList', 'Outdent', 'Indent', 'Blockquote'] },
|
||||
{ name: 'align', items: ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'] },
|
||||
{ name: 'links', items: ['Link', 'Unlink'] },
|
||||
{ name: 'insert', items: ['Image', 'Table', 'HorizontalRule', 'SpecialChar'] },
|
||||
{ name: 'insert', items: ['Table', 'HorizontalRule', 'SpecialChar'] },
|
||||
{ name: 'styles', items: ['Format', 'Font', 'FontSize'] },
|
||||
{ name: 'colors', items: ['TextColor', 'BGColor'] },
|
||||
{ name: 'tools', items: ['Maximize', 'ShowBlocks'] }
|
||||
],
|
||||
removeButtons: '',
|
||||
allowedContent: true,
|
||||
entities: false,
|
||||
basicEntities: false,
|
||||
fillEmptyBlocks: false
|
||||
{ name: 'tools', items: ['Maximize'] }
|
||||
]
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('CKEditor replace failed:', e);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user