Author Topic: ## SOLVED ## Fontawesome icon problem Ckeditor  (Read 451 times)

Offline peppos

  • Posts: 22
## SOLVED ## Fontawesome icon problem Ckeditor
« on: March 03, 2017, 09:13:27 PM »
I'm doing some tests with WebsiteBaker and I'm using icons http://fontawesome.io
Because to put these icons you use for example this code:

Code:
Only registered users can see contents. Please click here to Register or Login.
If I put it in the template, for example index.php I have no problems. But if I have to put through the admin panel CKEditor, I have to put the viewing html and saves me well. But then if at a later time I make a change to that I find the page with the missing icon and the modified code from CKEditor. How can I do to prevent ckeditor to change myself the html code that put me? I will not completely disable CKEditor because it is still useful.
« Last Edit: May 15, 2018, 08:24:54 PM by Boudi »

Offline Boudi

  • Global Moderator
  • *****
  • Posts: 1182
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Fontawesome icon problem Ckeditor
« Reply #1 on: May 15, 2018, 11:21:58 AM »
This is because the CK Editor strips out the <i> tag.

There is a workaround but even this doesn't seem to work.

In the wb_ckconfig.js I commented out the:

Code:
Only registered users can see contents. Please click here to Register or Login.
And even inserted extra code:

Code:
Only registered users can see contents. Please click here to Register or Login.
Refreshed the mods, cleared the cache. But still no luck.

Any solutions over here guys?
...:: Bake the Unbakable ::...

Offline dbs

  • Betatester
  • **
  • Posts: 7225
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Fontawesome icon problem Ckeditor
« Reply #2 on: May 15, 2018, 11:27:31 AM »
In newer WB versions the include.php of ckeditor is stronger as the wb_ckconfig.js.
If you have the same parameters in these two files, the parameter in include.php wins.

try this line
Code:
Only registered users can see contents. Please click here to Register or Login.
« Last Edit: May 15, 2018, 11:40:22 AM by dbs »

Offline Boudi

  • Global Moderator
  • *****
  • Posts: 1182
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Fontawesome icon problem Ckeditor
« Reply #3 on: May 15, 2018, 12:02:10 PM »
Hi,

Thnq for picking this up.

Implemented your code into wb_ckconfig.js the CKEditor (V4.6.2). Refreshed the mods. Cleared the browser cache and had to login again into the backend.

No luck.

Even replaced the double quotes with single ones - no luck
Even put an &nbsp; into the open <i>&nbsp;</i> - no luck
...:: Bake the Unbakable ::...

Offline dbs

  • Betatester
  • **
  • Posts: 7225
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Fontawesome icon problem Ckeditor
« Reply #4 on: May 15, 2018, 12:07:29 PM »
Had my line tested before in ckeditor/wb_config/wb_ck_config.js. works for me.
Code:
Only registered users can see contents. Please click here to Register or Login.
Where is your wb_ckconfig.js?
The search order is
1. directly in your template
2. in folder /templates/
3. in modules/ckeditor/wb_config/

Offline Boudi

  • Global Moderator
  • *****
  • Posts: 1182
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Fontawesome icon problem Ckeditor
« Reply #5 on: May 15, 2018, 12:11:48 PM »
In admin > Modules > ckeditor > wbconfig > wb_ckconfig.js

Around line 187 it starts with:

Code:
Only registered users can see contents. Please click here to Register or Login.
Commented out the <i> doesn't work. Your solution neither and my first aproach neither too.

refreshed mods, cleared browser cache and logged in again in the backend. Tried double quotes, single quotes and html space.

Like you said, it seems that looks like it's overruled by something.
...:: Bake the Unbakable ::...

Offline dbs

  • Betatester
  • **
  • Posts: 7225
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Fontawesome icon problem Ckeditor
« Reply #6 on: May 15, 2018, 05:57:59 PM »
In your case you should it change in ckeditor/include.php instead in wb_ckconfig.js.

Offline Boudi

  • Global Moderator
  • *****
  • Posts: 1182
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Fontawesome icon problem Ckeditor
« Reply #7 on: May 15, 2018, 06:08:14 PM »
Is there any specific location? Do I have to open/close this code with tags?

Code:
Only registered users can see contents. Please click here to Register or Login.
...:: Bake the Unbakable ::...

Offline dbs

  • Betatester
  • **
  • Posts: 7225
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: Fontawesome icon problem Ckeditor
« Reply #8 on: May 15, 2018, 06:23:36 PM »
Sorry, forget my last post.
In include.php is not this line.
ckeditor is looking for wb_ckconfig.js in the order i posted above.
I understand in your case you have in your template or the templates folder no wb_ckconfig.js.

Offline Boudi

  • Global Moderator
  • *****
  • Posts: 1182
  • Gender: Male
  • //o_-\\
    • Yze Webdesign
Re: Fontawesome icon problem Ckeditor
« Reply #9 on: May 15, 2018, 08:24:30 PM »
Correct. I only have the config files in the modules > ckeditor.

But John Broeckaert sent me a pm with a simple droplet solution. He wasn't able to respond to this topic so here it is:

Code:
Only registered users can see contents. Please click here to Register or Login.
So it's not the most clean solution but it's better than nothing.

@DBS and @Johnbroeckaert, thank you for your time, help and support.

Kind regards,

Boudi


...:: Bake the Unbakable ::...