Forum Discussion

JCCaianiello-c1's avatar
JCCaianiello-c1
Community Member
6 years ago

Code Snippet - Learning How To

Hi team,

I would like to know more about Code Snippets. Can someone refer me to a resource that will help me learn how to use Code Snippets in my Rise courses?

/jc

10 Replies

  • KarlMuller's avatar
    KarlMuller
    Community Member

    The Code Snippet block is used to display code without actually executing the code.

    So if you were creating a coding course in Rise, you would use the Code Snippet block to showcase an example of what good code looks like. The "code" is treated as text.

    That's all the Code Snippet block is about.

  • So is there a block to enter code into Rise to create something outside of the snippet box? 

    • LeaSAgato's avatar
      LeaSAgato
      Staff

      Hi Jessie, are you looking to add a block of code to run in Rise? If so, this is not supported in Rise at the moment. The code snippet block is only intended to display code in Rise.

  • Hi Lea, I know this is an old thread. However, I would like to find out if you have code highlighting as part of paragraphs on your product roadmap? For example, if you look at how Slack does it:

    • joshh-AS's avatar
      joshh-AS
      Community Member

      I figured out how to do it!! I provided a slightly expanded set of instructions in this forum post (linked here), but here's the gist. 

      Step 1: highlight some text and click on the "Math Equation" button

      Step 2: paste in some simple LaTeX, change colors as needed, and edit the code snippet.

      Step 3: enjoy an in-line code snippet! 

       

      Result: 

      LaTeX sample: 

      \definecolor{mybg}{rgb}{0.95, 0.95, 0.95}
      \definecolor{mytext}{rgb}{0.1, 0.1, 0.6}
      
      \colorbox{mybg}{\textcolor{mytext}{\texttt{inline code here}}}

       

  • Hi Sean,

    I appreciate you taking the time to share what you’d like to see in Rise 360. We currently have this logged as a feature request, so I’ll go ahead and include your voice. We’ll update this discussion if this feature makes it on our feature roadmap.

    Thanks for reaching out!

  • Hi all! how can I add a link in my presentation? ie, from youtube? is that possible? thank you!

    • KarlMuller's avatar
      KarlMuller
      Community Member

      Hi Jasmine,

      Create a Multimedia Embed block.

      Edit the block and replace the default URL with the YouTube URL.

  • Is there a setting which allows me to enable a "copy" button in the code block so that the learner can copy this snippet in one click rather than having to use "ctrl+c" or "right click + copy"