Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

DW CC 2017 source code missing

Explorer ,
Mar 25, 2017 Mar 25, 2017

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

788
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 27, 2017 Mar 27, 2017

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

Translate
Community Expert ,
Mar 25, 2017 Mar 25, 2017

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

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 25, 2017 Mar 25, 2017

Hi Nancy,

Thanks for your reply. So basically, don't nest the audio codes within html5. What about the controls="controls" not displaying?

Sue

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 25, 2017 Mar 25, 2017

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

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 25, 2017 Mar 25, 2017

Nancy - thank you so much!!! I will test that out on Monday and report back.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 27, 2017 Mar 27, 2017

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:

  1. <audio src="audio/clip12.mp3" controls="controls">
  2.    <div class="err">
  3.    <p>
  4.   Sorry, it appears your system does not support audio playback.
  5.    </p>
  6.    </div>
  7. </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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 27, 2017 Mar 27, 2017

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

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 27, 2017 Mar 27, 2017
LATEST

That did it!!! Thanks so much Nancy! That has saved my sanity.

Have a wonderful day!

Thanks,

Sue

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines