Is there anybody who can give me the right solution?
value of style attribute is removed
I am encountering a problem with style attributes. If I create and edit text in the FCKeditor and apply some styles to it by selecting the text and choosing a font from the Font pulldown menu, the HTML that is generated is something like the following:
<p><span style="font-family: Tahoma;"><strong>More test text</strong></span></p>
I save the text to the database, and then open the editor again, passing in the string above as the text to start with. However, when the editor displays the text, the style attribute values have been removed. This is what is displayed in the editor when I look at the source:
<p><span style=""><strong>More test text</strong></span></p>
This is happening with every style that is applied via the span tag.
Here's another example:
Created by FCKeditor when I select text and apply a Font and a Size to the font:
<p><span style="font-size: large;"><span style="font-family: Comic Sans MS;">Test Text Style</span></span></p>
Source of text in FCKeditor when I pass the above string back into FCKeditor:
<p><span style=""><span sans="" comic="" style="">Test Text Style</span></span></p>

Re: Style attributes are stripped from text or mashed up
Am I the only one in the world who has this problem?
How is it possible that I am the only one who does get CKeditor to work.
I like it because of the extended possibilities for text formatting, but most of the format functions don't work.
I hav a simple implementation in a php-file like
<form method="get" action="sb_update.php"> <p> <?php echo "<input type=\"hidden\" name=\"f\" value=\"$fcode\">"; echo "<textarea name=\"cont\">".$fcont."</textarea>"; ?> <script type="text/javascript"> CKEDITOR.replace( 'cont' ); CKEDITOR.config.skin = 'kama'; CKEDITOR.config.forcePasteAsPlainText = true; CKEDITOR.config.height = 400; CKEDITOR.config.width = 635; CKEDITOR.config.toolbarCanCollapse = false; CKEDITOR.on( 'instanceReady', function( ev ) { // Out self closing tags the HTML4 way, like <br>. ev.editor.dataProcessor.writer.selfClosingEnd = '>'; }); </script> </p> <p> <input type="submit" name="kies"/> </p> </form>and rewrite the text in sb_update.php with
<?php $fcode=$_GET['f']; $fcont=$_GET['cont']; if ($fcode<>'00000000') { file_put_contents($_SERVER['DOCUMENT_ROOT']."/activiteiten/agenda/_A".$fcode.".txt", $fcont); } header("location:/_admin/sb_editor.php?f=$fcode"); exit; ?>Even when I start with a new install the formatting is removed or even corrupted. So it makes the editor a crappy and unusable editor, only good for formatting with <hx> <b> and <i>.
I already made a style in the form of <h6> in order to get this specific format in the text.
So please please.... Can anybody help with this issue.
Re: Style attributes are stripped from text or mashed up
I installed the program in a web on another server and guess what: it worked!
So what I have to do now is to find out what the differences between the 2 servers (different hosting providers) are.
So any hint is welcome!
Re: Style attributes are stripped from text or mashed up