shinkan-jinkendo/frontend/src/constants/inlineExerciseMedia.js
Lars 311a106d93
All checks were successful
Deploy Development / deploy (push) Successful in 33s
Test Suite / pytest-backend (push) Successful in 24s
Test Suite / lint-backend (push) Successful in 0s
Test Suite / build-frontend (push) Successful in 7s
Test Suite / playwright-tests (push) Successful in 27s
feat(exercises): enhance inline media functionality and update styles
- Updated inline media markup to include a new data attribute for media size.
- Enhanced the Rich Text Editor to support media size selection when inserting inline media.
- Improved CSS styles for inline media display, accommodating different sizes (small, medium, full).
- Bumped version to 0.8.62 and updated changelog to reflect these changes.
2026-05-08 12:00:02 +02:00

15 lines
536 B
JavaScript

/** Inline-Medium im Fließtext §11 — Darstellung (CSS + data-shinkan-exercise-media-size). */
export const INLINE_MEDIA_SIZES = [
{ value: 'small', label: 'Klein (~33 %)' },
{ value: 'medium', label: 'Mittel (~66 %)', default: true },
{ value: 'full', label: 'Volle Breite' },
]
export const DEFAULT_INLINE_MEDIA_SIZE = 'medium'
export function sanitizeInlineMediaSize(v) {
const s = String(v || '').toLowerCase().trim()
if (s === 'small' || s === 'medium' || s === 'full') return s
return DEFAULT_INLINE_MEDIA_SIZE
}