first commit

This commit is contained in:
Senad Uka
2018-05-07 16:07:00 +02:00
commit 8b4f09f9d5
3368 changed files with 852614 additions and 0 deletions

46
public/bower_components/trumbowyg/.bower.json vendored Executable file
View File

@@ -0,0 +1,46 @@
{
"name": "trumbowyg",
"version": "2.1.0",
"homepage": "https://github.com/Alex-D/Trumbowyg",
"authors": [
{
"name": "Alexandre Demode (Alex-D)",
"email": "contact@alex-d.fr",
"homepage": "http://alex-d.fr"
}
],
"description": "A lightweight WYSIWYG editor",
"main": "dist/trumbowyg.js",
"keywords": [
"editor",
"wysiwyg",
"javascript",
"richtext"
],
"license": "MIT",
"ignore": [
"**/.*",
"bower_components",
"node_modules",
"plugins",
"!dist/plugins",
"test",
"tests",
"src",
"Gulpfile.js",
"package.json"
],
"dependencies": {
"jquery": ">=1.7"
},
"_release": "2.1.0",
"_resolution": {
"type": "version",
"tag": "v2.1.0",
"commit": "fd9be87c33417e3d9d236b988f58deab5361536c"
},
"_source": "https://github.com/Alex-D/Trumbowyg.git",
"_target": "^2.1.0",
"_originalSource": "trumbowyg",
"_direct": true
}

View File

@@ -0,0 +1,57 @@
# Contributors
Trumbowyg is the result of many people who made translations or the code better.
Special thanks to [Adrien Gervaix](https://dribbble.com/adriengervaix) for the Trumbowyg v2 icon set.
- Alex-D
- lizardK
- Ra100
- VeeeneX
- Danny Hiemstra
- Nicolás Moncada
- Civil
- Jan Svoboda
- g2010a
- foo9
- matopeter
- Manfred62
- Merianos Nikos
- Nikola Trifunovic
- jake johns
- Vlad Radulescu
- Rezha Julio
- Tim
- Vietworm
- Vinzgore
- Wisse Jelgersma
- abomokhahmed
- akai
- basteyy
- brentanalexander
- dev.hibiki
- kingdido999
- munzur
- teppokoivula
- udidoron
- Игорь
- Adam Balogh
- Олег Ильин
- Andreas Kohn
- Andrey Kogut
- Antoine Leblanc
- Artur
- Burak Erdem
- Christian
- Delvallée
- John Pozy
- JoongSeob Vito Kim
- MIRK0
- Mike Goodfellow
- Mike Richmond
- Moisés Márquez
- Nathan Rosquist
- Oleg Berman
- Paweł Abramowicz
- Peter Dave Hello
- Ramiro Varandas Jr

View File

@@ -0,0 +1,11 @@
Before report an issue, be sure to put these informations. Thanks :)
### Informations
**Browser + version**:
**OS**:
**Resolution**:
### How to reproduce the bug?

21
public/bower_components/trumbowyg/LICENSE vendored Executable file
View File

@@ -0,0 +1,21 @@
The MIT License (MIT)
Copyright (c) 2012-2016 Alexandre Demode (Alex-D)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

34
public/bower_components/trumbowyg/README.md vendored Executable file
View File

@@ -0,0 +1,34 @@
# Trumbowyg WYSIWYG Editor
Trumbowyg is a simple and lightweight WYSIWYG editor, is only 20kB for faster page loading.
[![Trumbowyg logo](banner.png)](http://alex-d.github.io/Trumbowyg/)
Visit presentation page: http://alex-d.github.io/Trumbowyg/
# Documentation
All you need to know about Trumbowyg is here : http://alex-d.github.io/Trumbowyg/documentation.html (or [on the home](http://alex-d.github.io/Trumbowyg/))
# Contribute
You can contribute to Trumbowyg with translations in languages you know.
Thanks to `node` and `gulp`, you can improve core script, style or icons easily.
## Getting Started
- Clone the repository
- `cd Trumbowyg` to go into the project's root directory
- `npm install` to install development dependencies
- `npm install -g bower gulp` to install bower and gulp command if you don't have them already
- `bower install` to install Trumbowyg dependencies (ie: jQuery)
- `gulp build` to build the project
`gulp` command launch default Gulp task watcher and rebuild on the fly.
# License
This project is under MIT license. See [LICENSE](LICENSE) file for details.

BIN
public/bower_components/trumbowyg/banner.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

36
public/bower_components/trumbowyg/bower.json vendored Executable file
View File

@@ -0,0 +1,36 @@
{
"name": "trumbowyg",
"version": "2.1.0",
"homepage": "https://github.com/Alex-D/Trumbowyg",
"authors": [
{
"name": "Alexandre Demode (Alex-D)",
"email": "contact@alex-d.fr",
"homepage": "http://alex-d.fr"
}
],
"description": "A lightweight WYSIWYG editor",
"main": "dist/trumbowyg.js",
"keywords": [
"editor",
"wysiwyg",
"javascript",
"richtext"
],
"license": "MIT",
"ignore": [
"**/.*",
"bower_components",
"node_modules",
"plugins",
"!dist/plugins",
"test",
"tests",
"src",
"Gulpfile.js",
"package.json"
],
"dependencies": {
"jquery": ">=1.7"
}
}

View File

@@ -0,0 +1,36 @@
html,
body {
margin: 0;
padding: 0;
background-color: #F2F2F2;
font-family: "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
}
header {
text-align: center;
}
.container {
max-width: 960px;
margin: 0 auto;
}
.dark-section {
background: #111;
color: #ddd;
margin-top: 50px;
padding: 50px 0 100px;
}
.dark-section .title {
font-weight: normal;
text-align: center;
font-size: 32px;
margin: 20px 0 50px;
}
.form-submit {
background: transparent;
border: 1px solid #555;
color: #ccc;
padding: 7px 13px;
margin-right: 17px;
float: right;
}

View File

@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Trumbowyg by Alex-D</title>
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="../dist/ui/trumbowyg.css">
</head>
<body>
<div id="main" role="main">
<header>
<h1>Default usage of Trumbowyg</h1>
<p>
No plugin, no options. Just naked Trumbowyg.
</p>
</header>
<div id="editor">
<h2>This editor is the default build 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>
<h2>The code</h2>
<code><pre>
$('#editor').trumbowyg();
</pre></code>
</div>
<script src="../bower_components/jquery/dist/jquery.min.js"></script>
<script src="../dist/trumbowyg.js"></script>
<script>
/** Default editor configuration **/
$('#editor').trumbowyg();
</script>
</body>
</html>

356
public/bower_components/trumbowyg/index.html vendored Executable file
View File

@@ -0,0 +1,356 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Trumbowyg by Alex-D</title>
<base href="/test/base/url/">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="/examples/css/main.css">
<link rel="stylesheet" href="/dist/ui/trumbowyg.css">
<link rel="stylesheet" href="/dist/plugins/colors/ui/trumbowyg.colors.css">
</head>
<body>
<div class="container">
<header>
<h1>Examples of use Trumbowyg</h1>
<p>
Close an editor on clic on "Close" in top right corner. <br>
To reopen an editor, double-click on his text.
</p>
</header>
<div id="default-editor">
<h2>This editor is the default build of Trumbowyg.</h2>
<p>
Lorem ipsum dolor sit amet, <a href="https://alex-d.github.io/Trumbowyg/">consectetur adipisicing</a> 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>
<code><pre>
$('#default-editor').trumbowyg();
</pre></code>
</div>
<div id="simple-editor">
<h2>This is a minimalist demo 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>
<code><pre>
$('#simple-editor').trumbowyg({
btns: [jQuery.trumbowyg.btnsGrps.semantic]
});
</pre></code>
</div>
<div id="flat-buttonpane">
<h2>All buttons of Trumbowyg are here.</h2>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, aliquam, minima fugiat placeat provident optio nam reiciendis eius beatae quibusdam!
</p>
<code><pre>
$('#simple-editor').trumbowyg({
btns: [jQuery.trumbowyg.btnsGrps.semantic]
});
</pre></code>
</div>
<div id="customized-buttonpane">
<h2>This is a demo of Trumbowyg with a customized button pane</h2>
<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>
<p style="text-align: center;">
<img src="http://alex-d.github.io/Trumbowyg/img/logo-tbw.png" alt="Trumbowyg logo">
</p>
<p>
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dignissimos, minima, asperiores libero architecto sequi fugit dolore sunt in officiis facere ut quaerat ullam laudantium delectus aliquam tenetur alias! Ea, nisi, est earum temporibus dolores quas qui repellendus aliquid voluptatibus tempore facilis eligendi omnis reiciendis nihil ullam quo dolorem nam deleniti. Fugit dignissimos dolorum dolore voluptate repudiandae recusandae debitis. Neque, adipisci, maiores magni aliquam molestiae ex natus minus quod tempora nemo debitis eum laboriosam voluptatum ut architecto animi nobis vero quis dolore eaque! Corporis, dolore, illum, autem in eum ea doloribus ut consequuntur modi et ullam adipisci blanditiis corrupti ab voluptate.
</p>
<p>
It is not known exactly when the text acquired its current standard form; it may have been as late as the 1960s. The passage was discovered by Richard McClintock, a Latin scholar who is the publications director at Hampden-Sydney College in Virginia, by searching for citings of the rarely used word 'consectetur' in classical literature.
</p>
<code><pre>
/* Add new words for customs btnsDef just below */
$.extend(true, $.trumbowyg.langs, {
fr: {
align: 'Alignement',
image: 'Image'
}
});
$('#customized-buttonpane').trumbowyg({
lang: 'fr',
fixedBtnPane: true,
btnsDef: {
// Customizables dropdowns
align: {
dropdown: ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
ico: 'justifyLeft'
},
image: {
dropdown: ['insertImage', 'upload', 'base64'],
ico: 'insertImage'
}
},
btns: ['viewHTML',
['formatting'],
['btnGrp-test'],
['align'],
['btnGrp-lists'],
['image'],
['preformatted'],
'fullscreen', 'close']
});
</pre></code>
</div>
<textarea id="form-content" cols="30" rows="10" required>
<h1>This editor is create from a textarea</h1>
<p>
Even though using &quot;lorem ipsum&quot; often arouses curiosity due to its resemblance to classical Latin, it is not intended to have meaning. Where text is visible in a document, people tend to focus on the textual content rather than upon overall presentation, so publishers use lorem ipsum when displaying a typeface or design in order to direct the focus to presentation. &quot;Lorem ipsum&quot; also approximates a typical distribution of spaces in English. <br>
The most common lorem ipsum text reads as follows: Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</p>
<code><pre>
$('#form-content').trumbowyg({
lang: 'fr',
mobile: true,
fixedBtnPane: true,
fixedFullWidth: true,
semantic: true,
resetCss: true,
autoAjustHeight: true,
autogrow: true,
btnsAdd: ['close']
});
</pre></code>
</textarea>
<textarea id="empty-textarea" cols="30" rows="10" required></textarea>
<textarea id="disabled-textarea" cols="30" rows="10" disabled>
Disabled textarea
</textarea>
<button id="enable-disabled-textarea">Enable</button>
<button id="disable-disabled-textarea">Disable</button>
<div id="dynamic-iframe-example"></div>
</div>
<div class="dark-section">
<div class="container">
<form action="#">
<h2 class="title">The dark side of Trumbowyg</h2>
<div class="trumbowyg-dark">
<textarea id="placeholder-editor" cols="30" rows="10" placeholder="This is a placeholder..." required></textarea>
</div>
<button type="submit" class="form-submit">Submit</button>
</form>
</div>
</div>
<script src="/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/dist/trumbowyg.js"></script>
<script src="/dist/langs/fr.min.js"></script>
<script src="/dist/plugins/base64/trumbowyg.base64.js"></script>
<script src="/dist/plugins/colors/trumbowyg.colors.js"></script>
<script src="/dist/plugins/noembed/trumbowyg.noembed.js"></script>
<script src="/dist/plugins/pasteimage/trumbowyg.pasteimage.js"></script>
<script src="/dist/plugins/preformatted/trumbowyg.preformatted.js"></script>
<script src="/dist/plugins/upload/trumbowyg.upload.js"></script>
<script>
/** Default editor configuration **/
$('#default-editor, #empty-textarea, #disabled-textarea')
.trumbowyg()
.on('dblclick', function(){
$(this).trumbowyg();
})
.on('tbwinit tbwfocus tbwblur tbwchange tbwresize tbwpaste tbwopenfullscreen tbwclosefullscreen tbwclose', function(e){
console.log(e.type);
});
$('#enable-disabled-textarea').click(function () {
$('#disabled-textarea').trumbowyg('enable');
});
$('#disable-disabled-textarea').click(function () {
$('#disabled-textarea').trumbowyg('disable');
});
/** Default editor configuration **/
$('#simple-editor')
.trumbowyg({
btns: ['btnGrp-semantic']
})
.on('dblclick', function(){
$(this).trumbowyg();
});
/* Add imagur parameters to upload plugin */
var uploadOptions = {
serverPath: 'https://api.imgur.com/3/image',
fileFieldName: 'image',
headers: {'Authorization': 'Client-ID 9e57cb1c4791cea'},
urlPropertyName: 'data.link'
};
/** Full flat button pane **/
$('#flat-buttonpane')
.trumbowyg({
btns: [
['viewHTML'],
['p', 'blockquote', 'h1', 'h2', 'h3', 'h4'],
['strong', 'em', 'underline', 'del'],
['superscript', 'subscript'],
['createLink', 'unlink'],
['insertImage'],
['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
['unorderedList', 'orderedList'],
['horizontalRule'],
['removeformat'],
['upload', 'base64', 'noembed'],
['foreColor', 'backColor'],
['preformatted'],
['fullscreen', 'close']
],
plugins: {
upload: uploadOptions
}
});
/********************************************************
* Customized button pane + buttons groups + dropdowns
* Use upload and base64 plugins
*******************************************************/
/* Add new words for customs btnsDef just below */
$.extend(true, $.trumbowyg.langs, {
fr: {
align: 'Alignement',
image: 'Image'
}
});
var customizedButtonPaneTbwOptions = {
lang: 'fr',
fixedBtnPane: true,
btnsGrps: {
test: ['strong', 'em'] // Custom nammed group
},
btnsDef: {
// Customizables dropdowns
align: {
dropdown: ['justifyLeft', 'justifyCenter', 'justifyRight', 'justifyFull'],
ico: 'justifyLeft'
},
image: {
dropdown: ['insertImage', 'upload', 'base64', 'noembed'],
ico: 'insertImage'
}
},
btns: [
['viewHTML'],
['formatting'],
'btnGrp-test',
['align'],
'btnGrp-lists',
['image'],
['foreColor', 'backColor'],
['preformatted'],
['fullscreen', 'close']
]
};
$('#customized-buttonpane')
.trumbowyg(customizedButtonPaneTbwOptions)
.on('dblclick', function(){
$(this).trumbowyg(customizedButtonPaneTbwOptions);
});
/** Simple customization with current options **/
var formTbwOptions = {
lang: 'fr',
mobile: true,
fixedBtnPane: true,
fixedFullWidth: true,
semantic: true,
resetCss: true,
removeformatPasted: true,
tagsToRemove: ['script', 'style'],
autogrow: true,
btnsDef: {
strong: {
fn: 'bold',
key: 'G'
}
},
btnsAdd: ['close']
};
$('#form-content')
.trumbowyg(formTbwOptions)
.on('dblclick', function(){
$(this).trumbowyg(formTbwOptions);
});
/** Dynamic Iframe **/
// Create the iframe element.
var $iframe = $('<iframe/>').css({
width: '100%',
height: 400,
border: 0
});
$('#dynamic-iframe-example').append($iframe);
// Get the document of the iframe.
var $editor = $('<div>', {
id: 'editor'
}).html(
'<h2>This is within an iframe</h2> <p>Soc'
+ 'tempor pulvinar ac ultricies, placerat in, elementum,'
+ 'adipiscing pid, mid augue pulvinar eros nisi! In magn'
+ 'magnis. Porttitor platea turpis nisi. Pulvinar massa,'
+ ' habitasse <strong>a nunc rhoncus adipiscing</strong></p>');
setTimeout(function(){
var contextIframe = $iframe.contents()[0];
// Set the style on the head of the iframe.
$('head', contextIframe).append($('<link>', {
href: '/dist/ui/trumbowyg.css',
rel: 'stylesheet'
}));
// Set the content to be editable.
$('body', contextIframe).append($editor);
$editor
.trumbowyg()
.on('dblclick', function(){
$(this).trumbowyg();
});
}, 500);
/** Editor with placeholder **/
$('#placeholder-editor')
.trumbowyg()
.on('dblclick', function(){
$(this).trumbowyg();
})
.on('tbwfocus', function(){
console.log('focus event fired');
})
.on('tbwblur', function(){
console.log('blur event fired');
});
</script>
</body>
</html>