2016-10-29 6 views
0

のロードに失敗しました。ジャンゴ - CKEditorバージョンは、私はこのポストは私のvirtualenvの設定ファイル、CKEDITOR_CONFIGS、PrintScreenを、ソースページからの要素が含まれていジャンゴ - CKEditorバージョン</p> <p>内mathjaxロードに失敗しましたmathjax

virtualenvの

>pip freeze 
Django==1.10.2 
django-appconf==1.0.2 
django-ckeditor==5.1.1 
django-compressor==2.1 
django-debug-toolbar==1.6 
Pillow==3.4.2 
psycopg2==2.6.2 
rcssmin==1.0.6 
rjsmin==1.0.12 
sqlparse==0.2.1 

CKEDITOR_CONFIGS

CKEDITOR_CONFIGS = { 
    'default': { 
     'skin': 'moono', 
     # 'skin': 'office2013', 
     'toolbar_Custom': [ 
      {'name': 'document', 'items': [ 
       'Subscript', 'Superscript', ]}, 
      {'name': 'source', 'items': [ 
       'Source', ]}, 
     ], 
     'toolbar': 'Custom', 
     'mathJaxLib': '//cdn.mathjax.org/mathjax/2.2-latest/MathJax.js?config=TeX-AMS_HTML', 
     'height': 200, 
     'width': 600, 
     'extraPlugins': ','.join(['mathjax', ]), 
    }, 
} 

problems with mathjax #256によると、私はCKEditorバージョン-init.jsを変更しました。私はまた、 'toolbar_Custom'リストに{'name': 'math', 'items': ['mathjax', ]},{'name': 'math', 'items': ['Matjax', ]}を含むさまざまな組み合わせを試しました。

PrintScreenを

ソース あなたはパネルには、すべての設定Iの設定でセットアップが、mathjaxが含まれて見ることができるように。ただし、ページソースには "toolbar_Basic"、 "toolbar_Full" & "toolbar_Custom"が含まれています。私の設定によると、基本と完全があるべきかどうか分かりません。

< div class = "django-ckeditor-widget" 
data - field - id = "id_false_answer_text" 
style = "display: inline-block;" > 
    < textarea cols = "40" 
id = "id_false_answer_text" 
name = "false_answer_text" 
rows = "10" 
required data - processed = "0" 
data - config = '{"toolbar_Basic": [["Source", "-", "Bold", "Italic"]], "toolbar_Full": [["Styles", "Format", "Bold", "Italic", "Underline", "Strike", "SpellChecker", "Undo", "Redo"], ["Link", "Unlink", "Anchor"], ["Image", "Flash", "Table", "HorizontalRule"], ["TextColor", "BGColor"], ["Smiley", "SpecialChar"], ["Source"]], "filebrowserUploadUrl": "/ckeditor/upload/", "skin": "moono", "filebrowserWindowWidth": 940, "filebrowserWindowHeight": 725, "width": 600, "height": 200, "filebrowserBrowseUrl": "/ckeditor/browse/", "language": "en-us", "toolbar": "Custom", "toolbar_Custom": [{"items": ["Subscript", "Superscript"], "name": "document"}, {"items": ["Source"], "name": "source"}, {"items": ["mathjax"], "name": "mathjax"}]}' 
data - external - plugin - resources = '[]' 
data - id = "id_false_answer_text" 
data - type = "ckeditortype" > & lt; 
p & gt; 
fa4 q1 & lt; 
/p&gt;</textarea > 
</div> 

(ウェブからのポストによると)別の設定 全プラグインの設定も全くmathjaxアイコンを示していません。し、変更せずにどちらも 'CKEditorバージョン-init.js

CKEDITOR_CONFIGS = { 
    'default': { 
     'toolbar': 'none', 
     'height': 200, 
     'width': 600, 
    }, 
} 

screenshot022

のでREADME.rst

静的ファイルから例の設定など CKEDITOR_JQUERY_URL =' //ajax.googleapis .COM/AJAX/libsに/ jqueryの/ 2.1.1/jquery.min.js' screenshot023

quesitonです:

問題がある場合は、どうすればよいですか? 設定に問題がある場合は、mathjaxの設定例/正しい設定を教えてください。

印刷画面はDjangoの管理者のものですが、これらのモデルではRichTextUploadingFieldを使用しています。

+0

将来の注意:cdn.mathjax.orgの寿命が近づいているので、移行のヒントについてはhttps://www.mathjax.org/cdn-shutting-down/をチェックしてください。 –

答えて

1

これは設定ミスの問題で、Django-CKEditorでは問題ありません。次のように、mathjaxのconfigの重要な部分です。

CKEDITOR_CONFIGS = { 
    'default': { 
     'skin': 'moono', 
     'toolbar_Custom': [ 
      {'name': 'math', 'items': ['Mathjax', ]}, 
     ], 
     'toolbar': 'Custom', 
     'mathJaxLib': '//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML', 
     'extraPlugins': ','.join(['mathjax',]), 
    }, 
} 

両方ツールバーextraPliginsが表示され、動作するようにmathjaxための設定で存在すべきです。

関連する問題

 関連する問題