Copy link to clipboard
Copied
Hello,
I just upgraded to DW CC 2017 for the pc. I use DW as an html text editor for editing ebooks. My previous DW was CS3 and I loved it. The file I'm having problems with contains audio and this relates to the control. In CS3 all the audio components showed. When I work on the same files in CC 2017, the code is missing. I do a find and replace, update the code and save. When I go back to the html file to make additional changes, the code disappears.
Here is a sample:
<p class="audio-tour"><audio class="audio1" id="audio1" src="audio/01_HistoricParisWalk.mp3" controls><strong>Please note: to hear these audio tours, your device must support embedded audio.</strong></audio>
I find and replace:
controls> with controls="controls">
and add </p> after </audio>
Validation fails without these codes. I can't keep replacing this code for every file, every time. Is this a bug? Is this something missing in my settings? Any suggestions would be greatly appreciated.
Thanks,
Sue
You must remember DW is 1st & foremost a web standards-based code editor for creating web pages. It's not an EBUB generator for which different rules apply.
Go to Preferences and turn off code Linting on HTML and disable Code Rewriting options if any are selected. Hit Apply button.
Nancy
Copy link to clipboard
Copied
DW CC 2017 does not like code errors. To use the <audio> tag, you need an HTML5 document.
Try this instead.
<audio class="audio1" id="audio1" src="audio/01_HistoricParisWalk.mp3" controls></audio>
<p class="audio-tour"><strong>Please note: to hear these audio tours, your device must support embedded audio.</strong></p>
Nancy
Copy link to clipboard
Copied
Hi Nancy,
Thanks for your reply. So basically, don't nest the audio codes within html5. What about the controls="controls" not displaying?
Sue
Copy link to clipboard
Copied
control="controls" is superfluous It's not required in HTML5 <audio> because controls is a boolean variable. It's either on or not on.
Controls is all that's required by modern browsers.
HTML/Elements/audio - W3C Wiki
Nancy
Copy link to clipboard
Copied
Nancy - thank you so much!!! I will test that out on Monday and report back.
Copy link to clipboard
Copied
Hi Nancy,
To follow up, I tried your suggestion but my epub failed validation. According to IDPF and Epub3 standards, audio must be displayed in ebooks as:
<audio src="audio/clip12.mp3" controls="controls"> <div class="err"> <p> Sorry, it appears your system does not support audio playback. </p> </div></audio>I have always used controls="controls". So my problems still remains that DW CC2017 won't retain controls="controls" even though I repeatly reinsert it. Is there a setting with DW that I need to indicate that I'm doing html for epubs vs. web use? I like using DW as a text editor as I can see the design as I work in the code.
Thanks,
Sue
Copy link to clipboard
Copied
You must remember DW is 1st & foremost a web standards-based code editor for creating web pages. It's not an EBUB generator for which different rules apply.
Go to Preferences and turn off code Linting on HTML and disable Code Rewriting options if any are selected. Hit Apply button.
Nancy
Copy link to clipboard
Copied
That did it!!! Thanks so much Nancy! That has saved my sanity.
Have a wonderful day!
Thanks,
Sue
Find more inspiration, events, and resources on the new Adobe Community
Explore Now