RuiVP Posted 2 hours ago Posted 2 hours ago I need to insert in a inputfield (textarea) a player for sound (either mp3 or wav). It seems TinyMCE strips out the tag <audio src="..."></audio>. Any ideas about what I'm missing?
howdytom Posted 2 hours ago Posted 2 hours ago I guess you have to enable the TinyMCE media plugin in your field settings → Input. It's in the Plugins section. Also, make sure to add the media type to the toolbar. Personally I try to avoid adding audio elements to the WYSIWYG editor. As a quick solution you could create a text field to reference a file path or add a file field which provide a upload option. <audio controls> <source src='{$file->url}' type='audio/mpeg'> </audio> Updated:
RuiVP Posted 1 hour ago Author Posted 1 hour ago (edited) Media plugin is enabled. The file is in the inputfield files in the page. It doesn't work. The files inputfield allows wav and mp3 extensions, amongst others. Edited 1 hour ago by RuiVP More info
millipedia Posted 59 minutes ago Posted 59 minutes ago You could use @teppo's Audio Embed Textformatter which converts URLs which reference audio files into an audio tag.
RuiVP Posted 43 minutes ago Author Posted 43 minutes ago Thanks, @millipedia. I used Audio Embed Textformatter in the past, in another site, together with Video Embed and so on (pdf, etc.). But it would be much simpler and more elegant to use a universal "insert media..." in TinyMCE. As a last resource, while I wait for a uniform solution, I'm using a Hanna code to embed the audio without forcing the person who is editing to deal with code. But I'm not completely satisfied with this partial solution, I confess.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now