Why ckeditor delete the html tags?

rumen

Quote from: crnogorac081 on July 19, 2022, 09:08:52 AM
Check the ckeditor readme file. There are several locations where you can have wb_ckconfig.js file, and one location overwrite another oy priority. There could be situation where you have wb_ckconfig.js file that you dont know.

Well, it is really available at the Default template folder /js/ and it is temporary renamed (for any case) so consider does not exist anywhere else.

crnogorac081

Check the ckeditor readme file. There are several locations where you can have wb_ckconfig.js file, and one location overwrite another oy priority. There could be situation where you have wb_ckconfig.js file that you dont know.
Web developer

rumen

Quote from: dbs on July 18, 2022, 07:06:34 PM
Be sure which wb_ckconfig.js is loaded. Check the path in the source code of the backend page.
Maybe you use also a wb_ckconfig.js in your template or in the folder /templates

Sorry, not sure what you mean. I have 1 file that I use this file does not exist anywhere else. I mean I didn't copy the file on any other place - no need to do it.

Luisehahne

Quote from: dbs on July 18, 2022, 05:00:47 PM
For the case nobody wrote it:
what ist with:
config.allowedContent = true;

Quote from: dbs on July 18, 2022, 07:06:34 PM
Be sure which wb_ckconfig.js is loaded. Check the path in the source code of the backend page.
Maybe you use also a wb_ckconfig.js in your template or in the folder /templates

DBS is absolutely right, this is what the original included wb_ckconfig.js says.  (Y)

Dietmar
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

dbs

Be sure which wb_ckconfig.js is loaded. Check the path in the source code of the backend page.
Maybe you use also a wb_ckconfig.js in your template or in the folder /templates
[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

rumen

//
Quote from: dbs on July 18, 2022, 05:00:47 PM
For the case nobody wrote it:
what ist with:
config.allowedContent = true;

Yes it is exactly like that:

config.allowedContent = true;

dbs

For the case nobody wrote it:
what ist with:
config.allowedContent = true;

[url="https://onkel-franky.de"]https://onkel-franky.de[/url]

LudwigSt

"The full page mode make it possible to use CKEditor 4 to edit entire HTML pages (from <html> to </html>), including the page metadata like DOCTYPE, character set encoding, meta tags, text and background color, or margins."

I don't think, that you need that. The index.php of the template is normally changed with an external editor like Notpad++ etc.
It is ok to leave config.fullPage = false;

Concerning the widget.js: You have it twice in your source-code. Line 27
<script id="intergram" type="text/javascript" src="https://www.intergram.xyz/js/widget.js"></script>

and line 404
<script src="https://portmoneto.com/templates/html5up_editorial/assets/js/widget.js" type="text/javascript"></script>
<!-- TELEGRAM INTEGRATION END HERE-->

You should delete that line 404.

Concerning the CKEditor: Did you upload all files with ftp? I am afraid something went wrong with the file-transfer. That is often the reason, if a module does not work like it should. In my Version of WB 2.13.0 r63 and CKEditor 4.16.0.0 there is no problem when I try your Video Example.

LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

rumen

Quote from: Luisehahne on July 18, 2022, 01:43:21 PM
Quote from: rumen on July 15, 2022, 08:32:47 AM
I have a question. Why ckeditor delete the html tags? If I enter something as "source" code and save then open and the code is not there anymore, just the text. Just wanted to try to embed video with code:

<video width="400" controls>
  <source src="video.mp4" type="video/mp4">
</video>


Saved and open and the screen was empty.

modules/ckeditor/wb_config/wb_config.js  line 118 is set to:

config.fullPage = true;

i cannot confirm the issue, my CKEditor Version is 4.19.0 on WB 2.13.2

Dietmar

If I was sure the site will not totally collapse I would risk to upgrade. (Just need to change PHP to > 8 right?) but I will destroy again the code in the calcs? Right? Because it will apply the new Ckeditor and will bring back the page

to 

config.fullPage = false;


and I will need to make it again

config.fullPage = true;


and apply all the changes again. Right?

rumen

Quote from: LudwigSt on July 18, 2022, 09:03:20 AM
If we work through the code correcting mistake by mistake, we will bring it to work.
1. You have this in your source code, but the file does not exist:


<script src="https://portmoneto.com/templates/html5up_editorial/assets/js/widget.js" type="text/javascript"></script>


2. If we compare the source code of the button, which should start the calculation, there is a difference between the working and not working version:
Working code is <input type="button" style="cursor:pointer" onclick="doAmortization()" value="Изчисли">
Not working code is <input type="button" value="Изчисли">

3. Your function doArmotization() requires an element with the id amount, but you do not use this id for the element, so it can't work.
Change this <td><input name="amount" size="10" type="text" value="6000" /></td> to <td><input id="amount" name="amount" size="10" type="text" value="6000" /></td> and do the same for the id's term and apr.

Let me know what happens.

Partially solved the issue:   What I got (with your help) was that when the code is saved with Button "Save" (or if I open the code and Save it for I made any changes) the Ckeditor literally delete some (most of all) html tags and the page doesn't work. BUT if I hit "Save and Close" button then it works but I should not open it to make any changes. Once opened it will delete the tags again. So I need to make any changes I need to open (get the source code in any external editor) make the changes and copy / paste the new code exiting with "Save and Close" button again. I have 29 calcs and I think 23-24 now working after I copy / paste the codes one by one again. 

About the widget.js - it is not part of the template (This is Telegram chat integration so people who visit the site can send text messages direct to my Telegram - understand my phone).

the code in the index.php is not

<script src="https://portmoneto.com/templates/html5up_editorial/assets/js/widget.js" type="text/javascript"></script>

it is

<script id="intergram" type="text/javascript" src="https://www.intergram.xyz/js/widget.js"></script>

Luisehahne

Quote from: rumen on July 15, 2022, 08:32:47 AM
I have a question. Why ckeditor delete the html tags? If I enter something as "source" code and save then open and the code is not there anymore, just the text. Just wanted to try to embed video with code:

<video width="400" controls>
  <source src="video.mp4" type="video/mp4">
</video>


Saved and open and the screen was empty.

modules/ckeditor/wb_config/wb_config.js  line 118 is set to:

config.fullPage = true;

i cannot confirm the issue, my CKEditor Version is 4.19.0 on WB 2.13.2

Dietmar
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

LudwigSt

If we work through the code correcting mistake by mistake, we will bring it to work.
1. You have this in your source code, but the file does not exist:


<script src="https://portmoneto.com/templates/html5up_editorial/assets/js/widget.js" type="text/javascript"></script>


2. If we compare the source code of the button, which should start the calculation, there is a difference between the working and not working version:
Working code is <input type="button" style="cursor:pointer" onclick="doAmortization()" value="Изчисли">
Not working code is <input type="button" value="Изчисли">

3. Your function doArmotization() requires an element with the id amount, but you do not use this id for the element, so it can't work.
Change this <td><input name="amount" size="10" type="text" value="6000" /></td> to <td><input id="amount" name="amount" size="10" type="text" value="6000" /></td> and do the same for the id's term and apr.

Let me know what happens.
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

rumen

Quote from: LudwigSt on July 17, 2022, 12:34:18 PM
First you should correct your config.php and use for the WB_URL https:// instead of http:// - That is the reason for most browsers not to load required content.

OK I did  it, but that not solved the issue.

LudwigSt

First you should correct your config.php and use for the WB_URL https:// instead of http:// - That is the reason for most browsers not to load required content.
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

rumen

Well, I didn't made any other changes only that one (a long time ago):

config.fullPage = true;

Now I see that many calculators that I put on the site simply doesn't work. They work outside the site and doesn't inside the site never mind I try the "ckeditor" or "CODE2" modules. Both doesn't work. IS that connected somehow or not - no idea. For example this calculator (out of the site) is the same here in the site. The one out of the site works and same in the site doesn't. Same script.

crnogorac081

Ok it is the ckeditor settings. Undo what you did and try again
Web developer

rumen

Same. Cyrillic, Latin no mater.  The problem comes from the fact that ckeditor delete the html tags. When I make a link under the screen it makes simple <a href= ....> - after the "Save" the text is there, but the HTML tag missing.

crnogorac081

#6
Ok the links are Cyrillic I believe that's the problem. Check if latin letter link if it is ok ?

Quick fix is to use bitly or other service to shorten (change) your link.
Web developer

rumen


crnogorac081

Which continent do you get in output ?
Web developer

rumen

Quote from: crnogorac081 on July 15, 2022, 12:33:22 PM
Take a look at this https://forum.websitebaker.org/index.php/topic,31549.msg220822.html#msg220822

Line ExtraAllowedContent maybe to put video here. Also check disallowed etc

I remember there was a way to give permission for full html content to be visible and usable. Thought this is the line:

config.fullPage = true;

crnogorac081

Take a look at this https://forum.websitebaker.org/index.php/topic,31549.msg220822.html#msg220822

Line ExtraAllowedContent maybe to put video here. Also check disallowed etc
Web developer

rumen

I have a question. Why ckeditor delete the html tags? If I enter something as "source" code and save then open and the code is not there anymore, just the text. Just wanted to try to embed video with code:

<video width="400" controls>
  <source src="video.mp4" type="video/mp4">
</video>


Saved and open and the screen was empty.

modules/ckeditor/wb_config/wb_config.js  line 118 is set to:

config.fullPage = true;