TinyMCE4 fügt unwillige Zeilen ein

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

TinyMCE4 fügt unwillige Zeilen ein

Post by Tata » Mon Mar 30, 2020 6:50 am

Ich habe gefunden folgendes:
Mit CMSimple_XH v1.7.2.2 möchte ich eine Seite ohne eigenen <h?>Überschrifft</h?> erstellen. Mit

Code: Select all

<p><strong>Návody a tipy</strong></p>
<details> 
<summary>TIP1</summary> 
tip 1 
</details>
speichert TinyMCE4

Code: Select all

<p><strong>Návody a tipy</strong></p>
<p> </p>
<p><details> <summary>TIP1</summary> tip 1 </details></p>
<p> </p>
Eine leere Zeile speichert es immer. Wo und was soll man umstellen, um die leere Zeilen zugehängt würden? Warum fügt es nach jedem Speichern noch eine leere Zeile vor und nach "<details>" ein?
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: 1086
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: TinyMCE4 fügt unwillige Zeilen ein

Post by manu » Mon Mar 30, 2020 7:34 am

füge mal im _init.js

Code: Select all

extended_valid_elements: 'details[*]'
ein. Wenn da schon was drinsteht, mit Komma hinten anhängen.
Besser?

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

Re: TinyMCE4 fügt unwillige Zeilen ein

Post by Tata » Mon Mar 30, 2020 8:17 am

Hm, da war bereits in aktive fontawesome.js
extended_valid_elements: 'span[*]'
zugefügt

Code: Select all

 extended_valid_elements: ['span[*],details[*]']
geschrieben

Code: Select all

<p>Überschrifft</p>
<details>
<summary>Title</summary>
<p>Lorem ipsum</p>
</details>
gespeichert

Code: Select all

<p>Überschrifft</p>
<p> </p>
<p> </p>
<p><details open=""> <summary>Title</summary>
<p>Lorem ipsum</p>
</details></p>
<p> </p>
<p> </p>
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.

frase
Posts: 5085
Joined: Thu Apr 21, 2016 6:32 am
Location: Saxony
Contact:

Re: TinyMCE4 fügt unwillige Zeilen ein

Post by frase » Mon Mar 30, 2020 9:10 am

Beispiel init_fontawesome.js :

Code: Select all

...
  extended_valid_elements: 'span[*]',
  custom_elements: 'details,~summary'
}
Eingabe im Quellcode:

Code: Select all

<p><strong>Návody a tipy</strong></p>
<details>
<summary>TIP1</summary>
tip
</details>
Tiny Ergebnis:

Code: Select all

<p><strong>Návody a tipy</strong></p>
<details><summary>TIP1</summary>tip</details>
Das müsste so gehen - oder?

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

Re: TinyMCE4 fügt unwillige Zeilen ein

Post by Tata » Mon Mar 30, 2020 9:38 am

JA, so geht es.
Danke.
Und noch etwas.
Im imgslider in libs/lightbox/js/lightbox.js steht

Code: Select all

LightboxOptions = Object.extend({
    fileLoadingImage:        './plugins/imgcarousel/libs/lightbox/images/loading.gif',
    fileBottomNavCloseImage: './plugins/imgcarousel/libs//lightbox/images/close.gif',
richtig wäre

Code: Select all

LightboxOptions = Object.extend({
    fileLoadingImage:        './plugins/imgslider/libs/lightbox/images/loading.gif',
    fileBottomNavCloseImage: './plugins/imgslider/libs//lightbox/images/close.gif',
aber auch so wird der Closebutton nicht gezeigt und im Quellcode steht

Code: Select all

<img src="http://localhost:8888/test/plugins/imgslider/libs/lightbox/images/close.gif">
mit

Code: Select all

LightboxOptions = Object.extend({
    fileLoadingImage:        window.location.href + '/' + 'plugins/imgslider/libs/lightbox/images/loading.gif',
    fileBottomNavCloseImage: window.location.href + '/' + 'plugins/imgslider/libs/lightbox/images/close.gif',
gibt es

Code: Select all

<img src="http://localhost:8888/test/?test/plugins/imgslider/libs/lightbox/images/close.gif">
unde der Closebutton ist wieder nicht da.
mit

Code: Select all

LightboxOptions = Object.extend({
    fileLoadingImage:        window.location.origin + '/' + 'plugins/imgslider/libs/lightbox/images/loading.gif',
    fileBottomNavCloseImage: window.location.origin + '/' + 'plugins/imgslider/libs/lightbox/images/close.gif',
gibt es

Code: Select all

<img src="http://localhost/plugins/imgslider/libs/lightbox/images/close.gif">
mit

Code: Select all

LightboxOptions = Object.extend({
    fileLoadingImage:        window.location.origin + '/test' + '/plugins/imgslider/libs/lightbox/images/loading.gif',
    fileBottomNavCloseImage: window.location.origin + '/test' + '/plugins/imgslider/libs/lightbox/images/close.gif',
ist es OK. Ich finde es aber wenigstens zu unsicher und kompliziert, auf jeder Webseite in der js Datei diese Änderungen zu machen. Es sollte doch möglich sein, im Plugin den Code so zu schreiben, dass es generell und automatisch eingestellt wird.
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: 2963
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: TinyMCE4 fügt unwillige Zeilen ein

Post by lck » Mon Mar 30, 2020 11:19 am

Fehler vom "Image Slider" am besten an @jerry melden oder hier posten.

Evtl. Workaround: In der Konfiguration bei "Lightbox" > "prettyPhoto" einstellen.
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

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

Re: TinyMCE4 fügt unwillige Zeilen ein

Post by Tata » Mon Mar 30, 2020 2:17 pm

Tja, keine Antwort seit einige Tage.
Jetzt versucht am Server mit

Code: Select all

    fileLoadingImage:        window.location.href +  'plugins/imgslider/libs/lightbox/images/loading.gif',
    fileBottomNavCloseImage: window.location.href +  '/plugins/imgslider/libs/lightbox/images/close.gif',
läuft super und gibt im Code

Code: Select all

https://cmsimple.sk/ukastelana-covid/plugins/imgslider/libs/lightbox/images/close.gif
nur in "Defaultsprache". Schaltet man zu 2lang, ist der Closebutton wieder unbekannt. Im Code steht z.B.

Code: Select all

<img src="https://cmsimple.sk/ukastelana-covid/de/plugins/imgslider/libs/lightbox/images/close.gif">
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.

Post Reply