私はTypo3でCKEditorを使用しています。設定用のyamlファイルがあります。CKEdtior文書を保存するたびに余分な段落を追加する
文書を保存するたびに、CKEditorは余分な段落を追加し、<br />
を<p> </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> </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' ] }
自分自身で解決しました - 私の答えを参照してください...多分それもあなたを助けます... – Swissdude