Plugin Author
scribu
(@scribu)
Before or after the content is actually saved?
The Save button on the Aloha panel or on the other elements?
After the content is saved. I’m talking about the save button for the ‘input’ and ‘textbox’ editors.
Plugin Author
scribu
(@scribu)
You can do this:
jQuery(document).delegate('.fee-form-save', 'click', function() {
// do whatever
});
Ah, just like that. Thought I had to go at the code with an axe and hack my way in 😀
Big THANX for such a quick reply 🙂
Hmm, another related question, what var is the text that is being saved stored in? I tried doing as you wrote above using the original html selectors to apply some regex to the text being saved but with no luck. So I kinda need to know where the text is being stored.
Here’s what i’m trying to do:
$('myNodename').on('click', '.fee-form-save', function(){
$('myNodename').text().replace(/^/, '- ');
})
Plugin Author
scribu
(@scribu)
You can do that in PHP, using the ‘pre_post_content’ filter:
function my_post_content_sanitization( $content ) {
return '- ' . $content;
}
add_filter( 'pre_post_content', 'my_post_content_sanitization' );