Comments (5)
Looks like I managed to get it going. On top of what the app provides, I have to manually include the following:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7/fabric.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/tui-code-snippet.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/tui-image-editor.min.js"></script>
And ensure it is loaded before the app includes its own JS files. Then I have to also manually include the CSS files. It might be worth including those JS files into the main app if they're required.
Thanks for your help.
from django-froala-editor.
Could you please make sure that you are using the latest 2.9.3 version?
from django-froala-editor.
django-froala-editor==2.9.3
Yep.
from django-froala-editor.
Could you also please check that you are including the JS and CSS files required by TUI: https://www.froala.com/wysiwyg-editor/examples/tui-advanced-image-editor?
from django-froala-editor.
Here is a full list of the files that the plugin includes:
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.4.0/css/font-awesome.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/froala_editor.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/froala_style.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/froala-django.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/char_counter.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/code_view.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/colors.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/draggable.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/emoticons.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/file.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/fullscreen.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/help.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/image.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/image_manager.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/line_breaker.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/quick_insert.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/special_characters.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/table.min.css" type="text/css" media="all" rel="stylesheet">
<link href="/static/froala_editor/css/plugins/video.min.css" type="text/css" media="all" rel="stylesheet">
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/froala_editor.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/froala-django.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/align.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/char_counter.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/code_beautifier.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/code_view.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/colors.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/draggable.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/emoticons.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/entities.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/file.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/font_family.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/font_size.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/fullscreen.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/help.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/image.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/image_manager.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/inline_style.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/line_breaker.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/link.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/lists.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/paragraph_format.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/paragraph_style.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/print.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/quick_insert.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/quote.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/save.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/special_characters.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/table.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/url.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/video.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/plugins/word_paste.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/third_party/image_tui.min.js"></script>
<script type="text/javascript" src="/static/froala_editor/js/third_party/font_awesome.min.js"></script>
I also added the following lines at the end of the page as instructed:
<!-- Include TUI JS. -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/fabric.js/1.6.7/fabric.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/tui-code-snippet.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/[email protected]/dist/tui-image-editor.min.js"></script>
<!-- Include TUI plugin. -->
<script type="text/javascript" src="../js/third_party/image_tui.min.js"></script>
When added like this, there are two "advanced editor" buttons. Clicking either one of them opens up the editor but with no CSS applied, so it's all over the place (see here: https://i.imgur.com/w9P7eAk.png). If I remove <script type="text/javascript" src="../js/third_party/image_tui.min.js"></script>
, which is in there twice due to being included by the app, I go back to only having on "Advanced Editor" button but it also goes back to not doing anything when clicked.
from django-froala-editor.
Related Issues (20)
- Django 3.2 not supported due to missing db_collation support HOT 1
- Add newer versions to Python Package Index HOT 1
- Using the License Key HOT 1
- 4.0.4 not availbale on PyPI HOT 4
- Is this still maintained? I mean really maintained and not just having js/css files updated?
- missing files froala-django.css and froala-django.js HOT 2
- Static Collection failing on Django 4.0 HOT 3
- Writing a Third Party Plugin HOT 1
- Cant upload photos HOT 1
- json encoding of option should use DjangoJSONEncoder
- image/webp should be added to allowed image types
- Image upload not working HOT 4
- bug report, uploading image with same filename HOT 1
- Can not upload videos HOT 2
- CSS Layers of link "popup" is broke
- Everythign works except the Manage Images
- When will 3.1.1 be pushed out for Django Froala? HOT 1
- No Uploading multiple images
- Django 3.0, admin inlines, throws JS error when new inline formset is added HOT 2
- Maximum call stack size exceeded. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-froala-editor.