Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2010-09-24 03:35:13

danielrm
New member
Registered: 2010-09-24
Posts: 2

Making Xinha events visible to the page as a whole

I want to have a button on my page become enabled when a change has been made in a Xinha editing area (ideally) or when the user clicks in the Xinha editing area (second best).

How can I add an onChange or onClick event handler to the Xinha area that will be visible to objects on the page outside the Xinha area, without breaking Xinha's internal event handling?

Thanks for your help.

Offline

#2 2010-09-25 19:07:11

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: Making Xinha events visible to the page as a whole

You won't be able to listen to those things directly, there is no onchange for a start when we are dealing with an iframe (this is how Xinha works).

Look at the plugins CharCounter and SaveOnBlur, and also the code in XinhaCore (somewhere) which connects up the activateEditor handler, I think if you read those things you can probably work out a way to either modify Xinha or better write a plugin which can trigger some callback function to do what you need it to do.


James Sleeman

Offline

#3 2010-09-26 07:29:12

danielrm
New member
Registered: 2010-09-24
Posts: 2

Re: Making Xinha events visible to the page as a whole

Thanks. Those sound like useful pointers. I'll do some more research and see how I get on.

Offline

Board footer

Powered by FluxBB