WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.6 is now available!


Will it continue with WB? It goes on! | Geht es mit WB weiter? Es geht weiter!
https://forum.websitebaker.org/index.php/topic,32340.msg226702.html#msg226702


The forum email address board@websitebaker.org is working again
https://forum.websitebaker.org/index.php/topic,32358.0.html


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • Why ckeditor delete the html tags?
  • Print
Pages: [1]   Go Down

Author Topic: Why ckeditor delete the html tags?  (Read 23383 times)

Offline rumen

  • Posts: 480
  • Gender: Male
Why ckeditor delete the html tags?
« 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:

Code: [Select]
<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:

Code: [Select]
config.fullPage = true;
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #1 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
Logged
Web developer

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #2 on: July 15, 2022, 03:26:03 PM »
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:

Code: [Select]
config.fullPage = true;
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #3 on: July 15, 2022, 04:28:43 PM »
Which continent do you get in output ?
Logged
Web developer

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #4 on: July 15, 2022, 04:44:31 PM »
This is nightmare. It delete even links.
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #5 on: July 15, 2022, 05:20:16 PM »
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.
« Last Edit: July 15, 2022, 05:25:20 PM by crnogorac081 »
Logged
Web developer

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #6 on: July 15, 2022, 05:36:15 PM »
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.
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #7 on: July 15, 2022, 05:45:47 PM »
Ok it is the ckeditor settings. Undo what you did and try again
Logged
Web developer

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #8 on: July 16, 2022, 08:57:24 PM »
Well, I didn't made any other changes only that one (a long time ago):

Code: [Select]
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.
Logged

Offline LudwigSt

  • Posts: 449
  • Betatester
Re: Why ckeditor delete the html tags?
« Reply #9 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.
Logged
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #10 on: July 17, 2022, 06:05:55 PM »
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.
Logged

Offline LudwigSt

  • Posts: 449
  • Betatester
Re: Why ckeditor delete the html tags?
« Reply #11 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:
Code: [Select]


<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
Code: [Select]
<input type="button" style="cursor:pointer" onclick="doAmortization()" value="Изчисли">Not working code is
Code: [Select]
<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
Code: [Select]
<td><input name="amount" size="10" type="text" value="6000" /></td> to
Code: [Select]
<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.
Logged
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4548
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #12 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:

Code: [Select]
<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:

Code: [Select]
config.fullPage = true;

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

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

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #13 on: July 18, 2022, 03:16:06 PM »
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:
Code: [Select]


<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
Code: [Select]
<input type="button" style="cursor:pointer" onclick="doAmortization()" value="Изчисли">Not working code is
Code: [Select]
<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
Code: [Select]
<td><input name="amount" size="10" type="text" value="6000" /></td> to
Code: [Select]
<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

Code: [Select]
<script src="https://portmoneto.com/templates/html5up_editorial/assets/js/widget.js" type="text/javascript"></script>
it is

Code: [Select]
<script id="intergram" type="text/javascript" src="https://www.intergram.xyz/js/widget.js"></script>
Logged

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #14 on: July 18, 2022, 03:20:28 PM »
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:

Code: [Select]
<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:

Code: [Select]
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 

Code: [Select]
config.fullPage = false;

and I will need to make it again
Code: [Select]
config.fullPage = true;
and apply all the changes again. Right?
Logged

Offline LudwigSt

  • Posts: 449
  • Betatester
Re: Why ckeditor delete the html tags?
« Reply #15 on: July 18, 2022, 03:59:43 PM »
"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
Code: [Select]
config.fullPage = false;
Concerning the widget.js: You have it twice in your source-code. Line 27
Code: [Select]
<script id="intergram" type="text/javascript" src="https://www.intergram.xyz/js/widget.js"></script>
and line 404
Code: [Select]
<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.

Logged
LG Ludwig

Wissen ist Macht - aber nix wissen macht auch nix.

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Why ckeditor delete the html tags?
« Reply #16 on: July 18, 2022, 05:00:47 PM »
For the case nobody wrote it:
what ist with:
Code: [Select]
config.allowedContent = true;
Logged
https://onkel-franky.de

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #17 on: July 18, 2022, 06:21:19 PM »
http://
Quote from: dbs on July 18, 2022, 05:00:47 PM
For the case nobody wrote it:
what ist with:
Code: [Select]
config.allowedContent = true;

Yes it is exactly like that:

Code: [Select]
config.allowedContent = true;
Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8914
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Why ckeditor delete the html tags?
« Reply #18 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
Logged
https://onkel-franky.de

Offline Luisehahne

  • WebsiteBaker Org e.V.
  • **
  • Posts: 4548
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #19 on: July 18, 2022, 08:24:13 PM »
Quote from: dbs on July 18, 2022, 05:00:47 PM
For the case nobody wrote it:
what ist with:
Code: [Select]
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
Logged
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #20 on: July 18, 2022, 11:58:18 PM »
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.
Logged

Offline crnogorac081

  • Posts: 2161
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #21 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.
Logged
Web developer

Offline rumen

  • Posts: 480
  • Gender: Male
Re: Why ckeditor delete the html tags?
« Reply #22 on: July 19, 2022, 09:49:14 AM »
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.
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.12.x) »
  • General Help & Support »
  • Why ckeditor delete the html tags?
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2