Lessons that display code
Lessons that display code
Aug 22, 2008
How to display code when creating lessons at Clivir
Category: Reference & Education
Classroom: Clivir





Got code?

So if you got a lesson on html, php or some other code it is likely you will want to display code.

Normally displaying code is best done using the pre tag

How to display the code at Clivir

We are using an editor and a filter at Clivir and this alters the way we can use and then show code. So you will need to jump through a few hoops to show your code..sorry.

Use the Source button to get to the source code of your lesson.

Source button

Then place all code for display with pre tags like this:

This code will not display in the WYSIWYG part of the editor but will be visible in the source and when viewed as lesson.

The code will be given line numbers to assist with code descriptions.

  1. <title>Edit lesson: Lessons that display code</title>
  2. <base href="http://www.clivir.com/" />

There are a few bugs. One of which is re-submitting lesson after edit will cause the lines of code to become one. We do hope to have a better workaround for those in future who wish to display code as part of their lessons.


Comments

Would you like to comment?

Sign up for a free account, or sign in (if you're already a member).