Help us to help you!

Our aim is to offer you the best service possible, to do this we need to know: (1.) Joomla! version (2.) Server type (3.) Editor version (4.) Browsers type & Version and any (5.) Error messages you may have, for help in finding this information please - click here…We would also invite you to read our form rules before posting - read more…

Welcome, Guest
Please Login or Register.    Lost Password?

JCK stripping content, not just code upon saving. (didn't happen in JFCK)
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: JCK stripping content, not just code upon saving. (didn't happen in JFCK)
#634
JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 6 Months ago Karma: 0
(1.) Joomla! version = 1.5.18 (going to be updating soon to latest)
(2.) Server type = Apache
(3.) Editor version = 3.3.1
(4.) Browsers (type & Version) = Firefox 3.6.8 (on Linux)
(5.) Error message. = none, just strips content.


I don't know if this because of JCK or Joomla itself but when I was using 2.6.x everytime I saved something when in the source view it would all save perfectly fine and it would all be there the next time I viewed an article or anything else. Now with JCK 3.x almost always something is removed upon saving. (Technically it isn't removed until the next time I load the editor.)

I save something while viewing source (or sometimes not in source) and it saves correctly and shows up on the site how I expected but the next time I open that same article (or whatever) some of the content has been removed.

It isn't even potential malicious code or anything...just simple <div>'s.

I've also noticed a LOT of changes from 2.6.x to 3.x and a lot of features that 2.6.x had have been removed. Maybe I am imagining it but it seems that 3.x is a step backwards in the editor.

I really hate having to take code into gedit (great program on Linux) so I can make test changes and copy and paste the code back into the editor so the editor doesn't remove some of my content. (I know I could switch editors each time to the standard no-editor but either way is time consuming and irritating.

I used to love JFCK and always recommended it to people because of it being so lenient with source code but now it seems to be the opposite.
Visuex
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/08/12 09:58 By Visuex.
The topic has been locked.
 
#635
Re:JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 6 Months ago Karma: 32
When posting a query it is important that you include the following information: (1.) Joomla! version (2.) Server type (3.) Editor version (4.) Browsers type & Version ) and (5.) Error message.

I've also noticed a LOT of changes from 2.6.x to 3.x and a lot of features that 2.6.x had have been removed. Maybe I am imagining it but it seems that 3.x is a step backwards in the editor.

The 3.x is a completely new editor compared to the 2.6x version. And it is now built on a completely plub-able framework that replaces the old archiac framework that did not take into account the changes in JS, JSON and the standards applied with morden JS Framework such as JQuery and Mootools. The editor is buit on a new JS Framework that sits above the native JS language allowing for increase performance, which I assume you have noticed. And ease of development for cross browser compatibility.

The FCK framwork has utimately reached the end of its life cycle and could not really be taken much further into the future with the advancing technology and thus the CKEDITOR Framework was born.

The 3.X is stil relatively new and not as mature as its predecessor so not all of the plugins used in FCK could be used for the CKEDITOR. The new JS Framework is compeletly different to the old one and the jump is the same as going from Joomla 1.0x to 1.5x.

Now just as Joomla, the JCK Editor can be extended with plugins without the need of having to hack the core code as was the case in FCK!

Regards
awills
Administrator
Posts: 484
graphgraph
User Offline Click here to see the profile of this user
Gender: Male webxsolution.com Location: London
Last Edit: 2010/08/12 09:49 By awills.

Always clear your browser cache(CTRL+SHFT+DEL for FF/IE and Chrome users)
The topic has been locked.
 
#636
Re:JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 6 Months ago Karma: 0
Checklist for requesting help has been added to the top of the first post.

awills wrote:
When posting a query it is important that you include the following information: (1.) Joomla! version (2.) Server type (3.) Editor version (4.) Browsers type & Version ) and (5.) Error message.
wow I can't believe I missed that notice at the top of every page on the forum. Sorry about that.

awills wrote:
The 3.x is a completely new editor compared to the 2.6x version. And it is now built on a completely plub-able framework that replaces the old archiac framework that did not take into account the changes in JS, JSON and the standards applied with morden JS Framework such as JQuery and Mootools. The editor is buit on a new JS Framework that sits above the native JS language allowing for increase performance, which I assume you have noticed. And ease of development for cross browser compatibility.

The FCK framwork has utimately reached the end of its life cycle and could not really be taken much further into the future with the advancing technology and thus the CKEDITOR Framework was born.

The 3.X is stil relatively new and not as mature as its predecessor so not all of the plugins used in FCK could be used for the CKEDITOR. The new JS Framework is compeletly different to the old one and the jump is the same as going from Joomla 1.0x to 1.5x.

Now just as Joomla, the JCK Editor can be extended with plugins without the need of having to hack the core code as was the case in FCK!

I see why the need for the changes now. I really love extensions that are further extend-able. It's all about flexibility.
Visuex
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/08/12 10:03 By Visuex.
The topic has been locked.
 
#692
Re:JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 5 Months ago Karma: 0
* the code is getting mangled, if a mod could make the changes as i do not know how to fix it *

The following code prevents stripping for {geshibot}{/geshibot} and {code}{/code} tags.

I am unsure if entities and htmlencodeoutput are required, feedback would be nice.

All you have to do is swap the code in

/plugins/editors/jckeditor/config.js

for the following:

Code:

/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';

// The following work outside this function
   config.htmlEncodeOutput = false;
   config.entities = false;
   config.protectedsource.push( /{code[\s\S]*?}[\s\S]*?{\/code}/g ) ; // Protects all code between code tag
   config.protectedsource.push( /{geshibot[\s\S]*?}[\s\S]*?{\/geshibot}/g ) ; // Protects all code between GESHI tags
};

shoulders
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/08/20 20:57 By shoulders.
The topic has been locked.
 
#693
Re:JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 5 Months ago Karma: 0
thank you for your contribution to this issue but I don't want to protect code inside of tags I want to protect all the code as in completely fix the stripping issue.
Visuex
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#696
Re:JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 5 Months ago Karma: 0
what other stripping do you want to prevent. My code should prevent html gettting escaped and allows you to add any sort of code. for example you could use script tags to be protected instead.
shoulders
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#698
Re:JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 5 Months ago Karma: 0
I would have to encase everything in some kind of tag in order for it not to be stripped...that may be a good temporary solution but the issue itself needs to be address.

It will strip div tags and even whole content that isnt html....just basic text...this is a serious bug and needs to be fixed in the editor itself.
Visuex
Fresh Boarder
Posts: 4
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#699
Re:JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 5 Months ago Karma: 0
thanks for the heads up, i will have to keep an eye out for that.

i might stick with FCKeditor for a while
shoulders
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
The topic has been locked.
 
#713
Re:JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 5 Months ago Karma: 20
Hi Visuex,

Thank you for your post.

Can you give us an before and after example of the code that is being stripped out in version 3.3.1?

Thanks
Paul.F
Administrator
Posts: 1045
graph
User Offline Click here to see the profile of this user
Gender: Male webxsolution.com Location: London Birthday: 12/09
Last Edit: 2010/08/23 10:49 By Paul.F.
If you use JoomlaCK Editor, please post a review at the Joomla! Extensions Directory.
The topic has been locked.
 
#1083
Re:JCK stripping content, not just code upon saving. (didn't happen in JFCK) 1 Year, 3 Months ago Karma: 0
my code to prevent stripping stops the editor from loading. is there any obvious fault in my code. A variation (same regex) works for FCK editor. Any help would be apreciated. Also i am sure this will help a lot of people who use code snippets but want to use a wysiwyg editor.
Code:

/*
Copyright (c) 2003-2010, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
// Define changes to default configuration here. For example:
// config.language = 'fr';
// config.uiColor = '#AADC6E';

// The following work outside this function
   config.htmlEncodeOutput = false;
   config.entities = false;
       config.protectedsource.push( /{code[\s\S]*?}[\s\S]*?{\/code}/g ) ; // Protects all code between code tag
       config.protectedsource.push( /{geshibot[\s\S]*?}[\s\S]*?{\/geshibot}/g ) ; // Protects all code between GESHI tags
};

shoulders
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/11/03 18:45 By shoulders.
The topic has been locked.
 
Go to topPage: 12
Moderators: Paul.F