All Projects → KmeCnin → fiddlestick

KmeCnin / fiddlestick

Licence: Unlicense license
Local JSFiddle easy to use and modulate

Programming Languages

HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to fiddlestick

CodeCheck
✔️Implementation of Hackerrrank using django
Stars: ✭ 26 (+85.71%)
Mutual labels:  ace-editor
rdocsyntax
Syntax highlighting for R HTML documentation
Stars: ✭ 20 (+42.86%)
Mutual labels:  ace-editor
ace-mode-solidity
Ace ( https://ace.c9.io/ ) Edit Mode for Ethereum's Solidity language ( https://solidity.readthedocs.io/en/latest/ ).
Stars: ✭ 25 (+78.57%)
Mutual labels:  ace-editor
one-themes
One Dark and One Light Themes
Stars: ✭ 14 (+0%)
Mutual labels:  ace-editor
Desk
Light-weight ide for competitive programming.
Stars: ✭ 34 (+142.86%)
Mutual labels:  ace-editor
Online-Judge
Online Judge for testing programming ability in C, C++, Java and Python.
Stars: ✭ 25 (+78.57%)
Mutual labels:  ace-editor
streamlit-ace
Ace editor component for Streamlit.
Stars: ✭ 130 (+828.57%)
Mutual labels:  ace-editor
Operational-Transformation
A collection of Algorithms to Synchronise changes across multiple clients using Operational Transformation
Stars: ✭ 25 (+78.57%)
Mutual labels:  ace-editor
ktcc
C Compiler that generates readable Kotlin and C# - Written in Kotlin + Small web-based Editor with autocompletion
Stars: ✭ 54 (+285.71%)
Mutual labels:  ace-editor
fongshen-editor
A highly customizable code-inserting editor for markdown or other languages
Stars: ✭ 35 (+150%)
Mutual labels:  ace-editor
jsfiddle-github
JSFiddle implementation for interactive JavaScript examples.
Stars: ✭ 16 (+14.29%)
Mutual labels:  jsfiddle

FiddleStick

FiddleStick is a local JSFiddle easy to use and modulate.
There is currently 2 possible behaviours: Basic textarea or Ace editor.

Installation

Fast

Load FiddleStick from your HTML using RawGit CDN:

Basic textarea

<script src="https://cdn.rawgit.com/KmeCnin/fiddlestick/v0.1.2/fiddlestick.js"></script>

Ace editor

<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js"></script>
<script src="https://cdn.rawgit.com/KmeCnin/fiddlestick/v0.1.2/fiddlestick-ace.js"></script>

Clean

Basic textarea

  1. Copy file https://raw.githubusercontent.com/KmeCnin/fiddlestick/master/fiddlestick.js into your project directory.
  2. Load FiddleStick in your HTML:
<script src="path/to/fiddlestick.js"></script>

Ace editor

  1. Copy file https://raw.githubusercontent.com/KmeCnin/fiddlestick/master/fiddlestick-ace.js into your project directory.
  2. Load Ace editor in your HTML using CDN:
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.2.6/ace.js"></script>
  1. Load FiddleStick in your HTML:
<script src="path/to/fiddlestick-ace.js"></script>

Usage

A FiddleStick is composed of multiple HTML elements.
Each element from a single FiddleStick must share the same data-fiddlestick-id. This means it is possible to have multiple independants fiddlesticks in the same page.
Each element must have a data-fiddlestick-type defining its kind of language. Possible values are:

  • data-fiddlestick-type="html": containing HTML code
  • data-fiddlestick-type="js": containing JavaScript code
  • data-fiddlestick-type="css": containing CSS code
  • data-fiddlestick-type="render": will display the rendering of the fiddlestick

Important:

  • Their must be only one data-fiddlestick-type="render" by data-fiddlestick-id.
  • But it is possible to have as many html/js/css types as we want, they will be concatenated by order of occurency.
  • html/js/css types can be editable elements (textarea, input, etc.) or readonly elements (div, span, etc.).

Example

You can use multiple fiddlesticks in the same page.
Editable data must be placed in <textarea> and un-editable data can be for instance in a <div>.
You can display: none a block of fiddlestick in order to hide it from the user but it will still be concatenated to your rendered fiddlestick.

<!-- One first Fiddlestick -->
<textarea data-fiddlestick-id="first-fiddlestick" data-fiddlestick-type="html">
  <!-- Data will be completed by user. -->
</textarea>
<textarea data-fiddlestick-id="first-fiddlestick" data-fiddlestick-type="js">
  <!-- Data will be completed by user. -->
</textarea>
<div data-fiddlestick-id="first-fiddlestick" data-fiddlestick-type="css">
p {
  color: red;
}
</div>
<div data-fiddlestick-id="first-fiddlestick" data-fiddlestick-type="render"></div>

<!-- Another Fiddlestick in the same page -->
<textarea data-fiddlestick-id="second-fiddlestick" data-fiddlestick-type="js">
  <!-- Data will be completed by user. -->
</textarea>
<div data-fiddlestick-id="second-fiddlestick" data-fiddlestick-type="js">
  <!-- Define here JavaScript code in readonly. It will be added at the end of the previous code then rendered. -->
</div>
<div data-fiddlestick-id="second-fiddlestick" data-fiddlestick-type="render"></div>

Working examples

Simple FiddleStick example

You can use a very simple fiddlestick with raw textarea using fiddlestick.js.
Live example

Ace editor FiddleStick example

You can use a code editor-like area using integration with Ace editor by using fiddlestick-ace.js.
You have to include Ace editor before FiddleStick.
Live example

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].