add ritajs, let it show rhymes for the selected word upon clicking the rhyme FAB

This commit is contained in:
2023-12-21 10:14:49 -05:00
parent ad61063c0d
commit bb16921a74
6 changed files with 221 additions and 5 deletions

View File

@@ -1,6 +1,9 @@
// https://elixirforum.com/t/how-to-connect-quill-with-phoenix/46004
import Quill from 'quill';
import socket from '../user_socket';
import RhymeModule from '../lib/rhyme';
Quill.register('modules/rhymeModule', RhymeModule);
export let TextEditor = {
mounted() {
@@ -8,7 +11,10 @@ export let TextEditor = {
this.clientId;
this.quill = new Quill(this.el, {
theme: 'snow'
theme: 'snow',
modules: {
rhymeModule: true
}
});
let channel = socket.channel(`pad:${padId}`, {});