Comments (8)
Hi! Use standard django admin functional.
If you use django-ckeditor just change models.TextField
to RichTextField
(from ckeditor.fields import RichTextField
) in your streamblocks/models.py
https://github.com/django-ckeditor/django-ckeditor#id6
Or you need to customize streamblocks/admin.py to add ckeditor widget
admin.site.unregister(RichText)
@admin.register(RichText)
class RichTextAdmin(StreamBlocksAdmin, admin.ModelAdmin):
# here is your code for admin class of RichText.
https://github.com/raagin/django-streamfield#custom-admin-class-for-blocks-models
from django-streamfield.
Hello, thank you. Do you now how to set
between text blocks?
from django-streamfield.
I think I misunderstood your question.
from django-streamfield.
Hello, I've added
into template and remove it by JS if block is last in queue. But it would be more comfortable to create a checkbox and give users an opportunity to set
if they need.
Also I found a bug: if you add two included blocks with pictures, then you can't remove them by "Remove" button. If there is one included block, "Remove" button works correctly. Can you fix this? Screenshot is attached.
from django-streamfield.
I fixed the bug. Try it in a new release (2.0.8). Thank you.
What checkbox do you mean?
from django-streamfield.
Hello, I've tested it on 2.0.8 with more than one picture block, removing works correctly now, thank you.
I mean checkbox for setting
between blocks of different types, here is the screenshot:
The content won't be divided visually without
.
You have similar margins parameter:
STREAMFIELD_BLOCK_OPTIONS = {
"margins": {
"label": "Margins",
"type": "checkbox",
"default": True
}
}
Is this possible to create similar checkbox for
for giving user right to decide necessity of the tag with its help?
from django-streamfield.
Do you want to make optional a tag <br>
in your template?
You may use options as you wish. See here
https://github.com/raagin/django-streamfield#block-options
from django-streamfield.
Great, I'll try that, thank you very much.
from django-streamfield.
Related Issues (16)
- Autodetect STREAMFIELD_BASE_ADMIN_URL reversing admin index url. HOT 1
- Not Found: /folder/7909375238_n.jpg HOT 1
- [Question] Compatibility HOT 2
- Error 404 inside the popup when clicking "+ Add content" button if the streamblocks model has not fields. HOT 1
- Bug with STREAMFIELD_SHOW_ADMIN_HELP_TEXT HOT 2
- Can't delete/reorder blocks in admin HOT 1
- Deleting object from stream causes error when contenttypes and streamblocks use different databases HOT 2
- `ValueError`: The file 'streamfield/vendor/vuedraggable.umd.min.js.map' could not be found with `ManifestStaticFilesStorage` object. HOT 2
- Button new block doesn't work in v2.0.0 HOT 5
- Ajax issue HOT 1
- Can be used in a dango view HOT 3
- How to create streamblocks and add them to stream field programatically? HOT 2
- Feature Request: Moving multiple blocks at once HOT 2
- Orphaned/existing blocks HOT 7
- 404 After deleting Stream Block inline 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-streamfield.