jazzband / django-tinymce

TinyMCE integration for Django
http://django-tinymce.readthedocs.org/
MIT License
1.25k stars 317 forks source link

fix selector for elements using '__prefix__' #435

Closed pk-lms-dev closed 1 year ago

pk-lms-dev commented 1 year ago

Widgets created from inlines may contain the default prefix 'prefix' in the selector attribute. This change uses the element id instead to initialize TinyMCE.

codecov[bot] commented 1 year ago

Codecov Report

Merging #435 (0469f4c) into master (d1e59b0) will increase coverage by 0.48%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #435      +/-   ##
==========================================
+ Coverage   89.65%   90.14%   +0.48%     
==========================================
  Files           6        6              
  Lines         290      284       -6     
  Branches       50       50              
==========================================
- Hits          260      256       -4     
+ Misses         14       12       -2     
  Partials       16       16              
Impacted Files Coverage Δ
tinymce/settings.py 100.00% <100.00%> (+13.33%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

pk-lms-dev commented 1 year ago

This approach might also be used to fix an issue with unset 'selector' configuration: https://github.com/jazzband/django-tinymce/issues/421

claudep commented 1 year ago

Thanks! I guess that at some point we should add Selenium tests to avoid regressions in that part of the code, but that's probably for later.

pk-lms-dev commented 1 year ago

Hi Claude,

thanks for merging my PR! If you open an issue specifying the Selenium tests I will have a look and try to send a PR for it. Can't promise a date though.

Greetings Peter

On Thursday 27 April 2023 08:11:05 (+02:00), Claude Paroz wrote:

Thanks! I guess that at some point we should add Selenium tests to avoid regressions in that part of the code, but that's probably for later.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

-- Peter Klein

Let's make sense GmbH Webprojekte mit Sinn und Verstand

Tel.: 07071-1389980 E-Mail: @.*** Web: https://www.letsmakesense.de

Let's make sense GmbH Magazinplatz 2, D-72072 Tübingen Handelsregister: Amtsgericht Stuttgart, HRB 740355 Geschäftsführer: Peter Klein