Code Monkey home page Code Monkey logo

Comments (3)

skitterm avatar skitterm commented on July 28, 2024

Hi Sam,

Glad to hear you're interested in customizing Cascade! We don't have any documentation for adding a custom media type (our docs mainly describe how to download and self-host the application). Adding a new media type is possible, but fairly complex. The media types extend a common base class, but they often have their own behavior. What's more, these media types often act differently depending on where they are in the story (in the cover, in an immersive section background, or a narrative section block).

Off the top of my head, at minimum you would need to:

  1. Add a class for the new media item (like this)
  2. Give it a handlebars template for the immersive section background (like this)
  3. Add it to the "add media" menu

You can see how the pattern works with the webpage media type in these links. For the webpage.jsx code itself, render injects the handlebars template with the data, and postCreate is called after that template is in the DOM (so any DOM manipulation/3rd-party library code can go there).

If you can get away with adding the chart control to your Cascade as a webpage (instead of coding up a new media type), I'd do that. You could even have the Cascade app and the webpage "talk" to each other if you needed events.

from storymap-cascade.

SamDrummond avatar SamDrummond commented on July 28, 2024

Thanks so much @skitterm. Sorry this has taken me so long to reply. It will be a little longer before I get a chance to try your advice but will keep you in the loop on my progress.

from storymap-cascade.

skitterm avatar skitterm commented on July 28, 2024

@SamDrummond I'm going to close this ticket; let us know if you run into any further issues.

from storymap-cascade.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.