-
Notifications
You must be signed in to change notification settings - Fork 161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Body content as StreamField #40
Comments
I'm working on a similar approach. We use Puput in APSL's blog but we have the problem that the default RichTextField don't work well for other things like inserting code snippets. We though an interesting approach would be replace the body field from a RichTextField to a StreamField (see this link http://thirdworldnomad.com/2015/06/22/developing-wagtail on the section "Extending StreamField Block"). |
Looks like a great aproach. The main problem would be migrating already exiting posts, right? |
Yes, it is. For the moment, I think that the best option is have two body fields and provide to user a tool to migrate between fields (something like this http://docs.wagtail.io/en/v1.4.1/topics/streamfield.html?highlight=streamfield#migrating-richtextfields-to-streamfield= |
what is the status of the 'RichTextField to a StreamField' (if there is one)? |
Hi @mronoffon, There are a branch for this goal. Feel free to try it. |
Howdy @marctc, thanks for your efforts! I have a pretty good generic StreamField body block I've developed. Want me to implement a version and issue a PR? Perhaps as a different Entry page type, maybe a "StreamEntry"? |
YES, pleas!!!
…On Nov 25, 2016, at 9:40 PM, Timothy Allen ***@***.***> wrote:
Howdy @marctc, thanks for your efforts! I have a pretty good generic StreamField body block I've developed. Want me to implement a version and issue a PR? Perhaps as a different Entry page type, maybe a "StreamEntry"?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yeah, sounds good to me. What do you have in mind?
I would rather implement as an extra body field in Entry model and set the |
any headway? |
We are working on it in this PR: #83 |
Feel free to help out with the PR if anyone would like! I'm hoping to get some time soon to merge the best from both branches. |
Please see pull request #112 |
Guys, I made a symbolic bountysource for this feature. Not a lot, 50 bucks, but better than nothing, right? Keep up the good work! |
Awesome!!! Thank you very much @albcunha. Never heard about this. @MiltonLn @FlipperPA can you take a look? |
@albcunha is there some possibility to increase those 50 bucks with money from other users? I'll be happy to contribute ;) |
@marctc Done! |
awesome! |
What still needs doing here? I thought it was mostly complete, but its honestly been quite a while now and would probably need some tweaks for Wagtail 2.0. :) |
@FlipperPA, we are just going to support wagtail 2.0 to use draftail, that would solve all of our needs, I'm taking care of that this week |
I think my share can be donated to you. After all, you deserve free beer on the house! |
@MiltonLn Right on, good to hear! I'm sticking with the structured content approach of StreamField with Peregrine, so that'll be a nice differentiation. If y'all can make it to DjangoCon US this Fall in San Diego, I'd love to chat Wagtail blog software! |
@FlipperPA can you show us a screenshot of how it looks? |
Sure! Here's the site: https://PyPhilly.org/ The ABOUT page has an image header example. It's running entirely Wagtail 2 on Django 2. The backend is using Zappa to run on AWS Lambda serverless with SQLite on S3. Total cost: $0.56 to host last month! :) And here's the editor: |
@albcunha @sabueso do you think that the options that draftail provide by default (https://springload.github.io/draftail/) is enough or we need something special? |
I agrree with Milton regarding highlighted code. The alternative given by Flipper Works great as well. But there's a dealbreaker for me. Sometimes I embed iframes. Would it be difficult to allow it to edit the HTML source code? |
1 similar comment
I agrree with Milton regarding highlighted code. The alternative given by Flipper Works great as well. But there's a dealbreaker for me. Sometimes I embed iframes. Would it be difficult to allow it to edit the HTML source code? |
That's a tricky one, especially with Draftail as there is not HTML stored in the database. It stored the whole editor area as JSON, which is rendered to HTML on demand. It might be necessary to create some sort of IFRAME or RAW HTML button for those cases, that just renders whatever you put into the field exactly as it appears. |
I agree with @FlipperPA, Is also worth saying that kind of feature is away the scope of this project, maybe that can be better handled directly on Wagtail project. |
Closing this because we are now supporting Wagtail 2.0 and its cool Draftail editor, please reopen if something different is needed. |
Maybe the WordPress way is not the best way, but I think some of the WordPress options to create diferent kind of posts is a very good idea.
Something like
What do you think about that. Is it too opinionated aproach?.
Should those be pluggins?
The text was updated successfully, but these errors were encountered: