adjust customizations to current editor

This commit is contained in:
O3-Shop 2023-04-06 23:54:46 +02:00
parent 823a36912c
commit 60846f6a84
74 changed files with 110 additions and 57 deletions

View File

@ -39,10 +39,12 @@ use O3\TinyMCE\Application\Core\TinyMCE\Options\Menubar;
use O3\TinyMCE\Application\Core\TinyMCE\Options\MinHeight;
use O3\TinyMCE\Application\Core\TinyMCE\Options\OptionInterface;
use O3\TinyMCE\Application\Core\TinyMCE\Options\Plugins;
use O3\TinyMCE\Application\Core\TinyMCE\Options\Promotion;
use O3\TinyMCE\Application\Core\TinyMCE\Options\Protect;
use O3\TinyMCE\Application\Core\TinyMCE\Options\QuickbarsInsertToolbar;
use O3\TinyMCE\Application\Core\TinyMCE\Options\RelativeUrls;
use O3\TinyMCE\Application\Core\TinyMCE\Options\Selector;
use O3\TinyMCE\Application\Core\TinyMCE\Options\Setup;
use O3\TinyMCE\Application\Core\TinyMCE\Options\Toolbar;
use O3\TinyMCE\Application\Core\TinyMCE\Options\ToolbarMode;
use O3\TinyMCE\Application\Core\TinyMCE\Options\ToolbarSticky;
@ -84,24 +86,6 @@ class Configuration
public function getConfig()
{
/*
return implode(', ', array_map(
function ($v, $k) {
if (is_array($v)) {
return $k.'[]='.implode('&'.$k.'[]=', $v);
} else {
return $k.': '.$v;
}
},
$this->options,
array_keys($this->options)
));
http_build_query($this->options,'',', ')
*/
// $config = json_encode($this->options);
foreach ($this->options as $param => $value) {
$sConfig .= "$param: $value, ";
}
@ -114,6 +98,7 @@ class Configuration
*/
protected function addIntegrateOptions(): void
{
$this->addOption(oxNew( Setup::class, $this->loader));
$this->addOption(oxNew( BaseUrl::class, $this->loader));
$this->addOption(oxNew( CacheSuffix::class, $this->loader));
$this->addOption(oxNew( Selector::class, $this->loader));
@ -121,6 +106,7 @@ class Configuration
protected function addGuiOptions(): void
{
$this->addOption(oxNew(Promotion::class, $this->loader));
$this->addOption(oxNew(ContextMenu::class, $this->loader));
$this->addOption(oxNew(MinHeight::class, $this->loader));
$this->addOption(oxNew(MaxHeight::class, $this->loader));

View File

@ -29,7 +29,7 @@ class ContextMenu extends AbstractOption
public function get(): string
{
return 'link linkchecker image imagetools table';
return 'link linkchecker image table';
}
public function mustQuote(): bool

View File

@ -21,19 +21,16 @@
declare(strict_types=1);
namespace O3\TinyMCE\Application\Core\TinyMCE\Plugins;
namespace O3\TinyMCE\Application\Core\TinyMCE\Options;
class Hr extends AbstractPlugin
use OxidEsales\Eshop\Core\Registry;
class Promotion extends AbstractOption
{
public function getPluginName(): string
{
return 'hr';
}
protected string $key = 'promotion';
public function getToolbarElements(): array
public function get(): string
{
return [
'hr'
];
return 'false';
}
}
}

View File

@ -21,19 +21,27 @@
declare(strict_types=1);
namespace O3\TinyMCE\Application\Core\TinyMCE\Plugins;
namespace O3\TinyMCE\Application\Core\TinyMCE\Options;
class Paste extends AbstractPlugin
class Setup extends AbstractOption
{
public function getPluginName(): string
protected string $key = 'setup';
public function get(): string
{
return 'paste';
$js = <<<JS
(editor) => {
editor.options.register("filemanager_url", { processor: "string" });
}
JS;
return trim(preg_replace('!\s+!', ' ', $js));
}
public function getToolbarElements(): array
/**
* @return bool
*/
public function requireRegistration(): bool
{
return [
'pastetext'
];
return (bool) $this->loader->getShopConfig()->getConfigParam("blTinyMCE_filemanager");
}
}
}

View File

@ -58,7 +58,6 @@ class PluginList
'charmap' => oxNew(Charmap::class),
'code' => oxNew(Code::class),
'fullpage' => oxNew(FullPage::class),
'hr' => oxNew(Hr::class),
'image' => oxNew(Image::class),
'legacyoutput' => oxNew(Legacyoutput::class),
'link' => oxNew(Link::class),
@ -66,7 +65,6 @@ class PluginList
'media' => oxNew(Media::class),
'nonbreaking' => oxNew(Nonbreaking::class),
'pagebreak' => oxNew(Pagebreak::class),
'paste' => oxNew(Paste::class),
'preview' => oxNew(Preview::class),
'quickbars' => oxNew(Quickbars::class),
'searchreplace' => oxNew(SearchReplace::class),

View File

@ -23,12 +23,12 @@ declare(strict_types=1);
namespace O3\TinyMCE\Application\Core\TinyMCE\Toolbar;
class Formatselect extends AbstractToolbar
class Blocks extends AbstractToolbar
{
public function getButtons(): array
{
return [
'formatselect',
'blocks',
];
}
}

View File

@ -28,8 +28,8 @@ class Font extends AbstractToolbar
public function getButtons(): array
{
return [
// 'fontselect',
//'fontsizeselect',
// 'fontfamily',
//'fontsize',
// '|',
'bold',
'italic',

View File

@ -28,7 +28,7 @@ use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Blockquote;
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Color;
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\CopyPaste;
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Font;
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Formatselect;
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Blocks;
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Indent;
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\Lists;
use O3\TinyMCE\Application\Core\TinyMCE\Toolbar\RemoveFormat;
@ -42,7 +42,7 @@ class ToolbarList
{
return [
[
'formatselect' => oxNew(Formatselect::class),
'blocks' => oxNew(Blocks::class),
'font' => oxNew(Font::class),
'color' => oxNew(Color::class),
'align' => oxNew(Align::class),
@ -59,4 +59,4 @@ class ToolbarList
]
];
}
}
}

View File

@ -1,6 +1,6 @@
<li style="margin-left: 50px;">
<button style="border: 1px solid #0089EE; color: #0089EE;padding: 3px 10px; margin-top: -10px; background: white;"
onclick="tinymce.each(tinymce.editors, function(editor) { if(editor.isHidden()) { editor.show(); } else { editor.hide(); } });">
onclick="tinymce.get().forEach(function(editor) { if(editor.isHidden()) { editor.show(); } else { editor.hide(); }});">
<span>
[{oxmultilang ident="TINYMCE_TOGGLE"}]
</span>

View File

@ -1,3 +1,3 @@
#/bin/bash
wget https://www.tiny.cloud/tinymce-services-azure/1/package/download?plugins=advlist,anchor,autolink,autoresize,charmap,code,colorpicker,contextmenu,directionality,fullpage,fullscreen,hr,image,imagetools,importcss,insertdatetime,legacyoutput,link,lists,media,nonbreaking,noneditable,pagebreak,paste,preview,searchreplace,tabfocus,table,textcolor,textpattern,toc,visualblocks,wordcount&themes=modern,inlite,mobile&skins=lightgray&combine=true -o tinymce.zip
wget https://www.tiny.cloud/tinymce-services-azure/1/package/download?plugins=advlist,anchor,autolink,autoresize,charmap,code,colorpicker,contextmenu,directionality,fullpage,fullscreen,hr,image,importcss,insertdatetime,legacyoutput,link,lists,media,nonbreaking,noneditable,pagebreak,paste,preview,searchreplace,tabfocus,table,textcolor,textpattern,toc,visualblocks,wordcount&themes=modern,inlite,mobile&skins=lightgray&combine=true -o tinymce.zip

View File

@ -20,18 +20,19 @@
(function () {
'use strict';
const PluginManager = tinymce.util.Tools.resolve('tinymce.PluginManager');
PluginManager.add('roxy', function (editor) {
editor.settings.file_picker_callback = function ($callback, $value, $meta) {
var url = editor.settings.filemanager_url
editor.options.set('file_picker_callback', function ($callback, $value, $meta) {
var url = editor.options.get('filemanager_url')
+ "&type=" + $meta.filetype
+ '&value=' + $value
+ '&selected=' + $value;
if (editor.settings.language) {
url += '&langCode=' + editor.settings.language;
if (editor.options.isSet('language')) {
url += '&langCode=' + editor.options.get('language');
}
if (editor.settings.filemanager_access_key) {
url += '&akey=' + editor.settings.filemanager_access_key;
if (editor.options.isSet('filemanager_access_key')) {
url += '&akey=' + editor.options.get('filemanager_access_key');
}
const instanceApi = editor.windowManager.openUrl({
@ -44,6 +45,6 @@
instanceApi.close();
}
});
};
});
});
}());

1
out/tinymce/langs/ar.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/az.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/be.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/ca.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/cs.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/cy.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/da.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/de.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/dv.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/el.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/eo.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/es.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/et.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/eu.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/fa.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/fi.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/ga.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/gl.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/hi.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/hr.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/hy.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/id.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/it.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/ja.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/kab.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/kk.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/ku.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/lt.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/lv.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/ne.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/nl.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/oc.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/pl.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/ro.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/ru.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/sk.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/sq.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/sr.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/ta.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/tg.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/tr.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/ug.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/uk.js Normal file

File diff suppressed because one or more lines are too long

1
out/tinymce/langs/vi.js Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long