[CLOSED] Multiple Editors - Multiple Instances?

  1. #1

    [CLOSED] Multiple Editors - Multiple Instances?

    Hi,

    I'm designing a CMS tool which will allow the user to enter rich content for three data points across 7 languages.

    I've built a tabgroup for the languages, and then inside each group is a tabpanel with the three editors - title, description, fullcontent.

    As a result, right now I have 21 editors defined on my page. I'm wondering if there isn't a better way to have just one instance of the editor and somehow swap it and the appropriate content around into the focused tab. Any thoughts?
    Last edited by Daniil; Jun 13, 2011 at 4:00 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Unfortunately, the information is not enough
    What kind of editors? Why do you need separate editors for each lanuage? Why don't you load conent as required to one instance editor (using setValue method of the editor)?
    Please provide more details about your requirement
    Vladimir Shcheglov
    Sr. Developer
  3. #3
    I'm using multiple editors because I don't know how to do what you suggest.

    Basically I have 21 pieces of content associated with an object. I want to be able to edit all of those pieces of content via tabbed browsing on a single edit panel. Right now my markup looks like this:

    tab1
    editor1
    tab2
    editor2
    tab3
    editor3

    Ideally I'd like the focus event of the tab to "move" one instance of the editor into the correct tab container, populate it with the correct content, and notify the server when the tab loses focus to save the edited content. Do the tabs have OnFocus / OnBlur events? How would I tell ext to take the editor element out of the dom and insert it in my focused tab? Then it would be more like this:

    tab1
    tab2
    tab3

    editor1 <--- javascript pops this into each tab on focus
  4. #4
    Thought about this for a while. Perhaps what I really need is to put a click handler on each tab...

    Can I just move the editor instance from one panel to another in code behind? Like panel.items['myEditor'].Remove() or something?
  5. #5
    Quote Originally Posted by jwf View Post
    Do the tabs have OnFocus / OnBlur events?
    Each tab has Activete and Deactivate events.

    Also TabPanel has TabChange event.

    Quote Originally Posted by jwf View Post
    Perhaps what I really need is to put a click handler on each tab...
    I thint the Activate event is the best thing for this.

    Quote Originally Posted by jwf View Post
    Can I just move the editor instance from one panel to another in code behind? Like panel.items['myEditor'].Remove() or something?
    Well, it possible - remove and add. And, I'd suggest to do that on client side.
  6. #6
    Ok thanks I'll give it a try.

Similar Threads

  1. [CLOSED] ids and multiple instances of the same UI
    By PLoch in forum 1.x Premium Help
    Replies: 2
    Last Post: Jul 28, 2011, 9:44 PM
  2. multiple instances of the same panel
    By costab in forum 1.x Help
    Replies: 3
    Last Post: May 30, 2011, 4:46 PM
  3. Replies: 2
    Last Post: Jun 19, 2009, 2:49 PM
  4. Multiple Editors for
    By r_honey in forum 1.x Help
    Replies: 2
    Last Post: Jun 18, 2009, 2:27 AM
  5. [CLOSED] multiple groupField
    By alexp in forum 1.x Premium Help
    Replies: 1
    Last Post: Jun 16, 2009, 8:11 AM

Posting Permissions