[pmwiki-users] replace the content of edit textarea with html markup

Carlos AB cabsec.pmwiki at gmail.com
Thu Mar 18 10:00:13 CDT 2010


Found the answer to my question.

Here is what I did :

SDVA($InputTags['e_textarea'], array(
  ':html' => "<textarea \$InputFormArgs
    onkeydown='if (event.keyCode==27) event.returnValue=false;'
    >\$EditTextHtml</textarea>",
  'name' => 'text', 'id' => 'text', 'accesskey' => XL('ak_textedit'),
  'rows' => XL('e_rows'), 'cols' => XL('e_cols')
));

Above I changed the var $EditText for $EditTextHtml , and after that I
just opened the file to be edited and created a new

 $FmtV['$EditTextHtml'] =
    str_replace('$','&#036;',htmlspecialchars(@$new['text'],ENT_NOQUOTES));
  $FmtV['$EditTextHtml'] =
    MarkupToHTML($pagename, $FmtV['$EditTextHtml']);

and voilà! :)

On Wed, Mar 17, 2010 at 4:04 PM, Carlos AB <cabsec.pmwiki at gmail.com> wrote:

> How can I do it?
>
> I saw the variable  $FmtV['$EditText']  and $EditText in $PageEditFmt
> but I don't really know how to do it.
>
> What I want is to put converted pmwiki markup to html , inside the
> textarea on action=edit for a tinymce NEW recipe. (I know there are
> others)
>
> I was using ROE and ROS patterns, but if I can deliver html markup to
> the textarea and have tinymce doing manipulations from there, I'll
> just have to worry with ROS patterns.
>
> (To say the truth ROE and ROS togheter got the best of me)
>
> I hope somebody could help me,
>
> CarlosAB
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20100318/6047dc7e/attachment.html 


More information about the pmwiki-users mailing list