Christopher

Joined

1,640 Experience
1 Lesson Completed
2 Questions Solved

Activity

Posted in Migrating From jQuery to Vanilla Javascript Discussion

Is it possible to use ActionText in an Vue-App?

Had the same problem, your solution helped me a lot. Would be cool if there was a better way to edit the toolbar of trix.

Posted in jquery doesn't work in js.erb file

Ah I got it I had to add this to my application.js

import $ from 'jquery';
global.$ = jQuery;

Posted in jquery doesn't work in js.erb file

Hey I'm working on an rails 6 application and try to render an partial in an js.erb file but get this error in the chrome console:

Uncaught TypeError: Cannot read property 'append' of null

Is there something new with js.erb files in rails 6 or am I missing something?

Posted in How do I use easyautocomplete in rails 6?

thank you I think I got it now

Posted in How do I use easyautocomplete in rails 6?

I just get this error

Uncaught TypeError: $(...).easyAutocomplete is not a function at <anonymous>:1:12

Posted in How do I use easyautocomplete in rails 6?

I added it with yarn add easy-automplete
my application.js

// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.

require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")

window.Rails = Rails

import 'bootstrap'
import 'easy-autocomplete/dist/jquery.easy-autocomplete'
import "controllers"

require("trix")
require("@rails/actiontext")

my application.scss

//= require actiontext

@import 'bootstrap';
@import 'easy-autocomplete/dist/easy-autocomplete';
@import 'easy-autocomplete/dist/easy-autocomplete.themes';

Posted in How do I use easyautocomplete in rails 6?

I tried adding it with yarn and through rails assets but nothings seems to work.