GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - banqii/poster: HTML Canvas based code editor

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

297 Commits
297 Commits

Folders and files

NameName
Last commit message
Last commit date
images
images
 
 
source
source
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
gulpfile.js
gulpfile.js
 
 
index.html
index.html
 
 
package.json
package.json
 
 
poster.sublime-project
poster.sublime-project
 
 
style.css
style.css
 
 

Repository files navigation

Poster

Join the chat at https://gitter.im/jdfreder/poster

HTML5 canvas based code editor.
Demo at http://jdfreder.github.io/poster/.

Install

First install node.js.
Then install Poster inside the directory that you will be using it in:

npm install posterjs

Use (via HTML)

In an HTML file:

<html>
    <head>
        <link rel="stylesheet" type="text/css" href="node_modules/posterjs/build/poster.css">
        <script type="text/javascript" src="node_modules/posterjs/build/poster.js"></script>
    </head>
    <body>
        <div id="demo"></div>
        <script type="text/javascript">
            var demo_element = document.getElementById('demo');
            var poster = new poster.Poster();
            demo_element.appendChild(poster.el);

            // Set Poster's size, language, and value.
            poster.width = 600;
            poster.height = 300;
            poster.language = 'javascript';
            poster.value = "// Code here...";
        </script>
    </body>
</html>

Loading additional languages

Download the language(s) files you want to use from PrismJS's repository here. Place the files in the directory that you're using Poster in. Then inside your document's <head> tag, include the Javascript file(s) after Poster. i.e. Using the above example, adding support for Python:

<html>
  <head>
    <link rel="stylesheet" type="text/css" href="node_modules/posterjs/build/poster.css">
    <script type="text/javascript" src="node_modules/posterjs/build/poster.js"></script>
    <script type="text/javascript" src="prism-python.min.js"></script>
  </head>
  <body>
    <div id="demo"></div>
    <script type="text/javascript">
        var demo_element = document.getElementById('demo');
        var poster = new poster.Poster();
        demo_element.appendChild(poster.el);

        // Set Poster's size, language, and value.
        poster.width = 600;
        poster.height = 300;
        poster.language = 'python';
        poster.value = "# Code here...";
    </script>
  </body>
</html>

Build

Runtime Poster doesn't depend on any libraries, prism.js is built into it for syntax highlighting. Building Poster is simple. First (fork&)clone this repository:

git clone https://github.com/jdfreder/poster.git
cd poster

Install node.js and then install the other dependencies:

npm install

Now you can build Poster:

gulp

The compiled output will be written to the build directory.

About

HTML Canvas based code editor

Resources

Readme
BSD-3-Clause license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.