WebsiteBaker Community Forum
WebsiteBaker Support (2.12.x) => General Help & Support => Topic started by: 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;
-
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
-
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;
-
Which continent do you get in output ?
-
This is nightmare. It delete even links (https://zapryanov.faith/cloud/index.php/s/SNbGCTjpAgbqW6Y).
-
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.
-
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.
-
Ok it is the ckeditor settings. Undo what you did and try again
-
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 (http://portmoneto.com/calcs/calc_103.php) calculator (out of the site) is the same here (http://portmoneto.com/pages/posts/krediten-kalkulator-s-pogasitelen-plan-izchisljava-kredita-na-rati-ne-ravni-mesechni-vnoski-39.php) in the site. The one out of the site works and same in the site doesn't. Same script.
-
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.
-
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 (https://i.imgur.com/1014i3O.png), but that not solved the issue.
-
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.
-
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 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>
-
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?
-
"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.
-
For the case nobody wrote it:
what ist with:
config.allowedContent = true;
-
http://
For the case nobody wrote it:
what ist with:
config.allowedContent = true;
Yes it is exactly like that (https://i.imgur.com/4OBkLka.png):
config.allowedContent = true;
-
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
-
For the case nobody wrote it:
what ist with:
config.allowedContent = true;
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
-
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 (https://i.imgur.com/9TCfDug.png) this file does not exist anywhere else. I mean I didn't copy the file on any other place - no need to do it.
-
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.
-
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.