Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple markdowns on Django TabularInline admin model page, ace edit find dynamic generated #id item error #132

Open
mauroesposito opened this issue Aug 7, 2020 · 1 comment

Comments

@mauroesposito
Copy link

Hi,

I've a model with a TabularInline configuration: It's a simple article with possibility to add some translations.
This is the situation where I show only languages edited by user:

image

In this case, user added two translations. If I click on "Add another article translation", this is the result:

image

Text area is blocked, and it's showed this javascript exception:

ace.js:5 Uncaught Error: ace.edit can't find div #martor-articles-articles2-content
    at Object.t.edit (ace.js:5)
    at HTMLDivElement.<anonymous> (martor.min.js:9)
    at Function.each (jquery.js:367)
    at jQuery.fn.init.each (jquery.js:202)
    at jQuery.fn.init.e.fn.martor (martor.min.js:9)
    at HTMLDivElement.<anonymous> (martor.min.js:9)
    at Function.each (jquery.min.js:2)
    at w.fn.init.each (jquery.min.js:2)
    at HTMLDocument.<anonymous> (martor.min.js:9)
    at HTMLDocument.dispatch (jquery.min.js:2)

Searching in the sources, I've found that the correct ID created dynamically was #martor-articles-2-content NOT #martor-articles-articles2-content:

image

Is there a way to solve this mismatch?

Thank you,
Mauro

@mauroesposito mauroesposito changed the title Multiple markdown on Django TabularInline admin model page, ace edit find dynamic generated #id item error Multiple markdowns on Django TabularInline admin model page, ace edit find dynamic generated #id item error Aug 7, 2020
@agusmakmun
Copy link
Owner

Hello @mauroesposito, did you try to upgrade your martor version?

pip install martor --upgrade

Let me know if this issue still persists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants