Modify post preview data

Discussion forum for Extension Writers regarding Extension Development.
Post Reply
Registered User
Posts: 175
Joined: Wed Jan 04, 2012 6:33 pm

Modify post preview data

Post by Badhon_raj »

Hi, I am trying to modify post data during submit using the core event core.posting_modify_message_text
problem is, if I click preview, then the modified data is showed in the preview, which I want, but the original content in the editing field is also changed.
How do i prevent this?
I mean when I click preview I want it to show modified data, but the editor box should have original unmodified content in it.
Upon submit, the modified data should be saved in database, which works as well.
The code I'm using:

Code: Select all

$message= $event['message_parser']->message;

//Do something with $message;

$event['message_parser']->message = $message;
Please advise if there is any better way to do this or if i should use another event.

I'm not sure if it was asked before. I tried searching, but couldn't find what I am looking for,
Post Reply

Return to “Extension Writers Discussion”