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!
Post Reply
Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Highlight plugin calls

Post by Tata » Tue Sep 25, 2018 3:44 pm

Bei mir funktioniert dies nicht, wie gewünscht (bestimmt fehler im Syntax)
xhplugincall_dialogue4.jpg

Code: Select all

								{
						            type   : 'radio',
						            name   : 'radio',
						            label  : 'radio',
						            text   : 'Insert as: SPAN (default: DIV)',
						            checked : false
								}
							]
						}
					],
					onsubmit: function (e) {
						if(checked = false){
							editor.insertContent('<div class="xhplugincall mceNonEditable">{{{' + e.data.title + '}}}</div>');
						}else{
							editor.insertContent('<span class="xhplugincall mceNonEditable">{{{' + e.data.title + '}}}</span>');
						}
					}
You do not have the required permissions to view the files attached to this post.
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: Highlight plugin calls

Post by manu » Tue Sep 25, 2018 3:46 pm

@Tata: IMHO sollten wir es nicht übertreiben. Die Benutzer, auf die dieses Plugin ausgerichtet ist, können die Konsequenzen von <span> oder <div> nicht abschätzen. Keep it simple.
Wenn <div> inside <span> ein Problem sein sollte, machen wir lieber ein <div style="display:inline-block">.

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

Re: Highlight plugin calls

Post by frase » Tue Sep 25, 2018 4:00 pm

manu wrote:
Tue Sep 25, 2018 3:46 pm
Wenn <div> inside <span> ein Problem sein sollte, machen wir lieber ein <div style="display:inline-block">.
Besser: <div class="xhplugincall mceNonEditable"> ...
Und in style.css definieren:

Code: Select all

.xhplugincall {
    color: #c00;
    padding: .1em .25em;
    background: #ffffa5;
    display: inline-block;
}

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

Re: Highlight plugin calls

Post by Tata » Tue Sep 25, 2018 4:02 pm

Teilweise ist es richtig so. Einem erfahrenen Webmaster ist es schon ohne dem Plugin klar, wie was machen und was nicht mehr beruhren. Doch meine ich, dass der Plugin macht alles auch für sie die Arbeit etwa übersichtlicher. Und die verstehen den Unterschied zwischen DIV und SPAN (oder <div style="display:inline-block">) und werden es via Plugin gut und bequemer nutzen können.
Es ist dann, dass es könnte wohl standard nur DIV da bleiben und der zusätztliche style="display:inline-block könnte durch ein checkbox ein/ausgeschaltet werden.
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: Highlight plugin calls

Post by frase » Tue Sep 25, 2018 4:08 pm

Tata wrote:
Tue Sep 25, 2018 4:02 pm
und der zusätztliche style="display:inline-block könnte durch ein checkbox ein/ausgeschaltet werden.
Das wäre gar nicht nötig.
Der DIV (display:inline-block) wird genau so viel Platz einnehmen, wie das Plugin oder die Funktion benötigt.

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

Re: Highlight plugin calls

Post by Tata » Tue Sep 25, 2018 4:12 pm

Klar. Dann wird der Aufruf entweder im Text benutzt und wird sich als SPAN benehmen, oder in eine neue Zeile und der Rest wieder in eine neue Zeile. Richtig verstanden?
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: Highlight plugin calls

Post by frase » Tue Sep 25, 2018 4:16 pm

Tata wrote:
Tue Sep 25, 2018 4:12 pm
Klar. Dann wird der Aufruf entweder im Text benutzt und wird sich als SPAN benehmen, oder in eine neue Zeile und der Rest wieder in eine neue Zeile. Richtig verstanden?
Ja.
Ich hoffe, dass ich nicht falsch liege. ;-)

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

Re: Highlight plugin calls

Post by Tata » Tue Sep 25, 2018 4:26 pm

Gerade getestet. Leider, insertet in eine Textzeile, der Aufruf kommt in eine eigene Zeile. Als ob der Style ignoriert wurde.
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.

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

Re: Highlight plugin calls

Post by Tata » Tue Sep 25, 2018 4:38 pm

Eben das hat nicht geholfen:

Code: Select all

editor.insertContent('<div class="xhplugincall mceNonEditable" style="display:inline-block">{{{' + e.data.title + '}}}</div>')
Das einzige ist, dass es zeigt den Aufruf zwar in inline-block, aber doch in einer neuen Zeile. Sonst nimmt es die volle Breite.
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: Highlight plugin calls

Post by frase » Tue Sep 25, 2018 4:57 pm

Tata wrote:
Tue Sep 25, 2018 4:38 pm
Das einzige ist, dass es zeigt den Aufruf zwar in inline-block, aber doch in einer neuen Zeile. Sonst nimmt es die volle Breite.
Du hast recht.
Sobald der TinyMCE mit einem <div> beginnt, schließt er das vorherige Element.
Also, ist der Aufruf in einem <p>, dann setzt der Tiny ein </p> bevor er den <div ...> setzt.
:(

Post Reply