duncanphillips
Rich Text Editors and LiveView?
Hi,
I’m looking at improving the text editing capabilities in our app and would like to introduce a rich text editor experience like tiptap, trix, slate.
There doesn’t seem to be a lot of content (blogs, forum posts, etc) out there from folks who have integrated. I’m keen to hear if anyone has experience adding any of these frameworks, and looking for some recommendations for which ones are simple to add, and work well within live view?
At the moment, I’m leaning towards Trix because I’ve found a couple examples of folks using it with live view [1][2]. TipTap seems to be gaining some popularity though.
thanks
[1] WYSIWIG HTML editors for Phoenix LiveView? - #10 by romenigld
[2] Trix Editor - ElixirCasts
Trending in Questions
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
Using Phoenix.LiveView.TagEngine as an EEx.Engine is deprecated!
To compile HEEx, use Phoenix.LiveView.TagEngine.compile/2 instead.
Sta...
New
Hello !
We want new/edit form pages to POST/PUT to their own URL rather than the resources REST defaults (post /things, put /things/:id)...
New
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app?
Looking for hints regarding:
Addi...
New
Hi all, I wanted to ask how the community is dealing with post-release steps.
Today we have Ecto migrations, which make sure that the db...
New
I am using Oban and occasionally, shortly after a deployment, a handful of jobs can fail because of dependency on other parts of the syst...
New
Other Trending Topics
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
@hugobarauna and I (Alex Koutmos) have been hard at work on writing a book on Nerves that takes you from simply blinking LEDs to building...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #elixirconf-us
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










First 8 of 8 Posts!
Eiji
Well … if you are not interested in
HTMLeditors then you could considermarkdownones. Even creating such should not be a problem. That’s just a couple of buttons that insert some text in the current selection.https://caniuse.com/input-selection
The only problem with that is how
LiveViewtreatstextareai.e. it’s always a source of truth and thereforeassigndoes not affects it and you have to write some extraJavaScriptcode to workaround it which is a bit confusing:I guess that every
JavaScripteditor is simple to add intoLiveViewas long as you understand how it works … In normal case you could simply put someJavaScriptat the bottom of thebodytag contents making it executable after other elements are rendered. Alternatively there areonloadand other events you are interested in and you should find the information about all of it in the specific editor documentation.The only difference here is that
windowload events !=LiveViewload. So what you should focus on are noteditor-specific blog posts, butLiveViewdocumentation like:The only “easier” way are
hexpackages (if any) which does that for you, so you only have to import theirJavaScripthooks and add them to yourLiveViewhooks.Andre-Bryan
recently implemented a Rich Text Editor with trix, then QuillJs and then TinyMCE all of which were easy to switch between to test the functionality and ease of use. Ended up settling on tinyMCE. It all depends on what functionality you are looking for though.
bottlenecked
There’s also another step-by-step integration for Trix which I read the other day. An extra point in favor of Trix then How to handle file upload using Trix editor in a Phoenix application
katafrakt
I did it with Quill once or twice. I remember it was rather simple, but the integration also was not very deep. As for Trix, I always found it lacking in terms of customization options.
Joep
I use CkEditor 5, it has great documentation and lots of features if you want.
This is my js:
And this is the form field, calling the Hook:
SoKeY
I did it with TipTap and it works quite nice together with phoenix and ecto changesets. Here you can see it in action https://tiptap-phoenix.fly.dev/notebook
There you will also find the link to the GitHub Repo.
JacobAlexander
Mati365
Hey, I built a CKEditor 5 integration for Phoenix. It handles sending data back and forth with the backend, works nicely with forms, and supports different modes + custom plugins. If anyone’s looking for something like that, here’s the repo: https://github.com/Mati365/ckeditor5-phoenix