Use this extension to render Audio element. The extension uses Plyr as the playback interface.
Custom HTML attributes that should be added to the rendered HTML tag.
Audio.configure({
HTMLAttributes: {
class: "my-custom-class",
},
});
If you need to internationalize this extension, you can use this option.
Audio.configure({
dictionary: {
name: "Audio",
inputSrc: "Enter or paste link",
inputAlt: "Audio description",
inputTitle: "Audio title",
audioOpen: "Open audio",
audioUpload: "Upload audio",
audioDelete: "Delete audio",
},
});
Whether to set the audio extension to inline mode.
Audio.configure({
inline: false,
});
Insert a new audio element.
editor.commands.setAudio({
src: "https://example.com",
title: "example title",
align: "center",
width: "100px"
});
:audio{https://example.com}
:audio{https://example.com}