Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Dec 6, 2020
2 parents f5765a7 + 58777b9 commit 750644a
Show file tree
Hide file tree
Showing 27 changed files with 353 additions and 110 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "trumbowyg",
"version": "2.22.0",
"version": "2.23.0",
"homepage": "https://github.com/Alex-D/Trumbowyg",
"authors": [
{
Expand Down
2 changes: 1 addition & 1 deletion docs/css/main.css

Large diffs are not rendered by default.

28 changes: 14 additions & 14 deletions docs/demos/core/dark-theme.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,26 +44,26 @@ <h3>Basic usage</h3>
</p>

<div class="trumbowyg-dark">
<div id="editor">
<h2>Welcome to the dark side of Trumbowyg!</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident
optio nam reiciendis eius beatae quibusdam!
</p>
<p>
The text is derived from Cicero's De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or
alternatively [About] The Purposes of Good and Evil). The original passage began: Neque porro quisquam est
qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: &quot;Neither is there
anyone who loves grief itself since it is grief and thus wants to obtain it&quot;).
</p>
</div>
<textarea id="editor">
<h2>Welcome to the dark side of Trumbowyg!</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident
optio nam reiciendis eius beatae quibusdam!
</p>
<p>
The text is derived from Cicero's De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or
alternatively [About] The Purposes of Good and Evil). The original passage began: Neque porro quisquam est
qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: &quot;Neither is there
anyone who loves grief itself since it is grief and thus wants to obtain it&quot;).
</p>
</textarea>
</div>

<h4>The code</h4>
<pre><code class="html">
&lt;!-- Wrap the editor with an element with the class trumbowyg-dark -->
&lt;div class="trumbowyg-dark">
&lt;div id="editor">&lt;/div>
&lt;textarea id="editor">&lt;/textarea>
&lt;/div>
</code></pre>
<pre><code class="js-code-to-eval javascript">
Expand Down
1 change: 1 addition & 0 deletions docs/demos/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ <h1 class="documentation-title">
<li><a href="./plugins/giphy.html">Giphy</a></li>
<li><a href="./plugins/highlight.html">Highlight</a></li>
<li><a href="./plugins/history.html">History</a></li>
<li><a href="./plugins/indent.html">Indent</a></li>
<li><a href="./plugins/insertaudio.html">Insert audio</a></li>
<li><a href="./plugins/lineheight.html">Line height</a></li>
<li><a href="./plugins/mathml.html">MathML</a></li>
Expand Down
2 changes: 1 addition & 1 deletion docs/demos/js/loader.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var baseURL = window.location.hostname.indexOf('github.') !== -1 ? '//rawcdn.githack.com/Alex-D/Trumbowyg/v2.19.1/' : '../../../';
var baseURL = window.location.hostname.indexOf('github.') !== -1 ? '//rawcdn.githack.com/Alex-D/Trumbowyg/v2.22.0/' : '../../../';
var styleLoadingContainer = document.querySelector('.loading-head');
var scriptLoadingContainer = document.querySelector('.loading-body');

Expand Down
76 changes: 76 additions & 0 deletions docs/demos/plugins/indent.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Indent 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">Indent plugin</h2>

<div class="feature">
<h3>Basic usage</h3>
<p>
This plugin allow you to indent or oudent into your page creating vibrante documents.
</p>

<a href="../../documentation/plugins/#plugin-indent" class="button button-demo">Read insert indent plugin documentation</a>

<div id="editor">
<h2>You can make me come alive!</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident
optio nam reiciendis eius beatae quibusdam!
</p>
<p>
The text is derived from Cicero's De Finibus Bonorum et Malorum (On the Ends of Goods and Evils, or
alternatively [About] The Purposes of Good and Evil ). The original passage began: Neque porro quisquam est
qui dolorem ipsum quia dolor sit amet, consectetur, adipisci velit (Translation: &quot;Neither is there
anyone who loves grief itself since it is grief and thus wants to obtain it&quot;).
</p>
</div>

<h3>The code</h3>
<pre><code class="js-code-to-eval javascript">
$('#editor')
.trumbowyg({
btns: ['indent', 'outdent']
});
</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>
<pre><code class="html loading-body">
&lt;!-- Import jQuery -->
&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">&lt;/script>
&lt;script>window.jQuery || document.write('&lt;script src="js/vendor/jquery-3.3.1.min.js">&lt;\/script>')&lt;/script>
</code></pre>
</div>
</section>
</div>


<!-- Import jQuery -->
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="../../js/vendor/jquery-3.3.1.min.js"><\/script>')</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.min.css');
loadScript('dist/trumbowyg.min.js', 'Import Trumbowyg');
loadScript('dist/plugins/indent/trumbowyg.indent.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>
43 changes: 43 additions & 0 deletions docs/documentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ <h1 class="documentation-title">
<li><a href="#url-protocol">URL protocol</a></li>
<li><a href="#minimal-links">Minimal links</a></li>
<li><a href="#default-link-target">Default link target</a></li>
<li><a href="#tag-classes">Tag classes</a></li>
</ul>
</li>
<li>
Expand Down Expand Up @@ -394,6 +395,28 @@ <h4>Change SVG path or disable SVG icons locally</h4>
});
</code></pre>

<h4>Use absolute path to SVG sprite</h4>
<p class="added-feature">Added in 2.22.0</p>
<p class="note">
If you want to be IE-complient you should use this option.
</p>
<p>
This will load icons directly from the sprite file.
Instead of loading the sprite inline into the page, you can directly set this global option to true.
</p>
<pre><code class="javascript">
$.trumbowyg.svgAbsoluteUsePath = true;
</code></pre>
<p>
This option is useful to avoid issues with <code>baseURL</code>.
</p>
<p class="note">
This global way needs to be done before initialize any Trumbowyg instance.
</p>
<p class="note">
Default value for <code>svgAbsoluteUsePath</code> is <code>false</code>.
</p>

<h4>Use SVG icons without XHR or via an another protocol than HTTP(S)</h4>
<p class="note">
If you want to be IE9-complient you should use this option.
Expand Down Expand Up @@ -801,6 +824,26 @@ <h3 id="default-link-target">Default link target</h3>
<code>undefined</code>).
</p>
</div>


<div class="feature" data-added="2.23.0">
<h3 id="tag-classes">Tag classes</h3>
<p class="added-feature">Added in 2.23.0</p>
<p>
Add classes to any tag.
</p>
<pre><code class="javascript">
$('.trumbowyg').trumbowyg({
tagClasses: {
h1: 'h1', // Bootstrap example
blockquote: 'bg-grey-100 rounded-xl', // Tailwind CSS example
}
});
</code></pre>
<p class="note">
No classes are applied by default.
</p>
</div>
</section>


Expand Down
32 changes: 32 additions & 0 deletions docs/documentation/plugins/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ <h1 class="documentation-title">
<li><a href="#plugin-giphy">Giphy</a></li>
<li><a href="#plugin-highlight">Highlight</a></li>
<li><a href="#plugin-history">History</a></li>
<li><a href="#plugin-indent">Indent</a></li>
<li><a href="#plugin-insertaudio">Insert audio</a></li>
<li><a href="#plugin-lineheight">Line height</a></li>
<li><a href="#plugin-mathml">MathML</a></li>
Expand Down Expand Up @@ -625,6 +626,37 @@ <h4>How to use it?</h4>
</code></pre>
</div>

<div class="feature">
<h3 id="plugin-indent">Indent</h3>

<p>
This plugin allows you to indent or outdent your text.
</p>

<p>
<a href="../../demos/#plugins-indent" class="button button-demo">Try indent live demo!</a>
<a href="https://github.com/Alex-D/Trumbowyg/tree/develop/plugins/indent/trumbowyg.indent.js" class="button button-demo">
View indent plugin code on GitHub
</a>
</p>

<h4>How to use it?</h4>
<pre><code class="html">
&lt;-- Import Trumbowyg indent at the end of &lt;body>... -->
&lt;script src="trumbowyg/dist/plugins/indent/trumbowyg.indent.min.js">&lt;/script>
</code></pre>
<p>
Then you can use the news buttons definition <code>indent</code> or <code>outdent</code>
</p>
<pre><code class="javascript">
$('#my-editor').trumbowyg({
btns: [
['indent', 'outdent']
]
});
</code></pre>
</div>

<div class="feature">
<h3 id="plugin-insertaudio">Insert audio</h3>

Expand Down
Loading

0 comments on commit 750644a

Please sign in to comment.