Some programming questions about Cute Editor

Last post 03-07-2008, 4:45 PM by Escovado. 6 replies.
Sort Posts: Previous Next
  •  03-04-2008, 9:43 PM 37575

    Some programming questions about Cute Editor

    Hello.  This is my first time on this forum.  I have been working with Cute Editor for a few days now to see how it can be used in my project.  I must say that I'm very impressed with it!  I do have a few programming questions about it though:
     
    1. Is is possible to instantiate the editor on the server side using C# or am I only able to use the XML tags on the .aspx pages?  If this is possible, then how may I accomplish this?
     
    2. Is it possible to have Cute Editor's toolbar and the editing field in different parts of the page?  The editor control from the ComponentArt people does that.  Click here to see their demo.   BTW, I am not going to use the control from ComponentArt because it is very buggy.  From viewing this forum, Cute Editor has its own issues, but at least I can deal with them so far.  :)
     
    3. If I can't seperate the toolbar from the editing field, it looks like I can use the JavaScript API to do all the button functions to implement my own toolbar.  Is this assumption correct?  If so, then how can I tell what the style settings are at the cursor selection so I can set the button states (e.g. bold, italic, etc.) in my toolbar?
     
    Thanks for your time.
  •  03-05-2008, 9:04 AM 37579 in reply to 37575

    Re: Some programming questions about Cute Editor

    >>1. Is is possible to instantiate the editor on the server side using C# or
     
    Yes.
     
    Demo:
     
     
    Do something like this:
     
    CuteEditor.Editor editor1  = new new CuteEditor.Editor();
     
     
    >>2. Is it possible to have Cute Editor's toolbar and the editing field in different parts of the page? 
     
    This feature will be supported in the version 7.0.
     
    Right now please check this solution:
     
     
    >>3. If I can't seperate the toolbar from the editing field, it looks like I can use the JavaScript API to do all the button functions to implement my own toolbar.  Is this assumption correct?
     
    Yes. Please check this example:
     
     
    >>If so, then how can I tell what the style settings are at the cursor selection so I can set the button states (e.g. bold, italic, etc.) in my toolbar
     
     
    Are you trying to achieve something like this?
     
     
     
     
     
     
     
     
     

    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

  •  03-05-2008, 4:03 PM 37601 in reply to 37579

    Re: Some programming questions about Cute Editor

    Adam,
     
    Thank you for your quick response.
     
    For #1, I looked around the CuteEditor namespace and did not find that C# class constructor.  That will be very helpful.  I wish your company would provide more through documentation for the server side code.
     
    Your solution for #2 was already considered.  My application is doing some page layout, so I wanted to edit in place.  That will be a last resort.
     
    Regarding #3, I saw the JavaScript API demo which led me to believe the API would would work.  The Three-state Buttons demo tells me nothing, it just looks like the standard control.  I was considering implementing my own toolbar code and was wondering if from JavaScript how I can query the text style values at the cursor position/selection.
     
    Is the full source code for all these demos and test programs available?  Those would probably help to answer a lot of my questions.
     
    Again, thanks, Adam.
  •  03-06-2008, 1:09 AM 37611 in reply to 37601

    Re: Some programming questions about Cute Editor

    >>Is the full source code for all these demos and test programs available? 
     
    Yes.
     
     
     
    >>how I can query the text style values at the cursor position/selection.
     
    The selection could contain multiple controls. So you cannot get the style attricute from a selection.
     
    Can you tell me what you are trying to achieve? So I may have other ideas.
     
    >>That will be very helpful.  I wish your company would provide more through documentation for the server side code.
     
    Dynamically creating editor in the server side is same as creating other controls. Please check the source code of the above example.
     
    Hope it helps.
     
    Keep me posted
     
     
     
     
     

    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

  •  03-06-2008, 4:22 PM 37658 in reply to 37611

    Re: Some programming questions about Cute Editor

    Adam, thanks again for your prompt response.  Now, about the source code for the demos, what I meant was this...
     
    You have a page on your web site with all of the demos and test programs for CuteEditor here: http://richtextbox.com/test/. I want to know if there is a page or an FTP directory where I can peruse the source code for all of these demos under the categories listed: Properties, Events, Methods, JavaScript API, Ajax and Three-state buttons.  That way, I can figure out on my own a lot of how the CuteEditor control API works (both client and server) and reserve this forum for resolving any genuine problems I might encounter.  Is the source code to all of these demos and tests (not just the two I mentioned earlier) available for download somewhere?
     
    >> Can you tell me what you are trying to achieve? So I may have other ideas.
     
    The objective of my web application is to make the user interaction look and feel as much like a regular desktop application as possible.  My web application has page layout functions where the user can drag-and-drop various types of objects to position and edit them.  One of the object types we have contains editable text.  On a desktop application, all of the text formatting controls usually reside at the top of the window in toolbars and menus.  To edit one of the text objects in place, the user just double-clicks on it to activate the text editor.  Ideally, I don't want a modal dialog type of a thing to pop up, but I want to have the text become editable in the page object itself, with the toolbars at the top of the page for the formatting controls.
     
    I have been able to get the CuteEditor (minus the toolbars) to position and size right over my text objects so it looks like the static text magically became editable just by double-clicking on it.  It looks good.   What I want to do now is to provide the controls for all the formatting and editing from the toolbars at the top of the page--as opposed to having them attached to the object being edited.  This has two advantages: 1) having the toolbars out of the way makes the editing more WYSIWYG since they don't obscure other parts of the page and 2) users get used to having the controls in the same spot which makes their interaction with the applicaion more fluid.
     
    I was initially attracted to the ComponetArt editor control because the demo they had, which I mentioned earlier in this thread, did exactly what I wanted.  Unfortunately, their basic editing functions are very buggy so I was not able to use their control.  The CuteEditor control is a much more mature product that does not have the issues I ran into with the control from ComponentArt.  However, I would ideally like to have the toolbars for the editor detached from the editing window itself to achieve the user experiece I described in the previous paragraphs.
     
    You told me that version 7.0 of CuteEditor is supposed to have this feature.  That's fine, but I would like to get something like this working now, if possible.  I saw that all of the command functions in CuteEditor's toolbars are available from its JavaScript API.  This makes it possible for me to implement my own detached toolbar controls and then use JavaScript to communicate with the CuteEditor.  So far, so good, but there is one crucial piece missing: when the user changes the location of the cursor in the editor I would like the controls to reflect what the CSS attributes are (e.g font-family, font-style, font-weight, color, etc.) at the cursor.
     
    I can see that the current version of CuteEditor has the capability of showing the formatting attributes of the text at the cursor location in its own toolbars.  Now, I want to know if there is any way available for a programmer like me to read these attributes also?
     
    >> Dynamically creating editor in the server side is same as creating other controls.
     
    Yes, I understand this.  However, it would be very helpful for your customers to have the server-side functions unique to your control documented.  It saves everybody time and frustration in the long run.
  •  03-07-2008, 1:34 PM 37690 in reply to 37658

    Re: Some programming questions about Cute Editor

    Escovado,
     
    Please download all code examples from:
    http://richtextbox.com/test/CuteEditorTest.zip

    I understand your request. But after discussing with our developers, we cannot have this feature in the coming version 6.1. Please wait from the version 7.0 which will be released in September.
     
    For the time being, please use the editor javaScript API and create external buttons.
     
    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

  •  03-07-2008, 4:45 PM 37697 in reply to 37690

    Re: Some programming questions about Cute Editor

    Adam:
    I understand your request. But after discussing with our developers, we cannot have this feature in the coming version 6.1. Please wait from the version 7.0 which will be released in September.
     
    OK.  I can live with my own external buttons not reading the text styles for now.  Thanks for everything.
     
    Adam:
    Please download all code examples from:
     
    Aw geeze, that link was sitting at the top of the very page I originally pointed to.  I must be going blind.  lol.
View as RSS news feed in XML