Skip to content

Instantly share code, notes, and snippets.

@ericmjonas
Created September 20, 2011 22:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ericmjonas/1230652 to your computer and use it in GitHub Desktop.
Save ericmjonas/1230652 to your computer and use it in GitHub Desktop.
$(document).ready(
function () {
$('#editactivate')
.click(function() {
var editor = new Proper();
editor.activate($(".content"), {
placeholder: 'Enter Text',
controlsTarget: $('#tools'),
codeFontFamily: 'Monaco, Consolas, "Lucida Console", monospace'
});
});
$('#editactivate2')
.click(function() {
var editor = new Proper();
editor.activate($(".content2"), {
placeholder: 'Enter Text',
controlsTarget: $('#tools2'),
codeFontFamily: 'Monaco, Consolas, "Lucida Console", monospace'
});
});
});
and for html:
<div id='tools'> </div>
<br>
<br>
<a href="#" id='editactivate'> activate </a>
<br>
<br>
<div class='content'>
THIS IS SOME TEXT AND MORE AND MORE
lalalala
what is going on <p>
and more
</div>
<div id='tools2'> </div>
<br>
<br>
<a href="#" id='editactivate2'> activate </a>
<div class='content2'>
THIS IS SOME TEXT AND MORE AND MORE
lalalala
what is going on <p>
and more
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment