Jump to content

Recommended Posts

Posted

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?

Posted

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:

Posted (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 by RuiVP
More info
Posted

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.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...