aboutsummaryrefslogtreecommitdiff
path: root/Neutron-trunk/resources/private/VisualEditor$2.php
diff options
context:
space:
mode:
authorMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
committerMinteck <nekostarfan@gmail.com>2021-08-24 15:38:16 +0200
commit529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105 (patch)
tree8a50c30271b9b328cde0d907b1441f2dabdc341b /Neutron-trunk/resources/private/VisualEditor$2.php
parent15e4724761c50b30803df1811a525c85058f70bf (diff)
downloadelectrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.gz
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.tar.bz2
electrode-529ffcbfa97ab51a64a97f6dff08aeb2bc0cc105.zip
Update
Diffstat (limited to 'Neutron-trunk/resources/private/VisualEditor$2.php')
-rw-r--r--Neutron-trunk/resources/private/VisualEditor$2.php410
1 files changed, 410 insertions, 0 deletions
diff --git a/Neutron-trunk/resources/private/VisualEditor$2.php b/Neutron-trunk/resources/private/VisualEditor$2.php
new file mode 100644
index 0000000..e22b9d4
--- /dev/null
+++ b/Neutron-trunk/resources/private/VisualEditor$2.php
@@ -0,0 +1,410 @@
+<textarea name="content" id="editor">
+ </textarea><br>
+<div style="text-align: center;">
+ <a onclick="createPageVisual();" class="mdc-button mdc-button--raised">
+ <div class="mdc-button__ripple"></div>
+ <i class="material-icons-outlined mdc-button__icon" aria-hidden="true">publish</i>
+ <span class="mdc-button__label"><?= $lang["editor"]["publish"] ?></span>
+ </a>
+</div>
+ <script>
+ let colors = [{
+ color: 'hsl(0, 0%, 0%)',
+ },
+ {
+ color: 'hsl(0, 0%, 12.5%)',
+ },
+ {
+ color: 'hsl(0, 0%, 25%)',
+ },
+ {
+ color: 'hsl(0, 0%, 37.5%)',
+ },
+ {
+ color: 'hsl(0, 0%, 50%)',
+ },
+ {
+ color: 'hsl(0, 0%, 62.5%)',
+ },
+ {
+ color: 'hsl(0, 0%, 75%)',
+ },
+ {
+ color: 'hsl(0, 0%, 87.5%)',
+ },
+ {
+ color: 'hsl(0, 0%, 100%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(0, 100%, 10%)',
+ },
+ {
+ color: 'hsl(0, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(0, 100%, 25%)',
+ },
+ {
+ color: 'hsl(0, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(0, 100%, 50%)',
+ },
+ {
+ color: 'hsl(0, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(0, 100%, 75%)',
+ },
+ {
+ color: 'hsl(0, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(0, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(30, 100%, 10%)',
+ },
+ {
+ color: 'hsl(30, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(30, 100%, 25%)',
+ },
+ {
+ color: 'hsl(30, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(30, 100%, 50%)',
+ },
+ {
+ color: 'hsl(30, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(30, 100%, 75%)',
+ },
+ {
+ color: 'hsl(30, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(30, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(60, 100%, 10%)',
+ },
+ {
+ color: 'hsl(60, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(60, 100%, 25%)',
+ },
+ {
+ color: 'hsl(60, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(60, 100%, 50%)',
+ },
+ {
+ color: 'hsl(60, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(60, 100%, 75%)',
+ },
+ {
+ color: 'hsl(60, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(60, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(90, 100%, 10%)',
+ },
+ {
+ color: 'hsl(90, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(90, 100%, 25%)',
+ },
+ {
+ color: 'hsl(90, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(90, 100%, 50%)',
+ },
+ {
+ color: 'hsl(90, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(90, 100%, 75%)',
+ },
+ {
+ color: 'hsl(90, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(90, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(120, 100%, 10%)',
+ },
+ {
+ color: 'hsl(120, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(120, 100%, 25%)',
+ },
+ {
+ color: 'hsl(120, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(120, 100%, 50%)',
+ },
+ {
+ color: 'hsl(120, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(120, 100%, 75%)',
+ },
+ {
+ color: 'hsl(120, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(120, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(150, 100%, 10%)',
+ },
+ {
+ color: 'hsl(150, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(150, 100%, 25%)',
+ },
+ {
+ color: 'hsl(150, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(150, 100%, 50%)',
+ },
+ {
+ color: 'hsl(150, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(150, 100%, 75%)',
+ },
+ {
+ color: 'hsl(150, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(150, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(180, 100%, 10%)',
+ },
+ {
+ color: 'hsl(180, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(180, 100%, 25%)',
+ },
+ {
+ color: 'hsl(180, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(180, 100%, 50%)',
+ },
+ {
+ color: 'hsl(180, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(180, 100%, 75%)',
+ },
+ {
+ color: 'hsl(180, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(180, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(210, 100%, 10%)',
+ },
+ {
+ color: 'hsl(210, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(210, 100%, 25%)',
+ },
+ {
+ color: 'hsl(210, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(210, 100%, 50%)',
+ },
+ {
+ color: 'hsl(210, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(210, 100%, 75%)',
+ },
+ {
+ color: 'hsl(210, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(210, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(240, 100%, 10%)',
+ },
+ {
+ color: 'hsl(240, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(240, 100%, 25%)',
+ },
+ {
+ color: 'hsl(240, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(240, 100%, 50%)',
+ },
+ {
+ color: 'hsl(240, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(240, 100%, 75%)',
+ },
+ {
+ color: 'hsl(240, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(240, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(270, 100%, 10%)',
+ },
+ {
+ color: 'hsl(270, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(270, 100%, 25%)',
+ },
+ {
+ color: 'hsl(270, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(270, 100%, 50%)',
+ },
+ {
+ color: 'hsl(270, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(270, 100%, 75%)',
+ },
+ {
+ color: 'hsl(270, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(270, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(300, 100%, 10%)',
+ },
+ {
+ color: 'hsl(300, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(300, 100%, 25%)',
+ },
+ {
+ color: 'hsl(300, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(300, 100%, 50%)',
+ },
+ {
+ color: 'hsl(300, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(300, 100%, 75%)',
+ },
+ {
+ color: 'hsl(300, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(300, 100%, 90%)',
+ hasBorder: true,
+ },
+ {
+ color: 'hsl(330, 100%, 10%)',
+ },
+ {
+ color: 'hsl(330, 100%, 12.5%)',
+ },
+ {
+ color: 'hsl(330, 100%, 25%)',
+ },
+ {
+ color: 'hsl(330, 100%, 37.5%)',
+ },
+ {
+ color: 'hsl(330, 100%, 50%)',
+ },
+ {
+ color: 'hsl(330, 100%, 62.5%)',
+ },
+ {
+ color: 'hsl(330, 100%, 75%)',
+ },
+ {
+ color: 'hsl(330, 100%, 87.5%)',
+ },
+ {
+ color: 'hsl(330, 100%, 90%)',
+ hasBorder: true,
+ }];
+ let editor;
+ ClassicEditor
+ .create( document.querySelector( '#editor' ), {
+ language: {
+ ui: <?= "'" . $langsel . "'" ?>,
+ content: <?= "'" . $langsel . "'" ?>
+ },
+ toolbar: [
+ 'undo', 'redo', '|', 'removeFormat', '|', 'heading', '|', 'fontSize', 'fontColor', 'fontBackgroundColor', 'alignment', '|', 'bold', 'italic', 'underline', 'strikethrough', '|', 'subscript', 'superscript', '|', 'code', '|', 'outdent', 'indent', '|', 'bulletedList', 'numberedList', '|', 'link', 'imageUpload', 'mediaEmbed', 'blockQuote', 'insertTable', 'codeBlock', '|', 'horizontalLine'
+ ],
+ fontColor: {
+ colors: colors,
+ columns: 9
+ },
+ } )
+
+ .then( newEditor => {
+ editor = newEditor;
+ } )
+ .catch( error => {
+ console.error( error );
+ } );
+ </script>
+ <script>
+ window.onbeforeunload = function (e) {
+ e = e || window.event;
+
+ // For IE and Firefox prior to version 4
+ if (e) {
+ e.returnValue = "<?= $lang["editor"]["exit"] ?>";
+ }
+
+ // For Safari
+ return "<?= $lang["editor"]["exit"] ?>";
+ };
+ </script> \ No newline at end of file