custom event onStylechange()

Last post 11-15-2005, 10:07 PM by Wiseman. 2 replies.
Sort Posts: Previous Next
  •  11-15-2005, 4:34 AM 12669

    custom event onStylechange()

    I'll try again:
     
    Does the CuteEditor support some sort of custom-events (javascript) like a "onStylechange"?

    Purpose of asking is that I want to make custom buttons for styles that are outside of the editor
    itself, but needs to be updated with the current style in the editor.
     
  •  11-15-2005, 12:27 PM 12678 in reply to 12669

    Re: custom event onStylechange()

    Wiseman,

    >>Does the CuteEditor support some sort of custom-events (javascript) like a "onStylechange"?

    No.

    >>Purpose of asking is that I want to make custom buttons for styles that are outside of the editor
    itself, but needs to be updated with the current style in the editor.

    In the following example, when you click the radio button, the Editor.EditorWysiwygModeCss property is changed dynamically.
     
     
    So I suggest you create server side custom button to achieve what you want. There is an example showing how to create a server side button.
     
     
    Hope it helps.
     
    Let me know if you have any further questions.
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-15-2005, 10:07 PM 12710 in reply to 12678

    Re: custom event onStylechange()

    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).
     
View as RSS news feed in XML