title: page extension with tinyMCE django-cms
body: <p>Hi everyone I create a page Extension using the <a href="http://docs.django-cms.org/en/release-3.4.x/how_to/extending_page_title.html" rel="nofollow noreferrer">documentation of Django CMS</a> and work perfectly, </p>
  
  <p>Now I have a two text_area in my extension page, I want to include TinyMCE library to my text_area</p>
  
  <p>for this I have this in my models.py</p>
  
  <pre><code>from django.db import models
  from cms.extensions import PageExtension
  from cms.extensions.extension_pool import extension_pool
  
  
  class IconExtension(PageExtension):
  
    image = models.ImageField(upload_to='icons', blank=True)
    description_short = models.TextField(blank=True, null=True, verbose_name="Short Description")
    description_large = models.TextField(blank=True, null=True, verbose_name="Large Description")
  
  extension_pool.register(IconExtension)
  </code></pre>
  
  <p>and my admin.py have this</p>
  
  <pre><code># from django.forms import *
  from django.forms import ModelForm 
  from django import forms
  from django.db.models import *
  from django.contrib import admin
  from cms.extensions import PageExtensionAdmin
  from tinymce.widgets import TinyMCE
  
  
  from .models import IconExtension
  
  class IconExtensionForm(forms.ModelForm):
    some_field = forms.CharField(widget=TinyMCE(attrs={'cols': 80, 'rows': 10}))
  
    class Meta:
      model = IconExtension
      fields = '__all__'
  
  
  class IconExtensionAdmin(PageExtensionAdmin):
    form = IconExtensionForm
  
  admin.site.register(IconExtension, IconExtensionAdmin)
  </code></pre>
  
  <p>right now I obtain this error</p>
  
  <pre><code>jquery.tinymce.min.js:1 Uncaught TypeError: Cannot read property 'fn' of undefined(anonymous function) @ jquery.tinymce.min.js:1(anonymous function) @ jquery.tinymce.min.js:1
  init_tinymce.js:16 Uncaught ReferenceError: tinyMCE is not defined
  </code></pre>
  
  <p>my setting.py file have this configuration</p>
  
  <pre><code>TINYMCE_JS_URL = os.path.join(STATIC_URL, "tinymce/jquery.tinymce.min.js")
  TINYMCE_JS_ROOT = '/static/js/tinymce/'
  TINYMCE_DEFAULT_CONFIG = {
      'plugins': "table,spellchecker,paste,searchreplace",
      'theme': "advanced",
  }
  TINYMCE_SPELLCHECKER = True 
  </code></pre>
  
  <p>I look for the solution in internet and everybody say that I load the jquery library before... in my case my field with TinyMCE is inside of popup, the page have load the popup have the jquery Library in second time.. bootstrap is the first.</p>
  
  <p>When I inspect the element inside the popup, my load library are this</p>
  
  <pre><code>&lt;head&gt;
  &lt;title&gt;
  Change icon extension | Django site admin&lt;/title&gt;
  &lt;link rel="stylesheet" type="text/css" href="/static/admin/css/base.css"&gt;
  &lt;link rel="stylesheet" type="text/css" href="/static/admin/css/forms.css"&gt;
  &lt;!--[if lte IE 7]&gt;&lt;link rel="stylesheet" type="text/css" href="/static/admin/css/ie.css" /&gt;&lt;![endif]--&gt;
  
  &lt;script type="text/javascript"&gt;window.__admin_media_prefix__ = "/static/admin/";&lt;/script&gt;
  &lt;script type="text/javascript"&gt;window.__admin_utc_offset__ = "\u002D18000";&lt;/script&gt;
  
  &lt;meta name="viewport" content="width=device-width,initial-scale=1"&gt;
  &lt;link rel="stylesheet" type="text/css" href="/static/djangocms_admin_style/css/djangocms-admin.css"&gt;
  
      &lt;script src="/static/djangocms_admin_style/js/dist/bundle.adminstyle.min.js"&gt;&lt;/script&gt;
  
  
      &lt;script type="text/javascript" src="/en/admin/jsi18n/"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/static/admin/js/core.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/static/admin/js/jquery.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/static/admin/js/jquery.init.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/static/admin/js/admin/RelatedObjectLookups.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/static/admin/js/actions.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/static/tinymce/jquery.tinymce.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/static/django_tinymce/jquery-1.9.1.min.js"&gt;&lt;/script&gt;
      &lt;script type="text/javascript" src="/static/django_tinymce/init_tinymce.js"&gt;&lt;/script&gt;
  
      &lt;meta name="robots" content="NONE,NOARCHIVE"&gt;
      &lt;/head&gt;
  </code></pre>
  
  <p>any idea how to include tinyMCE in page extension, I am in the right way?</p>