Skip to content

Commit

Permalink
Revert "applied yaf changes"
Browse files Browse the repository at this point in the history
This reverts commit ac274b2.
  • Loading branch information
w8tcha committed Jul 26, 2024
1 parent ac274b2 commit 0318817
Show file tree
Hide file tree
Showing 193 changed files with 5,850 additions and 2,510 deletions.
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ sceditor.sublime-workspace
/docs
/coverage
.DS_Store
/codetests
package-lock.json
/.vs
/codetests
108 changes: 93 additions & 15 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const libCoverage = require('istanbul-lib-coverage');
const libReport = require('istanbul-lib-report');
const reports = require('istanbul-reports');
const sass = require('sass');
const nodeResolve = require('@rollup/plugin-node-resolve').default;
const fs = require('fs');
const path = require('path');
Expand Down Expand Up @@ -87,6 +86,12 @@ module.exports = (grunt) => {
src: ['plugins/**.js', 'formats/**.js', 'icons/**.js'],
dest: 'dist/development/'
},
{
expand: true,
cwd: 'src/',
src: 'jquery.sceditor.default.css',
dest: 'dist/development/'
},
{
expand: true,
cwd: 'src/themes/icons/',
Expand Down Expand Up @@ -115,6 +120,11 @@ module.exports = (grunt) => {
src: 'example.html',
dest: 'dist/'
},
{
expand: true,
src: 'emoticons/**',
dest: 'dist/'
}
]
},
build: {
Expand Down Expand Up @@ -156,20 +166,45 @@ module.exports = (grunt) => {
},
build: {
files: {
'./minified/jquery.sceditor.min.js': [
'./src/jquery.sceditor.js'
],
'./minified/sceditor.min.js': [
'./src/sceditor.js'
]
}
},
dist: {
files: {
'./dist/development/jquery.sceditor.js': [
'./src/jquery.sceditor.js'
],
'./dist/development/sceditor.js': [
'./src/sceditor.js'
]
}
}
},

// Create the XHTML and BBCode bundled JS files
concat: {
dist: {
options: {
separator: ';'
},
files: {
'dist/development/jquery.sceditor.bbcode.js': [
'dist/development/jquery.sceditor.js',
'src/formats/bbcode.js'
],
'dist/development/jquery.sceditor.xhtml.js': [
'dist/development/jquery.sceditor.js',
'src/formats/xhtml.js'
]
}
}
},

// Minify the JavaScript
uglify: {
build: {
Expand All @@ -185,6 +220,24 @@ module.exports = (grunt) => {
src: 'minified/sceditor.min.js',
dest: 'minified/sceditor.min.js'
},
{
src: 'minified/jquery.sceditor.min.js',
dest: 'minified/jquery.sceditor.min.js'
},
{
src: [
'minified/jquery.sceditor.min.js',
'src/formats/bbcode.js'
],
dest: 'minified/jquery.sceditor.bbcode.min.js'
},
{
src: [
'minified/jquery.sceditor.min.js',
'src/formats/xhtml.js'
],
dest: 'minified/jquery.sceditor.xhtml.min.js'
},
{
expand: true,
filter: 'isFile',
Expand All @@ -195,18 +248,42 @@ module.exports = (grunt) => {
]
}
},

sass: {
options: {
implementation: sass,
sourceMap: false
},
build: {
files: {
"minified/themes/sceditor.min.css": 'src/themes/sceditor.scss'
}
}
},

// Convert the less CSS theme files into CSS
less: {
build: {
options: {
paths: ['src/themes/', 'src/themes/icons'],
cleancss: true
},
files: [
{
expand: true,
filter: 'isFile',
cwd: 'src/themes/',
src: ['*.less'],
dest: 'minified/themes/',
ext: '.min.css'
}
]
},
dist: {
options: {
paths: ['src/themes/', 'src/themes/icons'],
cleancss: true
},
files: [
{
expand: true,
filter: 'isFile',
cwd: 'src/themes/',
src: ['*.less'],
dest: 'dist/development/themes/',
ext: '.css'
}
]
}
},

// Manage CSS vendor prefixes
postcss: {
Expand Down Expand Up @@ -261,11 +338,11 @@ module.exports = (grunt) => {
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-qunit');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-rollup');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-sass');

grunt.registerTask('default', ['test']);

Expand All @@ -275,10 +352,10 @@ module.exports = (grunt) => {
// Minifies the source
grunt.registerTask('build', [
'clean:build',
'sass',
'copy:build',
'rollup:build',
'uglify:build',
'less:build',
'postcss:build'
]);

Expand All @@ -291,6 +368,7 @@ module.exports = (grunt) => {
'rollup:dist',
'concat:dist',
'copy:dist',
'less:dist'
]);

// Creates the simplified distributable ZIP
Expand Down
Binary file added emoticons/alien.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/angel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/angry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/blink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/blush.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/cheerful.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/cool.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions emoticons/credits.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Presenting, Nomicons: The Full Monty :o

Credits:
Oscar Gruno, aka Nominell v. 2.0 -> [email protected]
Andy Fedosjeenko, aka Nightwolf -> [email protected]

Copyright (C) 2001-Infinity, Oscar Gruno & Andy Fedosjeenko

You can redistribute these files as much as you like, as long as you keep this file with them and give us the proper credit. You may even rape them if you please, just give us credit for our work.
Binary file added emoticons/cwy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/devil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/dizzy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/ermm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/face.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/getlost.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/grin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/happy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/heart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/kissing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/laughing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/ninja.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/pinch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/pouty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/sad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/shocked.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/sick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/sideways.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added emoticons/silly.png
Binary file added emoticons/sleeping.png
Binary file added emoticons/smile.png
Binary file added emoticons/tongue.png
Binary file added emoticons/unsure.png
Binary file added emoticons/w00t.png
Binary file added emoticons/wassat.png
Binary file added emoticons/whistling.png
Binary file added emoticons/wink.png
Binary file added emoticons/wub.png
Binary file added example/emoticons/alien.png
Binary file added example/emoticons/angel.png
Binary file added example/emoticons/angry.png
Binary file added example/emoticons/blink.png
Binary file added example/emoticons/blush.png
Binary file added example/emoticons/cheerful.png
Binary file added example/emoticons/cool.png
9 changes: 9 additions & 0 deletions example/emoticons/credits.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
Presenting, Nomicons: The Full Monty :o

Credits:
Oscar Gruno, aka Nominell v. 2.0 -> [email protected]
Andy Fedosjeenko, aka Nightwolf -> [email protected]

Copyright (C) 2001-Infinity, Oscar Gruno & Andy Fedosjeenko

You can redistribute these files as much as you like, as long as you keep this file with them and give us the proper credit. You may even rape them if you please, just give us credit for our work.
Binary file added example/emoticons/cwy.png
Binary file added example/emoticons/devil.png
Binary file added example/emoticons/dizzy.png
Binary file added example/emoticons/ermm.png
Binary file added example/emoticons/face.png
Binary file added example/emoticons/getlost.png
Binary file added example/emoticons/grin.png
Binary file added example/emoticons/happy.png
Binary file added example/emoticons/heart.png
Binary file added example/emoticons/kissing.png
Binary file added example/emoticons/laughing.png
Binary file added example/emoticons/ninja.png
Binary file added example/emoticons/pinch.png
Binary file added example/emoticons/pouty.png
Binary file added example/emoticons/sad.png
Binary file added example/emoticons/shocked.png
Binary file added example/emoticons/sick.png
Binary file added example/emoticons/sideways.png
Binary file added example/emoticons/silly.png
Binary file added example/emoticons/sleeping.png
Binary file added example/emoticons/smile.png
Binary file added example/emoticons/tongue.png
Binary file added example/emoticons/unsure.png
Binary file added example/emoticons/w00t.png
Binary file added example/emoticons/wassat.png
Binary file added example/emoticons/whistling.png
Binary file added example/emoticons/wink.png
Binary file added example/emoticons/wub.png
125 changes: 63 additions & 62 deletions example/example.html
Original file line number Diff line number Diff line change
@@ -1,90 +1,91 @@
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

<title>SCEditor Demo</title>

<link rel="stylesheet" href="../minified/themes/sceditor.min.css" id="theme-style" />
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-T3c6CoIi6uLrA9TneNEoa7RxnatzjcDSCmG1MXxSR1GAsXEV/Dwwykc2MPK8M2HN" crossorigin="anonymous">
<link rel="stylesheet" href="../minified/themes/default.min.css" id="theme-style" />

<script src="../minified/sceditor.min.js"></script>
<script src="../minified/icons/fontawesome.js"></script>
<script src="../minified/icons/monocons.js"></script>
<script src="../minified/formats/bbcode.js"></script>
<script src="../minified/plugins/dragdrop.js"></script>
<script src="../minified/plugins/undo.js"></script>

<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.2/css/all.min.css" rel="stylesheet">

<style>
html {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
}
form div {
padding: .5em;
}
code:before {
position: absolute;
content: 'Code:';
top: -1.35em;
left: 0;
}
code {
margin-top: 1.5em;
position: relative;
background: #eee;
border: 1px solid #aaa;
white-space: pre;
padding: .25em;
min-height: 1.25em;
}
code:before, code {
display: block;
text-align: left;
}
</style>
</head>
<body>

<form action="" method="post">
<main class="container">
<div class="bg-body-tertiary p-5 rounded">
<h1>SCEditor example</h1>
<div>
<textarea id="example" class="form-control" style="height:300px;width:600px;" title="editor">[center][size=3][b]BBCode SCEditor[/b][/size][/center]
<div>
<textarea id="example" style="height:300px;width:600px;">[center][size=3][b]BBCode SCEditor[/b][/size][/center]

Give it a try! :)

[quote]CONTENT

https://www.sceditor.com/

PS: I've not used it and don't have any connection to it.[/quote]

@[userlink]tha_watcha[/userlink]

[code=markup]<pre><code class="language-css">p { color: red }</code></pre>[/code]

[color=#ff00]Red text! [/color][color=#3399ff]Blue?[/color]

[list][*]A simple list[*]list item 2[/list]
Just type [b]:[/b]) and it should be converted into :) as you typed.</textarea>
[ul][li]A simple list[/li][li]list item 2[/li][/ul]

Just type [b]:[/b]) and it should be converted into :) as you type.</textarea>

</div>

<div>
<label for="theme">Theme:</label>
<select id="theme">
<option value="default">Default</option>
<option value="defaultdark">Default dark</option>
<option value="modern">Modern</option>
<option value="office-toolbar">Office Toolbar</option>
<option value="office">Office</option>
<option value="square">Square</option>
</select>
</div>
</div>
</main>

</form>

<div class="container">
<footer class="d-flex flex-wrap justify-content-between align-items-center py-3 my-4 border-top">
<p class="col-md-4 mb-0 text-body-secondary">SCEditor is licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT</a></p>
</footer>
</div>

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/9000.0.1/prism.min.js"></script>

<script>
var textarea = document.getElementById('example');



sceditor.create(textarea, {
extensionsUrl: 'http://localhost/bbcode.json',
autoExpand: true,
maxLength: 32767,
plugins: 'emojis',

//emojis: ['😊', '❀️', 'πŸ˜„', 'πŸ˜„', 'πŸ˜„', 'πŸ˜„', 'πŸ˜„', 'πŸ˜„', 'πŸ˜„', 'πŸ˜„', 'πŸ˜„', 'πŸ˜„'],
styles: ['https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css','https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css', 'https://cdn.jsdelivr.net/npm/[email protected]/themes/prism.min.css'],
toolbar: 'bold,italic,underline,strike|' +
'font,size,color|mark|' +
'email,link,unlink,quote,code,|image,albums|attachments|' +
'emojis|' +
'bulletlist,orderedlist|left,center,right|indent,outdent|' +
'cut,copy,pastetext,removeformat|' +
'undo,redo|' +
'youtube,vimeo,instagram,facebook,media,extensions|source|reply|table'
format: 'bbcode',
icons: 'monocons',
style: '../minified/themes/content/default.min.css'
});




var themeInput = document.getElementById('theme');
themeInput.onchange = function() {
var theme = '../minified/themes/' + themeInput.value + '.min.css';

document.getElementById('theme-style').href = theme;
};
</script>




<p>SCEditor is licensed under the <a href="http://www.opensource.org/licenses/mit-license.php">MIT</a></p>
</body>
</html>
Loading

0 comments on commit 0318817

Please sign in to comment.