Skip to main content
Inspiring
September 24, 2014
Question

CPM.js only generated when publishing?

  • September 24, 2014
  • 4 replies
  • 3040 views

Is the CPM.js file only generated when you're publishing a Captivate file? I want to modify a few lines of code, like you can with the index.html file so you don't have to modify the published file each time, but as it's not located in my Adobe Captivate 8 x64\HTML\assets\js folder I'm guessing that Captivate only generates it when you publish to HTML5.

    This topic has been closed for replies.

    4 replies

    CozmiconeAuthor
    Inspiring
    October 7, 2014

    I was wanting to edit all of the font calls that didn't conform to Google's open font CSS specifications, but I ended up using a CSS reset type of entry at the beginning of the index.html file that allowed me to hit pretty much every selector with the same information. I did have to add in the .cpMainContainer and .style selector, but the following allowed me to set all dynamically created text to the same Google font.

    html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address,  big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video, .cpMainContainer, .style {

        font-family: 'Open Sans', sans-serif !important;

        font-weight: 600 !important;

    }

    I couldn't use the Captivate's Style Manager for some of the things I wanted to change because the resulting CPM.js file was referencing the font incorrectly because you have to reference the font-family on one line of CSS and the font-weight on another. It's possible that all the selectors aren't necessary for doing what I want, but it works so I'm happy.

    windscorpion
    Inspiring
    October 8, 2014

    Yeah thats good (you probably don't need to include everything as Captivate seems to use <p> for most stuff but i guess as long as it works...) it also works with Edge Fonts.

    Though in my case i need to use different fonts on a slide so this isn't any good for me but if that changes then its good to know

    CozmiconeAuthor
    Inspiring
    September 30, 2014

    Well that's unfortunate. I was hoping to avoid doing anything more post-publish.

    TLCMediaDesign
    Inspiring
    October 1, 2014

    What is it that you want to edit? If you create a custom js file and make sure that it is loaded after the CPM.js it will use the functions/code that are outside of the JSON object in the CPM.js. Your custom code will overwrite the same code/functions in the CPM.js.

    windscorpion
    Inspiring
    September 25, 2014

    Yes you need to edit it after publishing. I wrote a script to do it for my projects.

    TLCMediaDesign
    Inspiring
    September 24, 2014

    I believe it's in the CPHTMLPublish.dll. It has to be created when publishing since your project JSON object is in there.