Skip to content

Instantly share code, notes, and snippets.

@bobo52310
Last active August 29, 2015 14:11
Show Gist options
  • Save bobo52310/c919f838df574490c1c2 to your computer and use it in GitHub Desktop.
Save bobo52310/c919f838df574490c1c2 to your computer and use it in GitHub Desktop.
raptor-editor-replace-textarea
<textarea class="form-control input" data-id="main-content" name="body" ></textarea>
<div class="raptor-editable">
<div class="raptor-editable input" style="background-color: rgba(245, 217, 165, 0.28);"></div>
</div>
<script>
$(document).ready(function() {
$('.raptor-editable').raptor({
autoEnable: true, // Enable the editor automaticly
unloadWarning: false,
replace: true,
classes: 'raptor-editable',
plugins: {
fileManager: {
s3: {
bucketURL: <?= json_encode($buckerUrl); ?>,
accessKeyId: <?= json_encode($accessKeyId); ?>,
policy: <?= json_encode($policy); ?>,
signature: <?= json_encode($signature); ?>
}
},
dock: { // Dock specific plugin options
docked: true, // Start the editor already docked
dockToElement: true // Dock the editor inplace of the element
},
textBold: true,
textItalic: true,
textUnderline: true,
textStrike: true,
textBlockQuote: true,
textSizeDecrease: true,
textSizeIncrease: true
}
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment