AHHH recent change broke extensions.
When adding support for Media Manager a rather brute if/else statement was added hard-coding the 3 known tag types.
This has broken my gpx-plugin which adds its own tag.
FriendsOfFlarum/upload03bd491
export default function fileToBBcode(file) {
switch (file.tag()) {
// File
case 'file':
return `[upl-file uuid=${file.uuid()} size=${file.humanSize()}]${file.baseName()}[/upl-file]`;
// Image template
case 'image':
return `[upl-image uuid=${file.uuid()} size=${file.humanSize()} url=${file.url()}]${file.baseName()}[/upl-image]`;
// Image preview
case 'image-preview':
return `[upl-image-preview url=${file.url()}]`;
// 'just-url' or unknown
default:
return file.url();
}
}
Display of my tag still works if I manually craft the bbcode, but it no longer gets replaced in the editor automatically 🙁