Skip to content

Create at maximun 4 tabs of textarea content to share code with highlights with URL without server and databases

License

Notifications You must be signed in to change notification settings

ZhengLinLei/paste-code

Repository files navigation

Paste Code

License

🎉 Paste Code Editor 2023 New Update! 🎉

Try it! https://zhenglinlei.github.io/paste-code/


Index

Updates

  • 2023 - 11 - 24 Auto execute your code shared by enabling it in terminal with command run set-url and disable it with run unset-url

  • 2023 - 11 - 13 Stash the windows for better view, simple and clean interface. Double click the window and you will see the effect

  • See more - 2023 - 01 - 09: New update! Have you ever dreamed to execute javascript in Paste Code? Now you can do it! Just type execute or run in the terminal. For example, if you want to execute console.log('Hello World!') in the window 0, you can write execute 0 or run 0 in the terminal.

  • See more - 2023 - 01 - 05: Themes for everyone. Yeeeeeeeey 🙈 🙉 🙊 How to customise your theme? Just type theme set <theme> in the terminal. You can also use theme list to see all available themes.

  • See more - 2023 - 01 - 04: Surprise! We have a new update! Customise your editor with the help of our inner terminal. You can use help to get more information. (Beta version)

  • See more - 2023 - 01 - 02: New UI and funtionalities. Code line numbers and new Button Styles.


Plain Text Editor

Also can try our notebook paste: https://github.com/ZhengLinLei/paste


What is this? 🤔

This is a service made in client-side javascript. It turns code into LZMA-compressed, Base64-encoded URLs. You can use this editor to share code with your friends or even with the whole world like your boss or manager without any server-side code.


How do I use it? 😏

Paste your code into the text box, and click the "Paste" button. The URL will be updated to reflect the new paste. You can also use the "Copy" button to copy the URL to your clipboard.


How to activate highlighting? 🫣

Just only write !<LANGUAGE> at the beginning of the text. For example, if you want to highlight the code as python, you can write !PYTHON or !PY at the beginning of the text.

The supported languages are as follows in this file: languages


What can I do with it? 🤨

You can open more than one tab and paste different code into each tab. And share it in markdown community without spamming so much content. They can open the URLs and see the text you pasted. Also can create the same URL by pasting the same text. This is useful for sharing code snippets. You can also use it to share text with your friends.


Example

This is an example of the source code of our project: paste and other example paste2


Editor Terminal

This editor let you use the inline terminal and execute command as a proffesional developer and at the same time can write or paste code online to share with the friends or in the work. See TERMINAL.md for more information and updates.


Editor Themes

And of course every developer want their own environment to work with. So you can choose your own theme for the editor with the command theme set [--theme-name] and get the list with theme list. See THEME.md for more information and updates.


Execute code in terminal

You can execute code in the terminal with the command execute [--window-number] and get the list of supported language with execute list. See EXECUTER.md for more information and updates.

You should try our executer. You will love it ❤️.


Dependencies

This project uses lzma.js and native Base64 functions to compress the code.

And use the prism.js to highlight the code.


License

MIT License


Supported language

Language !lang Language !lang Language !lang
HTML !HTML XML !XML SVG !SVG
MathML !MATHML SSML !SSML Atom !ATOM
CSS !CSS C-like !CLIKE JavaScript !JS !JAVASCRIPT
ABAP !ABAP ABNF !ABNF ActionScript !ACTIONSCRIPT
Ada !ADA Agda !AGDA AL !AL
ANTLR4 !ANTLR4 !G4 Apache Configuration !APACHECONF Apex !APEX
APL !APL AppleScript !APPLESCRIPT AQL !AQL
Arduino !ARDUINO !INO ARFF !ARFF ARM Assembly !ARMAASM !ARM-ASM
Arturo !ARTURO !ART AsciiDoc !ASCIIDOC !ADOC ASP.NET (C#) !ASPNET
6502 Assembly !ASM6502 Atmel AVR Assembly !ASMATMEL AutoHotkey !AUTOHOTKEY
AutoIt !AUTOIT AviSynth !AVISYNTH !AVS Avro IDL !AVRO-IDL !AVDL
AWK !AWK !GAWK Bash !BASH !SH !SHELL BASIC !BASIC
Batch !BATCH BBcode !BBCODE !SHORTCODE BBj !BBJ
Bicep !BICEP Birb !BIRB Bison !BISON
BNF !BNF !RBNF BQN !BQN Brainfuck !BRAINFUCK
BrightScript !BRIGHTSCRIPT Bro !BRO BSL (1C:Enterprise) !BSL !OSCRIPT
C !C C# !C# !C-SHARP !DOTNET C++ !C++ !CPP
CFScript !CFSCRIPT !CFC ChaiScript !CHAISCRIPT CIL !CIL
Cilk/C !CILKC !CILK-C Cilk/C++ !CILKC++ !CILK-C++ !CILK Clojure !CLOJURE
CMake !CMAKE COBOL !COBOL CoffeeScript !COFFEESCRIPT !COFFEE
Concurnas !CONCURNAS !CONC Content-Security-Policy !CSP Cooklang !COOKLANG
Coq !COQ Crystal !CRYSTAL CSS Extras !CSS-EXTRAS
CSV !CSV CUE !CUE CWeb !CWEB !CWEB-TEX !CWEBTEX
Cypher !CYPHER D !D Dart !DART
DataWeave !DATAWEAVE !DW DAX !DAX Dhall !DHALL
Diff !DIFF Django/Jinja2 !DJANGO !JINJA2 DNS zone file !DNS-ZONE-FILE !DNS-ZONE
Docker !DOCKER !DOCKERFILE DOT (Graphviz) !DOT !GV EBNF !EBNF
EditorConfig !EDITORCONFIG Eiffel !EIFFEL EJS !EJS !ETA
Elixir !ELIXIR Elm !ELM Embedded Lua templating !ETLUA
ERB !ERB Erlang !ERLANG Excel Formula !EXCEL-FORMULA !XLSX !XLS
F# !F# !F-SHARP Factor !FACTOR False !FALSE
Firestore security rules !FIRESTORE-SECURITY-RULES Flow !FLOW Fortran !FORTRAN
FreeMarker Template Language !FTL GameMaker Language !GML !GAMEMAKERLANGUAGE GAP (CAS) !GAP
G-code !GCODE GDScript !GDSL GEDCOM !GEDCOM
gettext !GETTEXT !PO GLSL !GLSL Go !GO
Go Module !GO-MODULE !GO-MOD Gradle !GRADLE GraphQL !GRAPHQL
Groovy !GROOVY Haml !HAML Handlebars !HANDLEBARS !HBS !MUSTACHE
Haskell !HASKELL !HS Haxe !HAXE HCL !HCL
HLSL !HLSL Hoon !HOON HTTP !HTTP
HTTP Public-Key-Pins !HPKP HTTP Strict-Transport-Security !HSTS IchigoJam !ICHIGOJAM
Icon !ICON ICU Message Format !ICU-MESSAGE-FORMAT Idris !IDRIS !IDR
.ignore !IGNORE !GITIGNORE !HGIGNORE !NPMIGNORE Inform 7 !INFORM7
Ini !INI Io !IO J !J
Java !JAVA JavaDoc !JAVADOC !JAVADOC-LIKE Java stack trace !JAVA-STACK-TRACE
Jexl !JEXL Jolie !JOLIE JQ !JQ
JSDoc !JSDOC JS Extras !JS-EXTRAS JSON !JSON !WEBMANIFEST
JSON5 !JSON5 JSONP !JSONP JS stack trace !JS-STACK-TRACE
JS Templates !JS-TEMPLATES Julia !JULIA Keepalived Configure !KEEPALIVED
Keyman !KEYMAN Kotlin !KOTLIN !KT !KTS KuMir (КуМир) !KUMIR !KUM
Kusto !KUSTO LaTeX !LATEX !TEX !CONTEXT Latte !LATTE
Less !LESS LilyPond !LILYPOND !LY Liquid !LIQUID
Lisp !LISP !EMACS !ELISP !EMACS-LISP LiveScript !LIVESCRIPT LLVM IR !LLVM
Log file !LOG LOLCODE !LOLCODE Lua !LUA
Magma (CAS) !MAGMA Makefile !MAKEFILE Markdown !MARKDOWN !MD
Markup templating !MARKUP-TEMPLATING Mata !MATA MATLAB !MATLAB
MAXScript !MAXSCRIPT !MEL Mermaid !MERMAID METAFONT !METAFONT
Mizar !MIZAR MongoDB !MONGODB Monkey !MONKEY
MoonScript !MOONSCRIPT !MOON N1QL !N1QL N4JS !N4JS !N4JSD
Nand To Tetris HDL !NAND2TETRIS-HDL Naninovel Script !NANISCRIPT !NANI NASM !NASM
NEON !NEON Nevod !NEVOD nginx !NGINX
Nim !NIM Nix !NIX NSIS !NSIS
Objective-C !OBJECTIVEC !OBJC OCaml !OCAML Odin !ODIN
OpenCL !OPENCL OpenQasm !OPENQASM !QASM Oz !OZ
PARI/GP !PARIGP Parser !PARSER Pascal !PASCAL !OBJECTPASCAL
Pascaligo !PASCALIGO PATROL Scripting Language !PSL PC-Axis !PCAXIS !PX
PeopleCode !PEOPLECODE !PCODE Perl !PERL PHP !PHP
PHPDoc !PHPDOC PHP Extras !PHP-EXTRAS PlantUML !PLANT-UMl !PLANTUML
PL/SQL !PLSQL PowerQuery !POWERQUERY !PQ !XLSX !XLS Processing !PROCESSING !PDE
Prolog !PROLOG Properties !PROPERTIES !PROPS Protocol Buffers !PROTOBUF !PROTO
Public-Key-Pins !PUBKEY-PINS Puppet !PUPPET !PP PureBasic !PUREBASIC !PB
PureScript !PURESCRIPT !PSC Python !PYTHON !PY Python console !PYCON
Q# !QSHARP !QS Q (kdb+ database) !Q QML !QML
Qore !QORE R !R ReasonML !REASON !RE
Racket !RACKET !RKT Razor C# !RAZOR !CSHTML React JSX !REACT !JSX
React TSX !REACT-TSX !TSX Reason !REASON !RE Regex !REGEX
Rego !REGO Ren'py !RENPY !RPY ReScript !RESCRIPT !RES
reST (reStructuredText) !REST !RESTRUCTUREDTEXT Rip !RIP
Roboconf !ROBOCONF Robot Framework !ROBOTFRAMEWORK !ROBOT Ruby !RUBY !RB
Rust !RUST SAS !SAS Sass (Sass) !SASS
Sass (SCSS) !SCSS Scala !SCALA Scheme !SCHEME
Shell session !SHELL-SESSION !SH-SESSION !SHELLSESSION Smali !SMALI
Smalltalk !SMALLTALK Smarty !SMARTY SML !SML !SMLNJ
Solidity (Ethereum) !SOLIDITY !SOL Solution file !SOLUTION-FILE !SLN Soy (Closure Template) !SOY
SPARQL !SPARQL !RQ Splunk SPL !SPLUNK SQL !SQL
Squirrel !SQUIRREL !SQF Stan !STAN Stata Ado !STATA !ADO
Structured Text (IEC 61131-3) !IEC-61131-3 !IECST !IEC-61131-3-ST Stylus !STYLUS
SuperCollider !SUPERCOLLIDER !SCLANG Swift !SWIFT !SWIFT3 !SWIFT4 Systemd configuration file !SYSTEMD
Swift !SWIFT T4 templating !T4-TEMPLATING !T4 T4 Text Templates (C#) !T4-CS !T4-C# !T4-CSHARP !T4-C-Sharp !T4-C-Sharp-Sharp
T4 Text Templates (VB) !T4-VB !T4-VISUALBASIC !T4-VISUAL-BASIC TAP !TAP
Tcl !TCL Template Toolkit 2 !TT2 !TEMPLATE-TOOLKIT !TEMPLATE-TOOLKIT2
Textile !TEXTILE TOML !TOML Tremor !TREMOR !TRICKLE !TROY
Turtle !TURTLE !TRIG Twig !TWIG TypeScript !TYPESCRIPT !TS
TypoScript !TYPOSCRIPT !TSCONFIG UnrealScript !UNREALSCRIPT !USCRIPT !UC
UO Razor Script !UORAZOR URI !URI !URL V !V
Vala !VALA VB.Net !VBNET !VB !VB-NET VBA !VBA
Velocity !VELOCITY Verilog !VERILOG !VLOG VHDL !VHDL
Vim script !VIM !VIMSCRIPT Visual Basic .NET !VBNET !VB !VB-NET Volt !VOLT
WarpScript !WARPSCRIPT !WARP WebAssembly !WASM Web IDL !WEBIDL !WEB-IDL
WGSL !WGSL Wiki markup !WIKI !WIKI-MARKUP Wolfram language !WOLFRAM !MATHEMATICA !NB !WL
Wren !WREN Xeora !XEORA !XEORACUBE XML doc (.net) !XML-DOC !XMLDOC
Xojo (REALbasic) !XOJO !REALBASIC XQuery !XQUERY !XQ !XQU YAML !YAML !YML
YANG !YANG Zig !ZIG