Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> FCKeditor/WYSIWYG Issues
Author Message
wHiTeHaT
Life Cycles Becoming CPU Cycles



Joined: Jul 18, 2004
Posts: 579

PostPosted: Thu Aug 15, 2013 2:41 am Reply with quote

First i thought i did wrong.
But i figured out fck editor removes the <i> tags when edit a previous stored text.
The stored text was written in the fck editor before?

if i insert:
Code:
<i class="fa-icon-fullscreen fa-icon-xxlarge main-color"></i>

<h3 class="features-title"><span class="firstword">Wie is</span> xxxxx</h3>


It is stored ok and the website shows it fine.

If i try to edit the previous stored content it shows:

Code:


<h3 class="features-title"><span class="firstword">Wie is</span> xxxx</h3>


First thoughts where it was allowebleHTML:
RNconfig
Code:
   'i' => array(),



So i tryed to change to:
Code:
   'i' => array('class' => 1),


It seems not to work.

In fck editor js i found:

Code:
// Do not add, rename or remove styles here. Only apply definition changes.

FCKConfig.CoreStyles =
{
   // Basic Inline Styles.
   'Bold'         : { Element : 'strong', Overrides : 'b' },
   'Italic'      : { Element : 'em', Overrides : 'i' },
   'Underline'      : { Element : 'u' },
   'StrikeThrough'   : { Element : 'strike' },
   'Subscript'      : { Element : 'sub' },
   'Superscript'   : { Element : 'sup' },


But i'm not sure if that is the right place to look for.


Last edited by wHiTeHaT on Thu Aug 15, 2013 7:32 am; edited 2 times in total 
View user's profile Send private message Send e-mail
wHiTeHaT







PostPosted: Thu Aug 15, 2013 3:23 am Reply with quote

just tested with CKeditor and the same problem exist.
 
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Thu Aug 15, 2013 3:31 am Reply with quote

Try em instead of i, that works fine! With STRG+i you get in the CKeditor the em-tag. Both editors are creating only semantic code. That is the reason for the overrides!
[ Only registered users can see links on this board! Get registered or login! ]

Quote:
Use the <i> element only when there is not a more appropriate semantic element, such as:

<em> (emphasized text)
<strong> (important text)
<mark> (marked/highlighted text)
<cite> (the title of a work)
<dfn> (a definition term)

_________________
Github: RavenNuke 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Thu Aug 15, 2013 5:43 am Reply with quote

I ran into this as well, and I believe the editor is seeing the <i> tag as being empty, and removing it.

The <i> tag plays more of a role in html5 where it is often being used as a placeholder for icon fonts, such as font awesome, etc..

For the CKeditor, see if this helps. [ Only registered users can see links on this board! Get registered or login! ]
 
View user's profile Send private message Visit poster's website
wHiTeHaT







PostPosted: Thu Aug 15, 2013 7:30 am Reply with quote

@spasticdonkey

Finaly got it thanks to you.

Code:


// ALLOW <i></i>
config.protectedSource.push( /<i[\s\S]*?\>/g ); //allows beginning <i> tag
config.protectedSource.push( /<\/i[\s\S]*?\>/g ); //allows ending </i> tag


Just need to fix now elfinder.
I forgot to test elfinder with the 3.6.XX ckeditor so I'm not sure if why it not works is cause of upgraded ckeditor to 4.x(?)
 
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1122

PostPosted: Sat Aug 17, 2013 7:46 am Reply with quote

Did you paste those lines in config.js ?
includes/ckeditor/config.js
 
View user's profile Send private message
wHiTeHaT







PostPosted: Sat Aug 17, 2013 3:37 pm Reply with quote

yes.... you can add these 2 if you want:

Code:



// ALLOW <h1></h1>
config.protectedSource.push( /<h1[\s\S]*?\>/g ); //allows beginning <h1> tag
config.protectedSource.push( /<\/h1[\s\S]*?\>/g ); //allows ending </h1> tag
// ALLOW <h2></h2>
config.protectedSource.push( /<h2[\s\S]*?\>/g ); //allows beginning <h2> tag
config.protectedSource.push( /<\/h2[\s\S]*?\>/g ); //allows ending </h2> tag
// ALLOW <h3></h3>
config.protectedSource.push( /<h3[\s\S]*?\>/g ); //allows beginning <h3> tag
config.protectedSource.push( /<\/h3[\s\S]*?\>/g ); //allows ending </h3> tag
// ALLOW <h4></h4>
config.protectedSource.push( /<h4[\s\S]*?\>/g ); //allows beginning <h4> tag
config.protectedSource.push( /<\/h4[\s\S]*?\>/g ); //allows ending </h4> tag
// ALLOW <h5></h5>
config.protectedSource.push( /<h5[\s\S]*?\>/g ); //allows beginning <h5> tag
config.protectedSource.push( /<\/h5[\s\S]*?\>/g ); //allows ending </h5> tag
// ALLOW <h6></h6>
config.protectedSource.push( /<h6[\s\S]*?\>/g ); //allows beginning <h6> tag
config.protectedSource.push( /<\/h6[\s\S]*?\>/g ); //allows ending </h6> tag
// ALLOW <hr>
config.protectedSource.push( /<hr[\s\S]*?\>/g ); //allows beginning <hr> tag
// ALLOW <i></i>
config.protectedSource.push( /<i[\s\S]*?\>/g ); //allows beginning <i> tag
config.protectedSource.push( /<\/i[\s\S]*?\>/g ); //allows ending </i> tag
// ALLOW <p></p>
config.protectedSource.push( /<p[\s\S]*?\>/g ); //allows beginning <p> tag
config.protectedSource.push( /<\/p[\s\S]*?\>/g ); //allows ending </p> tag
// ALLOW <span></span>
config.protectedSource.push( /<span[\s\S]*?\>/g ); //allows beginning <span> tag
config.protectedSource.push( /<\/span[\s\S]*?\>/g ); //allows ending </span> tag
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> FCKeditor/WYSIWYG Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©