Pen Settings



CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs added here will be added as <link>s in order, and before the CSS in the editor. You can use the CSS from another Pen by using its URL and the proper URL extension.

+ add another resource


Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource


Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.


Auto Save

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.


                <div class="row">
						<div class="col-md-4 offset-md-4">
							<label class="cabinet center-block">
									<img src="" class="gambar img-fluid rounded-circle" id="item-img-output" />
									<figcaption><i class="fa fa-camera"></i></figcaption>
								<input type="file" class="item-img file center-block" name="file_photo" />

	<!-- Modal upload image -->
	<div class="modal fade" id="cropImagePop" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<h4 class="modal-title" id="myModalLabel">
						<?=multiLanguage( "Edit Foto" , "Edit Photo" )?>
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
				<div class="modal-body">
					<div id="upload-demo" class="center-block text-center mx-auto"></div>
				<div class="modal-footer">
					<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
					<button type="button" id="cropImageBtn" class="btn btn-primary">Crop and save</button>


                	label.cabinet {
			display: block;
			cursor: pointer;
			position: relative;

		label.cabinet input.file {
			position: absolute;
			height: 100%;
			width: auto;
			opacity: 0;
			-moz-opacity: 0;
			filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);
			margin-top: -30px;

		#upload-demo {
			width: 250px;
			height: 250px;
			padding-bottom: 25px;

		figure figcaption {
			position: absolute;
			bottom: -17px;
			color: #fff;
			width: 100%;
			padding-left: 9px;
			padding-bottom: 5px;
			text-shadow: 0 0 10px #000;

		figure img {
			width: 125px !important;
			height: 125px !important;
			border: 1px solid;


                // Start upload preview image
		$(".gambar").attr("src", "");
		var $uploadCrop,
		function readFile(input) {
			if (input.files && input.files[0]) {
				var reader = new FileReader();
				reader.onload = function (e) {
					rawImg =;
			else {
				swal("Sorry - you're browser doesn't support the FileReader API");

		$uploadCrop = $('#upload-demo').croppie({
			viewport: {
				width: 125,
				height: 125,
				type: 'circle'
			enforceBoundary: false,
			enableExif: true
		$('#cropImagePop').on('', function () {
			// alert('Shown pop');
			$uploadCrop.croppie('bind', {
				url: rawImg
			}).then(function () {
				console.log('jQuery bind complete');

		$('.item-img').on('change', function () {
			imageId = $(this).data('id'); tempFilename = $(this).val();
			$('#cancelCropBtn').data('id', imageId); readFile(this);
		$('#cropImageBtn').on('click', function (ev) {
			$uploadCrop.croppie('result', {
				type: 'base64',
				format: 'jpeg',
				size: { width: 125, height: 125 }
			}).then(function (resp) {
				$('#item-img-output').attr('src', resp);
				// End upload preview image