agusmakmun / agusmakmun/django-markdown-editor
Multiple markdowns on Django TabularInline admin model page, ace edit find dynamic generated #id item error
- Ngôn ngữ chính
- JavaScript
- Star
- 901
- Fork
- 1.3k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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:

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

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. (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. (martor.min.js:9)
at Function.each (jquery.min.js:2)
at w.fn.init.each (jquery.min.js:2)
at HTMLDocument. (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`:

Is there a way to solve this mismatch?
Thank you,
Mauro
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.