Deprecate Hallo.js
See original GitHub issueThe last commit on the Hallo.js master was Jun 12, 2015. I’m worried we’re coupling a crucial function in Wagtail (editing text) to a package which seems to have gone off the boil somewhat.
I would suggest migrating to Draft.js, as this supports our aspirations to move to a more React-driven frontend, as well as being more actively maintained and sporting a much nicer API to write plugins against. It’s also used in production by Facebook.
Edit: see progress updates at
- https://github.com/wagtail/wagtail/issues/2409#issuecomment-264019860
- https://github.com/wagtail/wagtail/issues/2409#issuecomment-277226739
- https://github.com/wagtail/wagtail/issues/2409#issuecomment-297354841
There’s some prerequisite work to do:
- Allow for pluggable rich text editors (so that we don’t backwards-break every Wagtail site) [#2416]
- Create a new JSONField and a widget to control it.
- Allow for HTML export from a structured text editor, so that people who want to store Rich Text as HTML in the database can continue to do so.
- Write an extension to the
richtext
template filter to parse structured data into HTML.
Check out the Draft.js intro site
Read an article about how Draft represents data on Medium
There’s a solution for saving HTML if required, too: Draft JS HTML export
Issue Analytics
- State:
- Created 7 years ago
- Reactions:26
- Comments:19 (17 by maintainers)
Top Results From Across the Web
Extending the Hallo Editor — Wagtail 2.12.3 documentation
As of Wagtail 2.0, the hallo.js editor is deprecated. We have no intentions to remove it from Wagtail as of yet, but it...
Read more >Approaches to Deprecating Code in JavaScript | CSS-Tricks
In my opinion, large teams or projects relying on external APIs or libraries ought to deprecate first, then remove later (after a reasonable ......
Read more >JointJS+ Halo
Include joint.ui.halo.css and joint.ui.halo.js files to your HTML: ... Previously, Halo accepted also paper and graph options but this is now deprecated as ......
Read more >wagtail-hallo - PyPI
js editor is deprecated. Status This package should be compatible with Wagtail 2.17 and earlier versions. However, it will no longer receive bug ......
Read more >Node.js process.throwDeprecation Property - GeeksforGeeks
throwDeprecation is mutable, so whether or not deprecation warnings result in errors ... Command to run: node –throw-deprecation hello.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Another progress update:
@loicteixeira and I, with support from lots of others (at the dev sprint in Reykjavík, online, at SL), have worked on glueing all of this together in https://github.com/springload/wagtaildraftail. It is now usable, although still unstable, and a big release is due this week.
The next steps for me are to:
wagtaildraftail
to gather further feedback and facilitate collaboration.Finally, in the last progress update I was highlighting our thinking around data storage and conversion (in what stage of the lifecycle to convert from Draft.js to HTML, what to store, how).
wagtaildraftail
, storing Draft.js content state as JSON, seems to work well for us so far. (2 projects using this at Springload, close to going live).Here is a progress update for people interested in this:
We/I are trying to make those two projects usable and relevant outside of Wagtail. It’s not that much more effort, and I think it will make the efforts more viable in the long run. And I think it’s just a better practice to keep the coupling low.
The glue between Draftail and Wagtail is here: https://github.com/springload/wagtaildraftail. This is WIP, pre-alpha, and completely unusable as-is at the moment. It just outlines our current approach to combine the pieces.
One of the big design decisions here is whether the content coming out of the editor gets stored using the Draft.js representation (JSON) or an HTML export of it. The main design tradeoffs are:
There are many more tradeoffs (performance, lower common denominator with other editors, etc) that I hope we will get to cover in upcoming documentation. The takeaway is that:
draftjs_exporter
, the Python Draft.js -> HTML exporter, attempts to be agnostic to this too. It can be run when the page is saved, or when it is displayed.wagtaildraftail
has the opinions. In this WIP implementation, content is stored as JSON and exported to HTML when pages are rendered. We are keen to explore the other scenario as well.