Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
IOS Hotels
and
IOS Rentals
online booking systems for Elxis CMS.
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Issue with Audio tag in Jodit Editor
« previous
next »
Print
Pages: [
1
]
Author
Topic: Issue with Audio tag in Jodit Editor (Read 5623 times)
seadhna
Hero Member
Posts: 507
Issue with Audio tag in Jodit Editor
«
on:
May 26, 2020, 14:42:46 »
Hi datahell,
how do you recommend making audio available in Elxis 5?
If I use the audio tag, each time I save the article, this code gets added outside the audio tag:
<jodit-media data-jodit-temp="1" contenteditable="false" draggable="true" data-jodit_fake_wrapper="1" style="display: block; width: 300px; height: 54px;">
<audio controls="">
<source src="
https://www.example.org/example.mp3
" type="audio/mpeg">
Your browser does not support the audio tag.
</audio>
</jodit-media>
Each time I save it gets added again; soon looking like this, and preventing CSS from working:
<jodit-media data-jodit-temp="1" contenteditable="false" draggable="true" data-jodit_fake_wrapper="1" style="display: block; width: 300px; height: 54px;">
<jodit-media data-jodit-temp="1" contenteditable="false" draggable="true" data-jodit_fake_wrapper="1" style="display: block; width: 300px; height: 54px;">
<jodit-media data-jodit-temp="1" contenteditable="false" draggable="true" data-jodit_fake_wrapper="1" style="display: block; width: 300px; height: 54px;">
<jodit-media data-jodit-temp="1" contenteditable="false" draggable="true" data-jodit_fake_wrapper="1" style="display: block; width: 300px; height: 54px;">
<jodit-media data-jodit-temp="1" contenteditable="false" draggable="true" data-jodit_fake_wrapper="1" style="display: block; width: 300px; height: 54px;">
<jodit-media data-jodit-temp="1" contenteditable="false" draggable="true" data-jodit_fake_wrapper="1" style="display: block; width: 300px; height: 54px;"><audio controls="">
<source src="
https://www.pgaction.org/media/audio/members/valerie-woods-04.mp3
" type="audio/mpeg">
Your browser does not support the audio tag.
</audio></jodit-media>
</jodit-media>
</jodit-media>
</jodit-media>
</jodit-media>
</jodit-media>
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Issue with Audio tag in Jodit Editor
«
Reply #1 on:
May 26, 2020, 21:59:41 »
You are right, there is problem. For now, clear the wrapping elements Jodit adds before save. Would you like to create an
Elxis plugin for audio
? If that helps, I can develop a plugin similar to the built-in HTML5 video plugin.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
armpouniotis
Sr. Member
Posts: 377
Re: Issue with Audio tag in Jodit Editor
«
Reply #2 on:
May 26, 2020, 22:52:20 »
An Elxis audio plugin will be very helpful !
I really need something like !
I want to embed audio files in my websites, but not in video format, as I am doing now !
Hurry up !
Christos
Logged
Christos Armpouniotis
datahell
Elxis Team
Hero Member
Posts: 10356
HTML5 audio player plugin
«
Reply #3 on:
May 27, 2020, 21:48:16 »
The
audio player plugin
is ready, you can
download it from EDC
.
HTML5 audio plugin usage instructions
Sample integrations of
HTML5 audio plugin
in Elxis editor.
Local file uploaded in media/audio/ folder:
{audio}myfile.mp3{/audio}
Multiple local files uploaded in media/audio/ folder:
{audio}myfile.mp3,myfile.ogg,myfile.wav{/audio}
Remote file:
{audio}https://www.html5tutorial.info/media/vincent.mp3{/audio}
Multiple remote files:
{audio}https://www.html5tutorial.info/media/vincent.mp3,https://www.html5tutorial.info/media/vincent.ogg{/audio}
Supported file types:
mp3
,
ogg
and
wav
.
«
Last Edit: May 27, 2020, 21:50:01 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
bledi
Full Member
Posts: 244
Re: Issue with Audio tag in Jodit Editor
«
Reply #4 on:
May 31, 2020, 13:00:48 »
The plugin works fine but below it shows error: Your browser does not support the audio element.
I have the latest Chrome version, the same happens with Firefox....maybe a ssl issue..
Attachement below
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Issue with Audio tag in Jodit Editor
«
Reply #5 on:
May 31, 2020, 21:11:17 »
The plugin is fine.
Not all files can be played with all the browsers.
Even if, for example firefox can play a file on windows, it might not be able to play the same file on android. The most important thing to notice is the codec used. Most codecs are patented/commercial. If you use commercial codecs the audio might not be played. An other tip is to use multiple files for the same audio track (for instance both mp3 and ogg). Note 1: mp3 is a patented format. Note 2:
ogg with vorbis codec is the best option for audio
.
More help
MP3 to OGG online converter
Audio plugin implementation with both mp3 and ogg files:
{audio}test.mp3,test.ogg{/audio}
«
Last Edit: May 31, 2020, 21:20:38 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
bledi
Full Member
Posts: 244
Re: Issue with Audio tag in Jodit Editor
«
Reply #6 on:
May 31, 2020, 22:25:46 »
OK, great, useful info.
It may be a very good, and quick info tool, sometime.
Also what i would to like to mention for the future is a plugin for:
Tooltip wiki, like wikipedia tool tip or info. I made that with html and css, taken from internet, but not so nice and good looking, as an elxis plugin may be.
Logged
datahell
Elxis Team
Hero Member
Posts: 10356
Re: Issue with Audio tag in Jodit Editor
«
Reply #7 on:
June 01, 2020, 21:04:51 »
You dont need a plugin for tooltips. Just add your desired tooltip's js and/or css files to your template's index.php file and integrate them with the editor. Most tooltips work with a special css class and the element's "title" attribute or with "data" attribute (eg data-tooltip). There are js and css tooltips. I advice you to avoid big js scripts that requires jquery. CSS tooltips are now a good choice.
Here is a example with
microtip
(CSS only):
CSS file to include:
https://github.com/ghosh/microtip/blob/master/microtip.css
HTML:
<span aria-label="Hey tooltip!" role="tooltip">Hover to see tooltip</span>
There are many many other tooltips on the internet
«
Last Edit: June 01, 2020, 21:13:54 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
seadhna
Hero Member
Posts: 507
Re: Issue with Audio tag in Jodit Editor
«
Reply #8 on:
June 02, 2020, 16:41:35 »
Hi datahell,
thanks for this! It would be great to have the ability to add an image and a caption. At the moment, I can do this by using the IMAGE plugin and the AUDIO plugin and then combining them within the same parent container in the code.
Regarding bledi's comment: "The plugin works fine but below it shows error: Your browser does not support the audio element."
I notice a little glitch that makes this error message appear even if the audio file is valid.
If the plugin is inside <p> tags, it's ok, but if the plugin is inside <p> tags and there is a line-break immediately after the opening <p> tag, the error message appears below the audio player on the front-end.
i.e. NO ERROR MESSAGE:
<p><code class="elx5_plugin">{audio}example.mp3 {/audio}</code></p>
ERROR MESSAGE APPEARS BELOW AUDIO PLAYER:
<p><br><code class="elx5_plugin">{audio}example.mp3 {/audio}</code></p>
Logged
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
Elxis 4.x/5.x DEV
»
Issue with Audio tag in Jodit Editor