Skip to content

Latest commit

 

History

History
executable file
·
31 lines (26 loc) · 819 Bytes

README.md

File metadata and controls

executable file
·
31 lines (26 loc) · 819 Bytes

Redactor feature image plugin

Redactor plugin for adding feature image using redactor image modal

Usage

JavaScript

$('#redactor').redactor({
    imageUpload: '/administrator/uploads',
    plugins: ['featureimage'],
	
	featureimage: {
		/* feature image link */
		linkSelector: '.redactor-featureimage'
		/* set preview area */
		previewSelector: '.feature-image-preview', 

		/* set input area */
		inputSelector: '.feature-image-input',
	}
});

HTML

<div class="feature-image-container">
	<div class="feature-image-preview"><!-- saved feature image --></div>
	<div class="feature-image-link"><a href="#" class="redactor-featureimage">Set feature image</a></div>
	<input type="hidden" name="featureimage" class="feature-image-input">
</div>