Skip to main content
Known Participant
March 25, 2017
Answered

DW CC 2017 source code missing

  • March 25, 2017
  • 1 reply
  • 777 views

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

    This topic has been closed for replies.
    Correct answer Nancy OShea

    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


    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

    1 reply

    Nancy OShea
    Community Expert
    Community Expert
    March 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
    miz sueAuthor
    Known Participant
    March 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

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    March 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


    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