Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Edit docs for hacks #9

Open
wants to merge 1 commit into from

1 participant

@roryokane

fix grammar and formatting, and elaborate to be clearer

The current version of this page: doc.jsfiddle.net/use/hacks.html

@roryokane roryokane Edit docs for hacks
fix grammar and formatting, and elaborate to be clearer
58eef0c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 3, 2013
  1. @roryokane

    Edit docs for hacks

    roryokane authored
    fix grammar and formatting, and elaborate to be clearer
This page is out of date. Refresh to see the latest.
Showing with 25 additions and 21 deletions.
  1. +25 −21 docs/use/hacks.rst
View
46 docs/use/hacks.rst
@@ -6,32 +6,34 @@ Hacking jsFiddle
.. note::
- Working with CoffeeScript no longer requires to hack jsFiddle. Please visit
- :ref:`panels`
+ Working with CoffeeScript no longer requires you to hack jsFiddle.
+ Please visit :ref:`panels`.
+
+Sometimes jsFiddle does not provide the feature you'd expect. Below is a small
+collection of working, non-harmful hacks.
-Sometimes jsFiddle does not provide the feature you'd expect. Below is a small
-collection of possible, not harmful hacks.
.. _css_panel_hack:
-CSS panel hack
-##############
-If there is a need to edit the header one can close the ``style`` element and
-access the header. After all modifications please open the style tag again
+CSS panel ``</style>`` hack
+###########################
+If you need to edit the ``<head>`` of a page, you can do that by
+closing the ``style`` element that your CSS is placed into.
+After all additions to the ``head``, you should open the ``style`` tag again.
-.. code-block:: html
+.. code-block:: css
- /* your custom CSS \*/
+ /* your custom CSS */
</style>
<!-- access to the HEAD element -->
<style>
-Inserting above code in CSS panel will change the CSS section of the header
+Inserting the above code into the CSS panel will change the CSS section of the ``head`` to
.. code-block:: html
<style type='text/css'>
- /* your custom CSS \*/
+ /* your custom CSS */
</style>
<!-- access to the HEAD element -->
<style>
@@ -42,24 +44,26 @@ Inserting above code in CSS panel will change the CSS section of the header
Working with PaperScript
########################
-In short: Fork http://jsfiddle.net/zalun/xvhFa/ to start a PaperScript fiddle.
+In short: fork http://jsfiddle.net/zalun/xvhFa/ to start a PaperScript_ fiddle.
+
+.. _PaperScript: http://paperjs.org/tutorials/getting-started/working-with-paper-js/
-Similar to CoffeeScript, Paperscript requires the ``script`` tag to be the
-``type`` of ``text/paperscript`` and provide the ``id`` of the ``canvas``
-element in the ``canvas`` parameter. Enter following into the HTML panel and
-you'll be able to write Paperscript in JavaScript panel.
+Similar to CoffeeScript, Paperscript requires the ``script`` tag to have a
+``type`` of ``text/paperscript`` and provide the ``id`` of the ``canvas``
+element in the ``canvas`` parameter. Enter the following into the HTML panel and
+you'll be able to write Paperscript in the JavaScript panel.
.. code-block:: html
<canvas id="some-unique-id" resize keepalive="true" style='height: 200; width: 200;'></canvas>
<script>(function(){var s="script",n='\n',d=document,b=d.getElementsByTagName(s)[2].innerHTML.split(n);d.write('<'+s+' type="text/paperscript" canvas="' + document.getElementsByTagName('canvas')[0].id + '">'+b.slice(2,b.length-2).join(n)+'</'+s+'>')})()</script>
-Please set the **Code Wrap** to ``no wrap(head)`` (default is ``onLoad``) and
-**Franework** to ``No-library (pure JS)``.
+Please set the **Code Wrap** to ``no wrap - in <head>`` (the default is ``onLoad``) and
+**Framework** to ``No-library (pure JS)``.
-As Paperscripts requires this hack to work we can't add it to the list of
+As PaperScript requires this hack to work, we can't add it to the list of
frameworks yet. Add a link to
https://raw.github.com/paperjs/paper.js/master/dist/paper.js
as a **Resource** (:ref:`add_resources`).
-Example: http://jsfiddle.net/zalun/LrGEm/12/
+Example PaperScript jsFiddle: http://jsfiddle.net/zalun/LrGEm/12/
Something went wrong with that request. Please try again.