xh_plugincall - mehrere Aufrufe

Questions about how to use the online - editors and suggestions how to improve them
Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

xh_plugincall - mehrere Aufrufe

Post by Tata » Mon Oct 18, 2021 7:20 am

Wo und was ist im TMCE Plugin falsch?
Wen ich mehrere Aufrufe auf die Seite reigebe, nur der letzte wird gespeichert. Z.B.

Code: Select all

{{{hoverbox('box_1')}}}{{{hoverbox('box_2')}}}{{{hoverbox('box_3')}}}...{{{hoverbox('box_n')}}}
Gespeichert wird aber nur

Code: Select all

{{{hoverbox('box_n')}}}
Wenn der Plugin nicht aktiviert ist, ist alles in Ordnung.
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: 1085
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: xh_plugincall - mehrere Aufrufe

Post by manu » Mon Oct 18, 2021 4:24 pm

TinyMCE4?
Dann liegt es wohl an dieser Zeile. Erkenne den Bock aufs Erste nicht.

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

Re: xh_plugincall - mehrere Aufrufe

Post by lck » Tue Oct 19, 2021 6:44 pm

Tata wrote:
Mon Oct 18, 2021 7:20 am
Wo und was ist im TMCE Plugin falsch?
Wen ich mehrere Aufrufe auf die Seite reigebe, nur der letzte wird gespeichert. Z.B.

Code: Select all

{{{hoverbox('box_1')}}}{{{hoverbox('box_2')}}}{{{hoverbox('box_3')}}}...{{{hoverbox('box_n')}}}
Gespeichert wird aber nur

Code: Select all

{{{hoverbox('box_n')}}}
Wenn der Plugin nicht aktiviert ist, ist alles in Ordnung.
Das funktioniert bei mir schon (XH 1.7.5 und TinyMCE 4 mit init fontawesome_XH-plugincall).
Code im Plugincall einfügen hoverbox('box_1') > OK
Neue Zeile
Code im Plugincall einfügen hoverbox('box_2') > OK
usw.

Nach dem Speichern sind alle noch da.

Man kann natürlich nicht alle, im Beispiel 4 Pluginaufrufe, hintereinader (also auf einmal) in XH-Plugincall eingeben.
Also so: hoverbox('box_1')hoverbox('box_2')hoverbox('box_3')hoverbox('box_4')
„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: xh_plugincall - mehrere Aufrufe

Post by Tata » Tue Oct 19, 2021 6:48 pm

Ah, das habe ich nicht versucht. Danke sehr.
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: 1085
Joined: Wed Jun 04, 2008 12:05 pm
Location: St. Gallen - Schweiz
Contact:

Re: xh_plugincall - mehrere Aufrufe

Post by manu » Thu Oct 21, 2021 9:57 am

im tinymce5/plugins/tinymce/xhplugincall/plugin.min.js Zeile 73 muss im regex ein Quantifizierer auf non-greedy eingestellt werden:
/\<span class="xhplugincall mceNonEditable".*?\>+?(.*?)\<\/span\>+?/g
Damit werden auch zwei Aufrufe auf einer Zeile richtig verarbeitet. (gilt auch für tinyMCE4 Zeile 49).

Regex Profis sind gefragt: Wieso die ">" für <span> und </span> den Quantifizierer "+?" brauchen, ist mir nicht klar. Der match läuft auch ohne.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: xh_plugincall - mehrere Aufrufe

Post by cmb » Thu Oct 21, 2021 11:25 am

manu wrote:
Thu Oct 21, 2021 9:57 am
Regex Profis sind gefragt: Wieso die ">" für <span> und </span> den Quantifizierer "+?" brauchen, ist mir nicht klar. Der match läuft auch ohne.
Sieht so aus, als ob damit verschachtelte Calls behandelt werden sollen (wäre aber zumindest etwas schlampig gemacht, da unterschiedlich viele Opening- und Closing-Tags erlaubt sind). Und das macht eigentlich keinen Sinn. Ich denke, man kann darauf verzichten. Vielleicht gibt es auch Hinweise in den Commit-Messages (`git blame`), warum es so ist.
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: xh_plugincall - mehrere Aufrufe

Post by manu » Thu Oct 21, 2021 1:15 pm

cmb wrote:
Thu Oct 21, 2021 11:25 am
...
Vielleicht gibt es auch Hinweise in den Commit-Messages (`git blame`), warum es so ist.
Ach herrje. Der Fehler hat sich wohl einfach hier eingeschlichen.

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

Re: xh_plugincall - mehrere Aufrufe

Post by manu » Thu Oct 21, 2021 1:56 pm

und die non-greedy Geschichte kommt von hier. Warscheinlich einfach zuviel korrigiert...

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: xh_plugincall - mehrere Aufrufe

Post by cmb » Thu Oct 21, 2021 2:36 pm

Alles gut! :) Und danke für die Commits!
Christoph M. Becker – Plugins for CMSimple_XH

talhapartners
Posts: 3
Joined: Tue Aug 15, 2023 9:34 am

Re: xh_plugincall - mehrere Aufrufe

Post by talhapartners » Tue Aug 15, 2023 9:46 am

I have few questions regarding CM simple as i have joined this CMS recently.
1- I wanted to create a roofing services website on CMS, is this compatible?
2- Can i install plugins like Yoast SEO as we do on Word press?
3- Will i be able to manage without having the skill of Programming
4- Is this CMS paid or free?

Post Reply