81 lines
3.2 KiB
HTML
81 lines
3.2 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>Resizimg plugin | Trumbowyg</title>
|
|
<link href='https://fonts.googleapis.com/css?family=Open+Sans:300,400' rel='stylesheet' type='text/css'>
|
|
<link rel="stylesheet" href="../../css/main.css">
|
|
</head>
|
|
<body class="documentation-body">
|
|
<div class="main main-demo-inner">
|
|
<section class="wrapper section">
|
|
<h2 class="section-title">Resizimg plugin</h2>
|
|
|
|
<div class="feature">
|
|
<h3>Basic usage</h3>
|
|
<p>
|
|
Images can be resized by click over the image and dragging their bottom-right corner (the white ones).
|
|
</p>
|
|
|
|
<a href="../../documentation/plugins/#plugin-resizimg" class="button button-demo">Read resizimg plugin documentation</a>
|
|
|
|
<div id="editor" style="margin: 1rem">
|
|
<h2>Resize that image!</h2>
|
|
<img src="//rawcdn.githack.com/Alex-D/Trumbowyg/develop/banner.jpg" style="height: 200px">
|
|
</div>
|
|
|
|
<h4>The code</h4>
|
|
<p>
|
|
Nothing to do unless you want to change the default values of options, in which case you could:
|
|
</p>
|
|
<pre><code class="js-code-to-eval javascript">
|
|
$('#editor').trumbowyg({
|
|
plugins: {
|
|
resizimg: {
|
|
minSize: 64,
|
|
step: 16,
|
|
}
|
|
}
|
|
});
|
|
</code></pre>
|
|
</div>
|
|
|
|
<div class="feature">
|
|
<h3>Setup</h3>
|
|
|
|
<h4>In head tag</h4>
|
|
<pre><code class="html loading-head">
|
|
</code></pre>
|
|
<h4>At the end of body</h4>
|
|
<p>Note the additional requirement: the <a href="https://github.com/RickStrahl/jquery-resizable" target="_blank">jquery-resizable</a> plugin must be loaded for Resizimg to work.</p>
|
|
<pre><code class="html loading-body">
|
|
<!-- Import jQuery -->
|
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
|
|
<script>window.jQuery || document.write('<script src="js/vendor/jquery-3.4.0.min.js"><\/script>')</script>
|
|
|
|
<!-- Import dependency for Resizimg (tested with version 0.35). For a production setup, follow install instructions here: https://github.com/RickStrahl/jquery-resizable -->
|
|
<script src="//rawcdn.githack.com/RickStrahl/jquery-resizable/0.35/dist/jquery-resizable.min.js"></script>
|
|
</code></pre>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
|
|
|
|
<!-- Import jQuery -->
|
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
|
|
<script>window.jQuery || document.write('<script src="../../js/vendor/jquery-3.3.1.min.js"><\/script>')</script>
|
|
<!-- Import dependency for Resizimg -->
|
|
<script src="//rawcdn.githack.com/RickStrahl/jquery-resizable/0.35/dist/jquery-resizable.min.js"></script>
|
|
|
|
<!-- DO NOT COPY THESE LINES IN YOUR PROJECT, THEY ARE THERE JUST FOR THE EXAMPLE PAGE PURPOSE -->
|
|
<script src="../js/loader.js"></script>
|
|
<script>
|
|
loadStyle('dist/ui/trumbowyg.css');
|
|
loadScript('dist/trumbowyg.js', 'Import Trumbowyg');
|
|
loadScript('dist/plugins/resizimg/trumbowyg.resizimg.min.js', 'Import all plugins you want AFTER importing jQuery and Trumbowyg');
|
|
</script>
|
|
<script src="../js/runExampleCode.js"></script>
|
|
<script src="../js/highlight.js"></script>
|
|
</body>
|
|
</html>
|