Platon Technologies
neprihlásený Prihlásiť Registrácia
SlovakEnglish
open source software development oslavujeme 10 rokov vývoja otvoreného softvéru! Streda, 11. november 2026
O nás
Magazín
Otvorený softvér
CVS
Služby
Index  »  Projekty  »  phpMyEdit  »  Fórum  »  htmlarea config from pme

phpMyEdit Configuration     htmlarea config from pme
Odoslať novú tému   Odpovedať na tému    
 
froggy     Založený: 23.11.2004   Príspevky: 1  
Príspevok Zaslal: 2004-11-23 10:32
Návrat hore  Odpovedať s citátom     

hallo,

I want to config my htmlarea boxes for several
forms (decrease the number of icons etc.),
so how can I pass htmlarea parameters (i.e.
a config.toolbar array) from inside my calling file ??

thanks in advance,

froggy

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2004-11-26 15:58
Návrat hore  Odpovedať s citátom     

With the way that the linkage is written at the moment, unfortately you can't without hacking the extension file code. Currently PME calls the htmlarea setup routine which doesn't allow you to do that level of customisation.

It's certainly possible to do it, but would need to be recoded in PME


Naposledy upravil ajh dňa 2004-11-26 17:06, celkom upravené 1 krát

 
ajh     Založený: 17.12.2003   Príspevky: 236  
Príspevok Zaslal: 2004-11-26 17:06
Návrat hore  Odpovedať s citátom     

OK - some hints as to how to do this. Firstly download the latest version of the extension from this bug report:
http://opensource.platon.sk/projects/bug_view_advanced_page.php?f_bug_id=224

Go to the bottom of the code, to the form_end() function:
Kód:
         /* Add script calls to the end of the form for all html fields */
         if (isset($this->htmlfields)) {
            echo '<script type="text/javascript"><!--',"\n";
            foreach($this->htmlfields as $ck => $cv) {
               echo 'HTMLArea.replace("pme_id_',$cv,'");',"\n";
            };
            echo '// -->',"\n";
            echo '</script>',"\n";
         };

The line that needs modifying is the HTMLArea.replace one, you need to add a config object to it:
Kód:
echo 'HTMLArea.replace("pme_id_',$cv,'", config);',"\n";

where "config" is the HTMLArea configuration object that has your customised configuration. You need to create this configuration object in javascript somewhere, I would recommend including a javascript file in the PME calling file just after the htmlarea.js call that does this.

Note that this will set all of the htmlarea fields to the same config. You could set the config object as a parameter to the textarea field if you want to use separate configs for each of the fields, but that will involve considerably more coding.

Hope this helps.

 
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