Multiple instances of editor on one page, problems with form loading consistently

Multiple instances of editor on one page, problems with form loading consistently

LimpEmuLimpEmu Posts: 68Questions: 18Answers: 1

I have two instances of an editor on one page. I understand that this is possible and supported. I also understand that only one editor object can have a form open and have it edited at a time.

The problem I am running into is as follows.
1. Edit a record of first table using custom template associated with editor 1.
2. Custom form loads fine, I can edit all fields and update the record.
3. Edit a record in second table using custom template associated with editor 2.
4. Custom form loads fine, I can edit all fields and update the record.
5. Edit a record of first table using custom template associated with editor 1 -> form does not show up, just he header and footer show, the actual form is not there. Note that editor 2 continues to work fine.

The same happens if I flip 1 and 2 in the sequence above.

Note that when I switch tables/editors, I destroy the other instance of the table/editor on the page (this is needed since both editors update the same data set on the back end, I want to make sure that when either editor updates the data source, the most updated data is re-fetched by the other editor instance).

I can tell that the data is coming in correctly. Is there something obvious that I am missing?

I am grateful for any idea or advice you can offer. Thank you!

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    Hi @LimpEmu ,

    Yep, as you say, that is supported. Alarms ring a little when you say you have custom templates. Would you be able to reproduce this in a fiddle or give access to that system so we could take a look.

    Thanks,

    Colin

  • LimpEmuLimpEmu Posts: 68Questions: 18Answers: 1

    We removed the custom templates from the editor definition (i.e., template: "#templatename"), and it works, i.e., the forms will load now, just not have the formatting that we need; so it looks to me that our custom templates are messing things up.

    I will try to put a fiddle together next week but for now - on an aggressive timeline - we decided to just use two different pages, rather than putting both tables on one page.

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    You could probably move the formatting into generic CSS for all tables, unless you want specific look&feel for both. Glad you're moving again.

    C

This discussion has been closed.