adjust customizations to current editor
This commit is contained in:
parent
823a36912c
commit
60846f6a84
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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),
|
||||
|
|
|
@ -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',
|
||||
];
|
||||
}
|
||||
}
|
|
@ -28,8 +28,8 @@ class Font extends AbstractToolbar
|
|||
public function getButtons(): array
|
||||
{
|
||||
return [
|
||||
// 'fontselect',
|
||||
//'fontsizeselect',
|
||||
// 'fontfamily',
|
||||
//'fontsize',
|
||||
// '|',
|
||||
'bold',
|
||||
'italic',
|
||||
|
|
|
@ -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
|
|||
]
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
|
@ -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();
|
||||
}
|
||||
});
|
||||
};
|
||||
});
|
||||
});
|
||||
}());
|
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
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
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
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
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
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
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
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
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
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
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
Loading…
Reference in New Issue