Tinymce4 inserts leere <p>...</p>

A place to report and discuss bugs - please mention CMSimple-version, server, platform and browser version
Post Reply
Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Tinymce4 inserts leere <p>...</p>

Post by Tata » Wed Dec 20, 2023 1:59 pm

Es wurde schon mal erwähnt hier (ich kann aber den Post nicht finden). Es passiert mir wieder, dass nach dem Speichern werden leere Zeilen <p> </p> reingegeben. Errinert sich jemand, wie das zu vermeiden?
Gebe ich z.B

Code: Select all

<div>Hello, World!</div>
nach dem Speichern kommt

Code: Select all

<p></p>
<div>Hello, World!</div>
<p></p>
Es wurde etwas in *.init zu änderen.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

manu
Posts: 1090
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: Tinymce4 inserts leere <p>...</p>

Post by manu » Thu Dec 21, 2023 7:51 am

Hallo Tata
In einer Standard Installation 1.7.6 kann ich dies nicht reproduzieren.
bei forced_root_block wird bei einem non-block Element ein umschliessender <p> Tag eingefügt. Bei einem <div> sollte dies aber nicht der Fall sein und löst wohl auch nicht Dein Problem.

lck
Posts: 2971
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Tinymce4 inserts leere <p>...</p>

Post by lck » Thu Dec 21, 2023 12:05 pm

Tata wrote:
Wed Dec 20, 2023 1:59 pm
Es wurde schon mal erwähnt hier (ich kann aber den Post nicht finden). Es passiert mir wieder, dass nach dem Speichern werden leere Zeilen <p> </p> reingegeben. Errinert sich jemand, wie das zu vermeiden?
Gebe ich z.B

Code: Select all

<div>Hello, World!</div>
nach dem Speichern kommt

Code: Select all

<p></p>
<div>Hello, World!</div>
<p></p>
Es wurde etwas in *.init zu änderen.
Siehe hier: viewtopic.php?f=7&t=17949
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

Tata
Posts: 3588
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Tinymce4 inserts leere <p>...</p>

Post by Tata » Thu Dec 21, 2023 4:52 pm

Bohring tiefer in this Forum und dann am https://gitlab.com/tinymce-plugins/tiny ... /issues/37, ich habe veersucht in meiner *.init Datei nach

Code: Select all

entity_encoding: "raw",
noch

Code: Select all

forced_root_block : "",
reinyustecken. Und soweit scheint es endlich OK. Sieht aber zu einfach um zu glauben, dass es wirklich auch funktioniert :-).
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

lck
Posts: 2971
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: Tinymce4 inserts leere <p>...</p>

Post by lck » Thu Dec 21, 2023 10:17 pm

Die Lösung des Problems ist in meinem obigen Post bereits enthalten, nur nicht direkt verlinkt. Deswegen hier noch mal der Link:
https://github.com/cmb69/codeeditor_xh/ ... -898940109
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

Post Reply