Click to show TOC

Added DIV creation tool



I started TryITjs to help me with a simple problem. I wanted a quick way to create tutorials for open source Javascript libraries. Like most open source libraries for NPM, I was using GitHub for my git repository and publishing to NPM. All thers tools work beautifully together. Once I had a library published, it was sitting on GitHub, but I also had to create documentation. Internal API documentation is essential and ESDoc or JSDoc create nice HTML documentation. But it is hard to get much from the API doc. I guess some people may love to read API documentation, but I do not. Secondly GitHub does no render HTML file for security reasons, in particulalar XSS (cross site scripting). This means that the API docs have to be hosted somewhere else. The buttom line, it is too hard to find something on GitHub and checkout what it does without taking a great deal of effort.

What does it do

  • This is an interactive tutorial on how create TryItJS can be use to document a API.
  • Tutorial.try => Tutorial.html
  • A try file is a slightly enhanced markdown file
  • The html generated is fully self contained

What is a .try file

  !head --- to be a page this must be at the top of the page
      .... HTML HEAD elements go here ...
      .... Markdown elements go here ...    
      ... some inline HTML markup goes here...

  @@include xxx.try  --- this includes the body of the file 'xxx.tyy' here (a page fragment)
        ... Javascript the user can edit and execute goes here .... 

  !end --- end of the file
        ... HTML ot add to the bottom of the page goes here...  

Something fun

Use a javascript library two.js (using sample on their webpage) to create a physics simulation


Another Example

Just copied code from two.js and pasted it into the example. This an example using a physics engine. Please feel to play with the code. You cannot mess up.

Ctrl+z undo
Ctrl+s save changes you have made in the browser for future use


Page - 1