From 729d3431c50e590ce9d6391c579306c8e795671c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bjo=CC=88rn=20Fromme?= Date: Wed, 19 Sep 2018 17:18:22 +0200 Subject: [PATCH] Rename tsconfig files, add rte config for ckeditor --- .../PageTS/{main.ts => Main.tsconfig} | 8 ++-- ...kendLayouts.ts => BackendLayouts.tsconfig} | 0 .../ext/ep_events/Configuration/PageTS/RTE.ts | 38 ------------------- .../Configuration/PageTS/RTE.tsconfig | 16 ++++++++ .../PageTS/{TCEFORM.ts => TCEFORM.tsconfig} | 0 ...tElement.ts => NewContentElement.tsconfig} | 0 .../ep_events/Configuration/RTE/Default.yaml | 37 ++++++++++++++++++ .../Configuration/TCA/Overrides/pages.php | 6 --- web/typo3conf/ext/ep_events/ext_localconf.php | 3 ++ 9 files changed, 60 insertions(+), 48 deletions(-) rename web/typo3conf/ext/ep_events/Configuration/PageTS/{main.ts => Main.tsconfig} (65%) rename web/typo3conf/ext/ep_events/Configuration/PageTS/Mod/WebLayout/{BackendLayouts.ts => BackendLayouts.tsconfig} (100%) delete mode 100644 web/typo3conf/ext/ep_events/Configuration/PageTS/RTE.ts create mode 100644 web/typo3conf/ext/ep_events/Configuration/PageTS/RTE.tsconfig rename web/typo3conf/ext/ep_events/Configuration/PageTS/{TCEFORM.ts => TCEFORM.tsconfig} (100%) rename web/typo3conf/ext/ep_events/Configuration/PageTS/Wizards/{NewContentElement.ts => NewContentElement.tsconfig} (100%) create mode 100644 web/typo3conf/ext/ep_events/Configuration/RTE/Default.yaml diff --git a/web/typo3conf/ext/ep_events/Configuration/PageTS/main.ts b/web/typo3conf/ext/ep_events/Configuration/PageTS/Main.tsconfig similarity index 65% rename from web/typo3conf/ext/ep_events/Configuration/PageTS/main.ts rename to web/typo3conf/ext/ep_events/Configuration/PageTS/Main.tsconfig index 110f62ff..3ea834ad 100644 --- a/web/typo3conf/ext/ep_events/Configuration/PageTS/main.ts +++ b/web/typo3conf/ext/ep_events/Configuration/PageTS/Main.tsconfig @@ -1,4 +1,4 @@ - - - - + + + + diff --git a/web/typo3conf/ext/ep_events/Configuration/PageTS/Mod/WebLayout/BackendLayouts.ts b/web/typo3conf/ext/ep_events/Configuration/PageTS/Mod/WebLayout/BackendLayouts.tsconfig similarity index 100% rename from web/typo3conf/ext/ep_events/Configuration/PageTS/Mod/WebLayout/BackendLayouts.ts rename to web/typo3conf/ext/ep_events/Configuration/PageTS/Mod/WebLayout/BackendLayouts.tsconfig diff --git a/web/typo3conf/ext/ep_events/Configuration/PageTS/RTE.ts b/web/typo3conf/ext/ep_events/Configuration/PageTS/RTE.ts deleted file mode 100644 index 5dee5e26..00000000 --- a/web/typo3conf/ext/ep_events/Configuration/PageTS/RTE.ts +++ /dev/null @@ -1,38 +0,0 @@ -RTE { - default { - contentCSS = EXT:ep_events/Resources/Public/css/rte.min.css - showButtons ( - blockstylelabel, blockstyle, textstylelabel, textstyle, linebreak, - formatblock, bar, bold, italic, bar, orderedlist, unorderedlist, - indent, bar, link, unlink, removeformat, linebreak, - table, toggleborders, tableproperties, rowproperties, rowinsertabove, - rowinsertunder, rowdelete, rowsplit, columninsertbefore, columninsertafter, - columndelete, columnsplit, cellproperties, cellinsertbefore, cellinsertafter, - celldelete, cellsplit, cellmerge, image, insertcharacter, chMode, pastetoggle - ) - keepButtonGroupTogether = 1 - - proc { - allowedClasses = coloured-list, footnote-list - entryHTMLparser_db { - tags { - span.fixAttrib.style.unset = 1 - span.rmTagIfNoAttrib = 1 - } - } - } - - buttons { - formatblock.removeItems = h1,h5,h6,section,div,footer,header,nav,aside,blockquote,pre,address,article - pastetoggle.setActiveOnRteOpen = 1 - blockstyle.tags.ul.allowedClasses = coloured-list, footnote-list - } - } - - classes { - button.name = Button - buttonfull.name = Button (volle Breite) - coloured-list.name = Farbige Bullets - footnote-list.name = Fußnote - } -} diff --git a/web/typo3conf/ext/ep_events/Configuration/PageTS/RTE.tsconfig b/web/typo3conf/ext/ep_events/Configuration/PageTS/RTE.tsconfig new file mode 100644 index 00000000..ff891f00 --- /dev/null +++ b/web/typo3conf/ext/ep_events/Configuration/PageTS/RTE.tsconfig @@ -0,0 +1,16 @@ +RTE { + config { + tt_content { + bodytext { + types { + text { + preset = dpn + } + textmedia { + preset = dpn + } + } + } + } + } +} diff --git a/web/typo3conf/ext/ep_events/Configuration/PageTS/TCEFORM.ts b/web/typo3conf/ext/ep_events/Configuration/PageTS/TCEFORM.tsconfig similarity index 100% rename from web/typo3conf/ext/ep_events/Configuration/PageTS/TCEFORM.ts rename to web/typo3conf/ext/ep_events/Configuration/PageTS/TCEFORM.tsconfig diff --git a/web/typo3conf/ext/ep_events/Configuration/PageTS/Wizards/NewContentElement.ts b/web/typo3conf/ext/ep_events/Configuration/PageTS/Wizards/NewContentElement.tsconfig similarity index 100% rename from web/typo3conf/ext/ep_events/Configuration/PageTS/Wizards/NewContentElement.ts rename to web/typo3conf/ext/ep_events/Configuration/PageTS/Wizards/NewContentElement.tsconfig diff --git a/web/typo3conf/ext/ep_events/Configuration/RTE/Default.yaml b/web/typo3conf/ext/ep_events/Configuration/RTE/Default.yaml new file mode 100644 index 00000000..f9b52b27 --- /dev/null +++ b/web/typo3conf/ext/ep_events/Configuration/RTE/Default.yaml @@ -0,0 +1,37 @@ +imports: +- { resource: "EXT:rte_ckeditor/Configuration/RTE/Processing.yaml" } +- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Base.yaml" } +- { resource: "EXT:rte_ckeditor/Configuration/RTE/Editor/Plugins.yaml" } + +editor: + config: + contentsCss: + - "EXT:ep_events/Resources/Public/css/rte.min.css" + + stylesSet: + - { name: "Button", element: "a", attributes: { 'class': 'button' } } + - { name: "Button (volle Breite)", element: "a", attributes: { 'class': 'buttonfull' } } + - { name: "Farbige Bullets", element: "ul", attributes: { 'class': 'coloured-list' } } + - { name: "Fußnote", element: "ul", attributes: { 'class': 'footnote-list' } } + + toolbarGroups: + - { name: styles, groups: [ format, styles ] } + - { name: basicstyles, groups: [ basicstyles ] } + - { name: paragraph, groups: [ list] } + - "/" + - { name: links, groups: [ links ] } + - { name: clipboard, groups: [ clipboard, cleanup, undo ] } + - { name: editing, groups: [ spellchecker ] } + - { name: insert, groups: [ insert ] } + - { name: tools, groups: [ table, specialchar ] } + - { name: document, groups: [ mode ] } + + format_tags: "p;h1;h2;h3;h4" + + removePlugins: + - image + + removeButtons: + - Anchor + - Underline + - Strike diff --git a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/pages.php b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/pages.php index 951afd8f..381e703f 100644 --- a/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/pages.php +++ b/web/typo3conf/ext/ep_events/Configuration/TCA/Overrides/pages.php @@ -104,12 +104,6 @@ call_user_func(function() { (string) \EP\EpEvents\Constants::PAGETYPE_OFFER ); - \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile( - 'ep_events', - 'Configuration/TypoScript/pageTSconfig.ts', - 'EP Events' - ); - // Add category page type $GLOBALS['PAGES_TYPES'][\EP\EpEvents\Constants::PAGETYPE_CATEGORY] = [ 'type' => 'web', diff --git a/web/typo3conf/ext/ep_events/ext_localconf.php b/web/typo3conf/ext/ep_events/ext_localconf.php index 4926d14f..55bc8531 100644 --- a/web/typo3conf/ext/ep_events/ext_localconf.php +++ b/web/typo3conf/ext/ep_events/ext_localconf.php @@ -118,6 +118,9 @@ call_user_func(function() { ] ); + $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['default'] = 'EXT:ep_events/Configuration/RTE/Default.yaml'; + $GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['dpn'] = 'EXT:ep_events/Configuration/RTE/Default.yaml'; + $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass']['EP.EpEvents'] = \EP\EpEvents\Hooks\Tcemain::class;