Git Product home page Git Product logo

snippet's Introduction

snippet

snippet is a tinymce v4.0 plugin build on Snippet "jQuery syntax highlighting plugin" built on SHJS script and snippetcache script .

to use it copy snippet folder into tinymce plugins folder.

and config the editor to show snippet plugin: var scriptLoader = new tinymce.dom.ScriptLoader(); scriptLoader.add('path/to/js/jquery-1.9.1.min.js'); tinymce.init({ selector: "textarea", theme: "modern", plugins: [ "table preview image link media insertdatetime code snippet" ], toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image snippet", toolbar2: "print preview media | forecolor backcolor emoticons", templates: [ {title: 'Test template 1', content: 'Test 1'}, {title: 'Test template 2', content: 'Test 2'} ] });

to display the syntax highlighting for codes don't forget add this links in your page: <script type="text/javascript" src="path/to/js/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="path/to/js/jquery-migrate-1.1.1.min.js"></script> <script type="text/javascript" src="path/to/js/jquery.snippet.min.js"></script> <script type="text/javascript" src="path/to/js/jquery.snippet.run.js"></script> <link rel="stylesheet" type="text/css" href="path/to/css/jquery.snippet.min.css">

snippet run autmaticly when page is loaded if you want to run snippet whith other event just use runSnippent() function.

snippet's People

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

mishra1947

snippet's Issues

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.