Highlight plugin calls

Discussions and requests related to new CMSimple features, plugins, templates etc. and how to develop.
Please don't ask for support at this forums!
frase
Posts: 5085
Joined: Thu Apr 21, 2016 6:32 am
Location: Saxony
Contact:

Re: Highlight plugin calls

Post by frase » Fri Oct 05, 2018 12:41 pm

Tata wrote:
Fri Oct 05, 2018 12:22 pm
Der Code reinkopiert - kein Effekt
Ah, das hatte ich vergessen.
Das funktioniert nur, wenn man das lang-Attribut auch noch direkt an das Element schreibt. Irgendwie kommt das html-lang nicht an.

Code: Select all

editor.insertContent('<' + tagname + ' lang="' + lang + '" class="xhplugincall mceNonEditable">{{{' + e.data.title + '}}}</' + tagname + '>');
Wenn du das tust, musst du deine Aufrufe nochmal aufrufen und speichern.

Aber: Das ist dann der Wahnsinn, was da so alles an einem Pluginaufruf dransteht (wie Holger schon erwähnte).

Code: Select all

<div class="xhplugincall mceNonEditable" lang="de">
Warte lieber ab, was Manu noch so bringt.

---
jetzt war Christoph schneller. Und meine Überlegungen waren gar nicht so falsch. Mal sehen, ob sein Vorschlag hilft ...

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

Re: Highlight plugin calls

Post by frase » Fri Oct 05, 2018 12:50 pm

cmb wrote:
Fri Oct 05, 2018 12:38 pm
Eine saubere Lösung fällt mir zunächst nicht ein. Aber wenn man vor dieser Zeile die folgende einfügt:
...
Dann erscheint nachdem man auf den Insert/Edit-Plugincall-Schalter geklickt hat, der gewünschte Text.
Ja, das funktioniert, aber erst, wie du schon sagst, nachdem man auf den Button geklickt hat.

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

Re: Highlight plugin calls

Post by manu » Sat Oct 06, 2018 8:47 am

frase wrote:
Fri Oct 05, 2018 12:41 pm

Code: Select all

<div class="xhplugincall mceNonEditable" lang="de">
Warte lieber ab, was Manu noch so bringt.
---
Passt doch!
in meinem plugin.min.js ~Zeile 43

Code: Select all

      if (e.load) {
        e.content=e.content.replace(/\{{3}.*?\}{3}/g,'<span class="xhplugincall mceNonEditable" lang="' + lang + "\">$&</span>");
      }
Und dann im style.css

Code: Select all

.xhplugincall:lang(de):hover:after {
	content: "AUFRUF NICHT VERÄNDERN, SOLANGE SIE NICHT WISSEN, WAS SIE TUN!!!";
}
Dann funktionierts doch prächtig.
@Tata: Der Hinweis ist wohl brillant, aber die Verbotstafel und die rote Farbe finde ich etwas agressiv. Es ist ja primär zu GEbrauch und nicht MISSbrauch. Was meint Ihr?

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

Re: Highlight plugin calls

Post by Tata » Sat Oct 06, 2018 9:13 am

Ja, das ist nur Geschmacksache und auch nur eine Kirsche am Oben. Aber rote Text am gelben Hintergrund ist wohl auch OK :)
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.

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

Re: Highlight plugin calls

Post by cmb » Sat Oct 06, 2018 10:11 am

Vielleicht sollte man das entsprechende CSS einfach nur auskommentiert ausliefern; wer es nutzen möchte, kann es auskommentieren und nach Bedarf anpassen.
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: Highlight plugin calls

Post by frase » Sat Oct 06, 2018 10:16 am

manu wrote:
Sat Oct 06, 2018 8:47 am
Passt doch!
in meinem plugin.min.js ~Zeile 43
Habe leider etwas den Überblick verloren, welche denn jetzt die aktuellste Plugin-Version und wo sie zu finden ist. :(

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

Re: Highlight plugin calls

Post by frase » Sat Oct 06, 2018 10:32 am

manu wrote:
Sat Oct 06, 2018 8:47 am
@Tata: Der Hinweis ist wohl brillant, aber die Verbotstafel und die rote Farbe finde ich etwas agressiv. Es ist ja primär zu GEbrauch und nicht MISSbrauch. Was meint Ihr?
Man könnte ja eine dezente Variante als Standard einbauen und die Änderungsmöglichkeiten in der help-Datei dokumentieren.

Noch ein kleiner Nachtrag.
In der style.css müsste :hover:after noch einen z-index erhalten, sonst könnte es zu Stapel-Schwierigkeiten kommen.

Code: Select all

.xhplugincall:hover:after{
    ...
    z-index: 2;
}

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

Re: Highlight plugin calls

Post by cmb » Sat Oct 06, 2018 1:02 pm

frase wrote:
Sat Oct 06, 2018 10:16 am
manu wrote:
Sat Oct 06, 2018 8:47 am
Passt doch!
in meinem plugin.min.js ~Zeile 43
Habe leider etwas den Überblick verloren, welche denn jetzt die aktuellste Plugin-Version und wo sie zu finden ist. :(
Das sollte https://github.com/manu37/tinymce4/tree ... plugincall sein.
Christoph M. Becker – Plugins for CMSimple_XH

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

Re: Highlight plugin calls

Post by frase » Sat Oct 06, 2018 1:10 pm

cmb wrote:
Sat Oct 06, 2018 1:02 pm
Das sollte https://github.com/manu37/tinymce4/tree ... plugincall sein.
Ja, danke. Da hat mich nur die eine Zeilennummer verwirrt.
Alles OK.
Nö. Das ist nicht die letzte besprochene Version.
Macht nix. Bevor es offiziell wird, wird's schon stimmen.

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

Re: Highlight plugin calls

Post by manu » Sat Oct 06, 2018 1:46 pm

Es gab noch das eine oder andere Gefrickel.
Hier mal die aggressive Version: https://github.com/manu37/tinymce4/tree/master
Gruss
manu, auf dem Weg in die Ferien bis Mitwoch

Post Reply