Switched to tinymce
This commit is contained in:
parent
a8a4c8d239
commit
359a1f4516
@ -2,11 +2,9 @@ from django.db import models
|
||||
from django.contrib.auth.admin import User
|
||||
from django.utils.timezone import now
|
||||
|
||||
from froala_editor.fields import FroalaField
|
||||
|
||||
|
||||
class Newsletter(models.Model):
|
||||
body = FroalaField()
|
||||
body = models.TextField()
|
||||
created = models.DateTimeField(auto_now_add=True)
|
||||
creator = models.ForeignKey(User)
|
||||
publish = models.DateTimeField(default=now())
|
||||
|
@ -2,4 +2,3 @@ bootstrap-admin==0.3.7.1
|
||||
Django==1.11.4
|
||||
Pillow==4.2.1
|
||||
requests==2.11.1
|
||||
django-froala-editor==2.6.5
|
||||
|
@ -5,6 +5,18 @@
|
||||
|
||||
{% block extrahead %}
|
||||
<link rel="icon" type="image/png" href="{% static 'main/img/logo.png' %}"/>
|
||||
<script src="{% static 'tinymce/js/tinymce/tinymce.min.js' %}"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script>
|
||||
$(function() {
|
||||
tinymce.init({
|
||||
branding: false,
|
||||
plugins: 'autolink image link print media table imagetools',
|
||||
selector: 'textarea'
|
||||
});
|
||||
console.log('fire');
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
#newslettersubscription-group h3 {
|
||||
display: none;
|
||||
|
@ -17,6 +17,10 @@
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-beta/js/bootstrap.min.js"></script>
|
||||
<script src="{% static 'tinymce/js/tinymce.min.js' %}"></script>
|
||||
<scirpt>
|
||||
tinymce.init({ selector:'textarea' });
|
||||
</scirpt>
|
||||
|
||||
{% block head %}
|
||||
{% endblock %}
|
||||
|
Loading…
Reference in New Issue
Block a user