Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Pondelok, 30. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  HTML Code In Textarea Error

phpMyEdit Configuration     HTML Code In Textarea Error
Odoslať novú tému   Odpovedať na tému    
 
DeanS     Založený: 28.03.2006   Príspevky: 10  
Príspevok Zaslal: 2006-10-05 09:27
Návrat hore  Odpovedať s citátom     

Hi
I have been able to get TinyMCE to work using the mce_cal extension to allow text formatting of a textarea, but when I return to the the main page after a save/apply, the textarea is shown with the html tags (e.g. <strong>39.11</strong> not 39.11 ). Am I missing something.

Using phpMyEdit 5.6 / TinyMCE 2.6.1
html=>true has been set
require_once 'extensions/phpMyEdit-mce-cal.class.php';
new phpMyEdit_mce_cal($opts);

Also whilst trying to make it XHTML 1.0 Transitional compatible I am getting the following 2 errors saying there is no attribute "Wrap", "Mce_Editable". Is there away around this?

...a_createdby" rows="5" cols="50" wrap="virtual"></textarea></td>
...ols="81" wrap="virtual" mce_editable="true" ></textarea></td>

Regards
Dean

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2006-10-06 15:16
Návrat hore  Odpovedať s citátom     

Hmm....I'll try and have a look at this over the weekend. It should just work. Please could you supply your schema and your config.

 
DeanS     Založený: 28.03.2006   Príspevky: 10  
Príspevok Zaslal: 2006-10-07 16:28
Návrat hore  Odpovedať s citátom     

Hi

Here is the link to download the files
http://www.mad129.plus.com/schemafiles.rar

Thanks
Dean

 
DeanS     Založený: 28.03.2006   Príspevky: 10  
Príspevok Zaslal: 2006-10-10 16:34
Návrat hore  Odpovedať s citátom     

Hi ajh

I was having a delve around in the phpMyEdit.class.php file and in the function "cellDisplay" I found it was using htmlspecialchars() in an if statement before the function value is returned. I changed the if statement from
if ($escape) {
$value = htmlspecialchars($value);
}

TO
if ( ! $escape) {
$value = htmlspecialchars($value);
}

This appears to have resolved the issue. I am not 100% what has happened as I am unable to work out what the escape variable is and where it comes from or if this will have any other effects.

Would you please advise if this is OK and whether it has any knock on effects.

Regards
Dean
(chuffed amateur php'er if no knock on effects)

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2006-10-10 17:45
Návrat hore  Odpovedať s citátom     

Ah...okay, just re-read the problem. It's actually working as designed. By default PME will quote any html text so you actually see the HTML code rather than seeing the effect of the HTML code. TinyMCE will allow you to edit the HTML code WYSIWYG, but when you apply by default you see the actual code.

You can change this behaviour by setting the [escape] option to 'false'. This will have the effect that you desire.

See: http://opensource.platon.sk/projects/doc.php/phpMyEdit/html/configuration.fields.booleans.html .

You need to remove the change that you made because it will have unwanted effects elsewhere, but you were on the right track. The [escape] option actually sets or unsets the $escape variable.

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2006-10-10 17:47
Návrat hore  Odpovedať s citátom     

Re the XHTML question, I'm not sure that there is a way around it as neither attribute is defined in the DTD. I'm afraid that is the way that TinyMCE works.

 
DeanS     Založený: 28.03.2006   Príspevky: 10  
Príspevok Zaslal: 2006-10-10 18:08
Návrat hore  Odpovedať s citátom     

Hi ajh
Thank you for explaining that.. Maybe I should have read the documentation ;)

The XTHML thing, again thanks for looking at that for me. I will live with it.

Thanks
Dean

 
Odoslať novú tému   Odpovedať na tému    

Copyright © 2002-2006 Platon Group
Stránka používa redakčný systém Metafox
Na začiatok · Odkazový formulár · Prihláška
Upozorniť na chybu na PLATON.SK webstránke · Podmienky použitia · Ochrana osobných údajov