2017-11-24 6 views
0

私はTypo3でCKEditorを使用しています。設定用のyamlファイルがあります。CKEdtior文書を保存するたびに余分な段落を追加する

文書を保存するたびに、CKEditorは余分な段落を追加し、<br /><p>&nbsp;</p>に変換します。

だから、この

<p>my paragraph</p> 
<p>my paragraph with<br />a newline</p> 

はこのようになります。私は「autoParagraph: false(推奨されませんので、動作しませんでした)とenterMode: CKEDITOR.ENTER_BR // shiftEnterMode: CKEDITOR.ENTER_BR

didnのを使用しようとした

<p>my paragraph</p> 
<p>&nbsp;</p> 
<p>my paragraph with</p> 
<p>a newline</p> 

助けてください...

私のYAMLファイルは次のようになります。

# Load default processing options 
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" } 
# Konfiguration 
editor: 

    externalPlugins: 
    typo3link: { resource: "EXT:rte_ckeditor/Resources/Public/JavaScript/Plugins/typo3link.js", route: "rteckeditor_wizard_browse_links" } 

    config: 
    # height: 70 (2 Zeilen) +20 pro weitere jede Zeile 
    height: 130 
    width: "auto" 
    fillEmtpyBlocks: false 
    ignoreEmptyParagraph: false 
    enterMode: CKEDITOR.ENTER_BR 
    shiftEnterMode: CKEDITOR.ENTER_BR 

    # Formatauswahl 
    format_tags: "h2;h3;h4;h5;h6;p" 

    # Stylesheet 
    contentsCss: "EXT:upd_rte_extension/Resources/Public/Css/rte.css" 

    # Styleauswahl 
    stylesSet: 
    # Blockstile 
     - { name: "Disclaimer", element: "p", attributes: { 'class': 'disclaimer' } } 
     - { name: "Wichtig", element: "span", attributes: { 'class': 'important' } } 

    # Buttons 
     - { name: "Wow-Button", element: "a", attributes: { 'class': 'wow-button' } } 

    toolbar: 
    - { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat' ] } 
    - { name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote' ] } 
    - { name: 'styles', items: [ 'Styles', 'Format' ] } 
    - { name: 'about', items: [ 'About' ] } 
    - '/' 
    - { name: 'clipboard', items: [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ] } 
    - { name: 'editing', items: [ 'Scayt' ] } 
    - { name: 'links', items: [ 'Link', 'Unlink', 'Anchor' ] } 
    - { name: 'insert', items: [ 'Image', 'Table', 'HorizontalRule', 'SpecialChar' ] } 
    - { name: 'tools', items: [ 'Maximize' ] } 
    - { name: 'document', items: [ 'Source' ] } 

答えて

0

以前のプロジェクトで同じ問題がありました。

フラックス/クラッセ/フォーム/フィールド/ Text.php::; 61は `$設定[「enableRichtextは」] = trueの追加 は、私の場合、それは私がこれをしなかった... FLUXのバグでした $ configuration ['richtextConfiguration'] = 'フル';

+0

自分自身で解決しました - 私の答えを参照してください...多分それもあなたを助けます... – Swissdude

0

自分で解決しました。

注:Typo3 8.7.7およびflux 8.2.1には次のものが適用され、他のインストールではテストされませんでした。

問題は、Githubの最新のFlux-Versionを使用していないということでした。私の場合には(あなたは最新バージョンを実行していない場合)、ダウンロードして、次のファイルを交換しても問題を解決:

flux/Classes/Field/Text.php 

(通常、それはなるだろう、あなたの拡張機能のグローバルへのカスタムRTEを追加します。ページTSconfigで

$GLOBALS['TYPO3_CONF_VARS']['RTE']['Presets']['custom_rte'] = 'fileadmin/templates/mysite/css/custom_rte.yaml'; 

次に、あなたのフラックス・テンプレートの拡張子)、:

RTE.default.preset = custom_rte 
plugin.tx_flux.settings.flexform.richtextConfiguration = custom_rte 

最初の行は、カスタムの全体的な使用状況RTE-Configを セコのためでありますnd行はフラックスにカスタムRTE-configを使用するよう指示します(これは重要なものです)。

これは誰かに役立つことを願っています...

関連する問題