Giter VIP home page Giter VIP logo

Comments (3)

romanvm avatar romanvm commented on August 16, 2024

Your description is not informative at all. Please provide more detailed information, such as:

  • Your exact configuration, including versions of used packages.
  • Steps to reproduce the problem.

from django-tinymce4-lite.

AlJohri avatar AlJohri commented on August 16, 2024

Yeah, sorry for the lack of detail - I was in a rush earlier. Following up now:

Django==1.11.4
django-tinymce4-lite==1.4.2

I think the problem should be relatively simple to reproduce, I'll describe it for now and try to come up with an example later, time permitting.

  1. Create an admin page where the inline model has a TinyMce widget.
  2. Click "Add Another" in the inline and notice how the second inline will not allow getting focus.

screen shot 2017-09-06 at 11 49 03 pm

I can't click inside the second TinyMCE box.

Debugging further, I can see that this has to do with the selector.

screen shot 2017-09-06 at 11 50 12 pm

You can see in the screenshot above the selector is textarea#id_template_overrides-__prefix__-content. The __prefix__ needs to be replaced with the number representing which inline it is, i.e. 0, 1, 2 etc. You can see the name attribute of the texarea from the django admin code does this correctly: template_overrides-1-content.

You can see how the original django-tinymce took various measures to rectify this:

  1. Original method django-tinymce used for handling inlines properly: https://github.com/aljosa/django-tinymce/pull/43/files

  2. Method number 2 which they use now: https://github.com/aljosa/django-tinymce/pull/99/files along with an issue with this approach: jazzband/django-tinymce#210

I don't know if it really needs to be that complicated. Modern django offers inline form events: https://docs.djangoproject.com/en/1.11/ref/contrib/admin/javascript/

I'm still debugging further and don't have a great solution in mind yet.

from django-tinymce4-lite.

romanvm avatar romanvm commented on August 16, 2024

Thank you for the information. I will investigate this.

from django-tinymce4-lite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.