Body: <p>I'm trying to configure redactor in Craft 3 to only allow a single line. Setting &quot;enterKey&quot; to false seems great for typing, but pasting content still makes it add breaks.</p>
  <p>Here's my configuration:</p>
  <pre><code>{
    &quot;removeNewLines&quot;: true,
    &quot;markup&quot;: &quot;div&quot;,
    &quot;enterKey&quot;: false,
    &quot;structure&quot;: false,
    &quot;pastePlainText&quot;: true,
    &quot;pasteLinks&quot;: false,
    &quot;pasteImages&quot;: false,
    &quot;linebreaks&quot;: false,
    &quot;pasteKeepStyle&quot;: false,
    &quot;pasteKeepClass&quot;: false,
    &quot;pasteKeepAttrs&quot;: false,
    &quot;pasteBlockTags&quot;: false,
    &quot;pasteInlineTags&quot;: false
  }
  </code></pre>
  <p>Sample content that I paste in:</p>
  <pre><code>Line 1
  Line 2
  Line 3
  </code></pre>
  <p>Which becomes:</p>
  <pre><code>&lt;div&gt;Line 1&lt;br&gt;Line 2&lt;br&gt;Line 3&lt;/div&gt;
  </code></pre>
  <p>But I want it to be just always forced to one line, no <code>br</code>'s. Seems Redactor used to have configuration for this but I can't see any alternatives. Does anyone know if this is possible?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-13T08:44:05.797Z
Comments.Text: Redactor is broken as hell, configuration is mostly ignored when pasting. You might have to just filter out newlines using a save hook (using strip_tags with a white-list of allowed tags, for example).
Comments.UserDisplayName: MoritzLost
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-01-13T22:07:08.893Z
Comments.Text: ...or use the `|striptags` filter in Twig when outputting. Or, use CSS (i.e. `br { display: none; }`). Or something like `|replace('<br>', ' ')` (also Twig), if the breaks need to be replaced with spaces instead of just removed. None of these answer the question, but are possibly viable workarounds.
Comments.UserDisplayName: Mats Mikkel Rummelhoff
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-08T07:22:00.523Z
Comments.Text: I think you are looking for `"pasteInlineTags": ["a", "strong", "del" ,"sup", "sub", "small", "b", "u", "em", "i"],`
Comments.UserDisplayName: Ignis
Tags: <craft3><redactor>
Title: Prevent breaks in redactor
ThreadText: # Prevent breaks in redactor
  
  (Asked by: username_0 on 2022-01-13)
  
  I'm trying to configure redactor in Craft 3 to only allow a single line. Setting "enterKey" to false seems great for typing, but pasting content still makes it add breaks.
  
  Here's my configuration:
  
  ```
  {
    "removeNewLines": true,
    "markup": "div",
    "enterKey": false,
    "structure": false,
    "pastePlainText": true,
    "pasteLinks": false,
    "pasteImages": false,
    "linebreaks": false,
    "pasteKeepStyle": false,
    "pasteKeepClass": false,
    "pasteKeepAttrs": false,
    "pasteBlockTags": false,
    "pasteInlineTags": false
  }
  
  ```
  
  Sample content that I paste in:
  
  ```
  Line 1
  Line 2
  Line 3
  
  ```
  
  Which becomes:
  
  ```
  <div>Line 1<br>Line 2<br>Line 3</div>
  
  ```
  
  But I want it to be just always forced to one line, no `br`'s. Seems Redactor used to have configuration for this but I can't see any alternatives. Does anyone know if this is possible?
  
  **Tags:** craft3, redactor
  
  > **Comments:**
  > **username_1**: Redactor is broken as hell, configuration is mostly ignored when pasting. You might have to just filter out newlines using a save hook (using strip_tags with a white-list of allowed tags, for example).  
  > **username_2**: ...or use the `|striptags` filter in Twig when outputting. Or, use CSS (i.e. `br { display: none; }`). Or something like `|replace('<br>', ' ')` (also Twig), if the breaks need to be replaced with spaces instead of just removed. None of these answer the question, but are possibly viable workarounds.  
  > **username_3**: I think you are looking for `"pasteInlineTags": ["a", "strong", "del" ,"sup", "sub", "small", "b", "u", "em", "i"],`  
  
  ---
  
  ## 0 answers
  
  