Editor.js in Ruby on Rails 7 with Stimulus!
Vložit
- čas přidán 8. 05. 2023
- This video covers initial setup and configuration of Editor.js for a Ruby on Rails 7 application with Stimulus. Includes plugins and code editor options.
Checkout my course(s) at: learn.deanin.com
Plugins covered:
Code
Header
List
Paragraph
Source:
github.com/Deanout/editorjs_r...
Links:
editorjs.io/
editorjs.io/getting-started/
editorjs.io/base-concepts/
editorjs.io/saving-data/
editorjs.io/fill-block-with-s...
github.com/editor-js/code
Join this channel to help support these videos:
/ @deanin
Follow me on social media:
linktr.ee/deanin
If you liked this video, please consider subscribing: t.co/RZ4EwP0F2a
Timestamps
#Deanin #Software #Programming
Hey everyone! This one was actually pretty quick to put together, thanks to the docs and ChatGPT haha.
If you're interested, I have Active Storage working with Editor.JS as well. It's pretty easy to integrate, I'd be happy to cover that as well. Let me know.
Playlist for future videos: czcams.com/play/PL3mtAHT_eRexIV5-61ibrzBKap1TT2Q_y.html
the play list doesnt have the video :)
Bro is carrying the weight of the whole Rails framework in his shoulders ur an icon
Always happy to discover new JS libs
Thanks! This came at the perfect time. Can you share your solution to integrating active storage as well? MUCH appreciated!
Thanks!
Hey Deanin, how we add the fixed title block at the top in editorjs in rails?
Nice I've been trying to figure out what wysiwyg editor to use for a fun project
good job bro
Just a note on the event listeners - passing `this.saveEditorData.bind(this)` into the callback will cause a memory leak as it creates a new function every time. It would be better to use a fat arrow syntax for the method (i.e. `saveEditorData = async (event) => {}`, or bind in an initialize function (i.e. `this.saveEditorData = this.saveEditorData.bind(this)`.
Great content here @Deanin...but I am having an issue, I have done everything and checked with your code..but i get this persistent error at my end. JSON::ParserError in Articles#index
Showing /home/wintan/railsproject/winread/app/views/articles/_article.html.erb where line #9 raised:
859: unexpected token at ''
Extracted source (around line #3):
1
2
3
4
5
6
module ArticlesHelper
def display_content(content)
parsed_content = JSON.parse(content)
content_html = parsed_content['blocks'].map do |block|
case block['type']
when 'paragraph' this has really delayed me for weeks now...I would be glad if you can help me please.