Page 1 of 1

WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Thu May 16, 2019 10:09 am
by Huhu
Logged in as Administrator, with filters switched off and only the Serendipity and NL2BR Formatting active (meaning that nothing should be filtered or stripped off the code), the WYSIWYG editors clear certain tags.

1. CKG editor clears the complete

Code: Select all

<iframe>...</iframe>
of Google map embeds.

2 a. S9y's built-in editor clears certain "style=" tags, like

Code: Select all

<p style="clear: both">
which will result in a simple

Code: Select all

<p>
for example (also in Source Code view).
Note that it does not clear all "style"-tags, image resizing through "style" works fine, for example.

2 b. Strangely, when I switched from S9y WYSIWYG to Source Code only in the User Options, the missing style tags suddenly reappeared (this might be a strange cache issue, though).

Re: WYSIWYG editors clear certain HTML/CSS tags

Posted: Sun May 19, 2019 9:39 am
by Afaque
Hi New to s9y here...figuring out still...as far as I understand the bug for now i think you have to change plugins author from ALL Authors to Site owner to not get html/css tags to be cleared.Still newbie sorry if i was wrong!

Re: WYSIWYG editors clear certain HTML/CSS tags

Posted: Mon May 20, 2019 9:03 am
by Huhu
The core WYSIWYG editor is not a plug-in afaik, therefore the owner can't be changed, sorry.
it could be Serendipity's Text Formatting plug-in which messes around, though. That could be changed.
But thanks for the reply.

Re: WYSIWYG editors clears CLEAR:BOTH and similar tags

Posted: Thu Jul 22, 2021 7:02 pm
by Huhu
Still running into teh problem that I can't sort <div> areas velow each other, since

Code: Select all

<p style="clear:both;">
and similar approaches don't work (they are cleared upon save, and yes, I am logged in as admin).
problem even turns up when embedding a centered image under a div tag (images usually do work fine when inserted via media center and "center" value).

Any ideas and solutions?

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Thu Jul 22, 2021 10:58 pm
by onli
You could try the configuration of the editor as it is in the current github master. Make a backup of your htmlarea/ folder, then replace it with https://github.com/s9y/Serendipity/tree/master/htmlarea.

It could give you a newer version of the editor and some configuration changes that might help.

If it doesn't we could tweak the settings again, reproduce the issue in a dev environment and see how it can be solved.

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Fri Jul 23, 2021 4:06 pm
by Huhu
Brilliant, I'll give it a try!

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Thu Nov 10, 2022 8:43 am
by Huhu
Quick question, the updated version of the editor including the preservation of "clear:both" styles is not yet integrated in updates, right?
Which way would be recommended to achieve a clear:both (to get a hard line break after images, for example)?

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Thu Nov 10, 2022 4:12 pm
by onli
Did the version from the github master back then work for you, or was the editor still broken with that one?

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Fri Nov 11, 2022 8:50 am
by Huhu
I tried it with

Code: Select all

<br [and p] style="clear: both;">
and both worked! It seems I had tried a derelict version before.
So yes, your current version seems to do the trick. What would be great would be a button to click in the WYSIWYG toolsbar to insert a p clear or br clear.

But as long as coding it in by hand works, it's already fine for me. Thanks!!

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Fri Nov 11, 2022 9:16 pm
by onli
Maybe not all that derelict, I did change the configuration somewhat recently again together with the changes for PHP 8 :)

It's good that this work now! I'm not sure about the buttons, this is a bit specific. You could add them on your own of course - https://github.com/s9y/Serendipity/blob ... it.tpl#L14 shows how commands can be added easily as a button, together with some documentation specific to ckeditor using that to insert an html tag should be doable.

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Thu Nov 17, 2022 8:35 am
by Huhu
Thanks, and thanks for pointing me to the document for button integration. Looks straight enough, I'll give it a try!

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Fri Sep 15, 2023 10:52 am
by Huhu
Just ... here is an example for the problems with div-tags and clear both=all. When I wrote the CSS, it appeared in order. After updating the site via the WYSIWYG, it all got a bit ... messy.

(the title box should be in a separate line, the "Leseprobe" and "Bestellen" should be side-by-side in a separate line).

https://uhusnest.de/index.php?/archives ... l#extended

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Fri Sep 15, 2023 11:55 am
by onli
Sp you had added clear:both to .buchlink and the p tag after .litverweis, but the editor again removed both?

Re: WYSIWYG editors clears CLEAR=BOTH and similar tags

Posted: Fri Sep 15, 2023 12:32 pm
by Huhu
Well first of all, the WYSIWYG adds a "<p>&nbsp;</p>" code between </div> and the follow-up<div>, even if an area is not changed. Strangely, not always.
Next, I added "clear: all" to .buchlink in css, but it didn't help; the div is still wrapped with other text.
If I write p style="clear:all", the style tag is removed by the editor (WYSIWYG only).

So, this is correctly displayed:

Code: Select all

<div class="litverweis">Der Dimensionsblock,[...]</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Die AMUNDSEN [...]
But this is displayed wrapped, while it seems to be the same code-wise ... I'll have to check again if there is a loose div or /div somewhere ... :

Code: Select all

<div class="litverweis">Die Geminga-Morde, ...</div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Ende ...
as well as this:

Code: Select all

<div class="buchlink">[...] Perry Rhodan-Webseite[...]</div>
<p>&nbsp;</p>
<div class="litverweis">Die zerborstene Welt [...]</div>
<p>Auf der [...] Ganze gar keinen Spa&szlig;.</p>
<p>&nbsp;</p>
And here, again, both pairs of boxed are one after the other, but the pairs themselves are not cleared but chained together (while the second pair is shifted down a bit by an auto-inserted <p> tag)

Code: Select all

<div class="buchlink">Leseprobe</div>
<div class="buchlink">H&ouml;rprobe</div>
<p>&nbsp;</p>
<div class="buchlink">Interview: </div>

<div class="buchlink">Bestellen</div>