Created
November 15, 2012 22:50
-
-
Save Petah/4082064 to your computer and use it in GitHub Desktop.
Raptor Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
raptor(function($) { | |
$('.editable').editor({ | |
urlPrefix: '/' | |
}); | |
}); | |
</script> <script type="text/javascript"> | |
jQuery(function($) { | |
$('.editable').editor({ | |
urlPrefix: '../', | |
ui: { | |
save: { | |
plugin: 'saveRest' | |
} | |
}, | |
plugins: { | |
saveRest: { | |
/** | |
* True if you want all editing elements to be saved at once. | |
*/ | |
multiple: true, | |
ajax: { | |
type: 'post', | |
dataType: 'json', | |
url: function(id) { | |
return '../certified-save.php'; | |
}, | |
data: function(html) { | |
return { | |
_method: 'put', | |
id: this.editor.getElement().data('id'), | |
content: html | |
}; | |
} | |
} | |
} | |
} | |
}); | |
}); | |
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
raptor(function($) { | |
$('.editable').editor({ | |
urlPrefix: '../', | |
ui: { | |
save: { | |
plugin: 'saveRest' | |
} | |
}, | |
plugins: { | |
saveRest: { | |
/** | |
* True if you want all editing elements to be saved at once. | |
*/ | |
multiple: true, | |
ajax: { | |
type: 'post', | |
dataType: 'json', | |
url: function(id) { | |
return '../certified-save.php'; | |
}, | |
data: function(html) { | |
return { | |
_method: 'put', | |
id: this.editor.getElement().data('id'), | |
content: html | |
}; | |
} | |
} | |
} | |
} | |
}); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment