Hi, I think you misunderstood me - I will try to explain more detailed:
Lets use the last example (RegisterCustomButton.aspx)
To prepare:
If I click the button "Hello" it inserts text "Hello clicked".
I then doubleclick the work "Clicked" and press the "B" button to make it bold.
Now, if I place the cursor on the word "Hello" the B-button is toggled to 'unselected' to reflect the style of the word "Hello".
If I then place the cursor on the word "Clicked" the B-button is toggled again to 'selected' to reflect the style of the word "Clicked".
This change/event is the one I am interrested in. Can the custom button "Hello" be toggled in the same manner so that when I place the cursor on the different words with different styles, the "Hello" button gets toggled (or something) like the B-button?
I mean, the B-button is connected to some sort of "event" as it gets updated - is this event available to be read somewhere else in a javascript so I can toggle my own button like the B-button? If not, is this something you can provide in a later version of CuteEditor?
In other words - the problem is not setting a style or inject text in the textarea for that matter from my own button.
The problem is that when a user is currently on a word which f.ex is bold or italic, I want my button to show this. When the user moves the cursor to another word or sentence that is not bold or is underlined or whatever, I want my button(s) to automatically change to reflect the current style (automatically - read: be able to use a javascript to receive some sort of event to be able to update it self).