nodebb-plugin-composer-quill: WYSIWYG alternative to redactor
-
@JJSagan said in nodebb-plugin-composer-quill: WYSIWYG alternative to redactor:
Can you please let me know what function i can call to render the emoji?
The function you're looking for is
buildEmoji
: https://github.com/NodeBB/nodebb-plugin-emoji/blob/master/public/lib/emoji.ts#L7You have to pass in the emoji object, which you get from the
table
. Both are exported from theemoji
requirejs module. -
Hi @PitaJ ,
Looks like I am failing to do this from a quill-plugin. Note however, I am pretty novice, and perhaps lack sufficient knowledge to make it work.
May I propose to insert the emoji name and bitmap (without the link) into the editor. That will enable the emoji to display properly inside the editor prior to saving. When the post data is read from the DB on its way to the client, the client will use the :CODE: and replace the bitmap, that is PRIOR to rendering or editing by quill again.
The disadvantage is client processing time on scanning/updating the delta.
Your thoughts?
JJ. -
Not yet, but one problem at a time. There are a lot of posts here in this thread!
Keep in mind emoji already work in Quill, just not the toolbar selector and it doesn't show the emoji in the editor itself. Right now it just shows
:laughing:
or whatnot, which is acceptable, but of course, not 100%. I put in a bit of effort at the start to ensure the autocomplete is working (because mentions requires it as well), so the emoji autocomplete works as expected as well. -
Hi @julian great job!
I reviewed the github page, and looks like you were able to reproduce the issues I mentioned.
I noted that you have bypassed rendering quill by keeping two versions of the post, one in html and one in delta. That will solve a lot of issues down the line, so I completely understand.
Kindly consider:- Fixing the tooltips,
- Allowing icons in the chat windows.
- Move the tag below the topic (so it may appear in mobile).
All have a potential solution above.
Do you need help with anything?
LMK,
JJ. -
Hi @Per0x , I see @julian already addressed your comments.
I would not suggest cloning it now, unless you have some programming skills.
A lot of work has been done, but still there are few things that are yet to be accomplished, see list here: https://github.com/NodeBB/nodebb-plugin-composer-quill/issues. I guess we'll have to wait till Q2.
In the meantime, Quill is working on v2 so lots of good things to wait for -
Unfortunately, the plugin does not work.
2019-05-31T08:36:25.279Z [4567/46996] - warn: [meta/css] File not found! nodebb-plugin-composer-quill/node_modules/quill/dist/quill.snow.css 2019-05-31T08:36:25.279Z [4567/46996] - warn: [meta/css] File not found! nodebb-plugin-composer-quill/node_modules/quill/dist/quill.bubble.css 2019-05-31T08:36:25.345Z [4567/46996] - warn: [meta/css] File not found! nodebb-plugin-composer-quill/node_modules/quill/dist/quill.snow.css 2019-05-31T08:36:25.345Z [4567/46996] - warn: [meta/css] File not found! nodebb-plugin-composer-quill/node_modules/quill/dist/quill.bubble.css
2019-05-31T08:37:37.896Z [4567/47037] - error: /admin/plugins/composer-quill Failed to lookup view "admin/plugins/composer-quill" in views directory "/var/www/myforum.tld/nodebb/build/public/templates" {"view":{"defaultEngine":"tpl","ext":".tpl","name":"admin/plugins/composer-quill","root":"/var/www/myforum.tld/nodebb/build/public/templates"},"stack":"Error: Failed to lookup view \"admin/plugins/composer-quill\" in views directory \"/var/www/myforum.tld/nodebb/build/public/templates\"\n at Function.render (/var/www/myforum.tld/nodebb/node_modules/express/lib/application.js:580:17)\n at ServerResponse.render (/var/www/myforum.tld/nodebb/node_modules/express/lib/response.js:1008:7)\n at content (/var/www/myforum.tld/nodebb/src/middleware/render.js:84:15)\n at /var/www/myforum.tld/nodebb/node_modules/async/dist/async.js:3880:24\n at replenish (/var/www/myforum.tld/nodebb/node_modules/async/dist/async.js:1011:17)\n at /var/www/myforum.tld/nodebb/node_modules/async/dist/async.js:1016:9\n at eachOfLimit (/var/www/myforum.tld/nodebb/node_modules/async/dist/async.js:1041:24)\n at /var/www/myforum.tld/nodebb/node_modules/async/dist/async.js:1046:16\n at eachOf (/var/www/myforum.tld/nodebb/node_modules/async/dist/async.js:1117:5)\n at _parallel (/var/www/myforum.tld/nodebb/node_modules/async/dist/async.js:3879:5)"}
-
@julian I did it, but unfortunately it did not help.
./nodebb build [benchpressjs] Unable to build or find a suitable native module, falling back to JS version started 2019-05-31T15:59:10.198Z [4567/48229] - info: [build] Building in parallel mode 2019-05-31T15:59:10.199Z [4567/48229] - info: [build] plugin static dirs build started 2019-05-31T15:59:10.202Z [4567/48229] - info: [build] requirejs modules build started 2019-05-31T15:59:10.203Z [4567/48229] - info: [build] client js bundle build started 2019-05-31T15:59:10.204Z [4567/48229] - info: [build] admin js bundle build started 2019-05-31T15:59:10.205Z [4567/48229] - info: [build] client side styles build started 2019-05-31T15:59:10.205Z [4567/48229] - info: [build] admin control panel styles build started 2019-05-31T15:59:10.205Z [4567/48229] - info: [build] templates build started 2019-05-31T15:59:10.206Z [4567/48229] - info: [build] languages build started 2019-05-31T15:59:10.206Z [4567/48229] - info: [build] sounds build started 2019-05-31T15:59:10.210Z [4567/48229] - warn: [meta/css] File not found! nodebb-plugin-composer-quill/node_modules/quill/dist/quill.snow.css 2019-05-31T15:59:10.211Z [4567/48229] - warn: [meta/css] File not found! nodebb-plugin-composer-quill/node_modules/quill/dist/quill.bubble.css 2019-05-31T15:59:10.278Z [4567/48229] - warn: [meta/css] File not found! nodebb-plugin-composer-quill/node_modules/quill/dist/quill.snow.css 2019-05-31T15:59:10.278Z [4567/48229] - warn: [meta/css] File not found! nodebb-plugin-composer-quill/node_modules/quill/dist/quill.bubble.css 2019-05-31T15:59:10.714Z [4567/48229] - info: [build] sounds build completed in 0.508sec 2019-05-31T15:59:10.934Z [4567/48229] - info: [build] plugin static dirs build completed in 0.735sec 2019-05-31T15:59:27.290Z [4567/48229] - info: [build] client side styles build completed in 17.085sec 2019-05-31T15:59:39.361Z [4567/48229] - info: [build] client js bundle build completed in 29.158sec 2019-05-31T15:59:39.362Z [4567/48229] - info: [build] admin js bundle build completed in 29.158sec 2019-05-31T15:59:52.070Z [4567/48229] - info: [build] languages build completed in 41.864sec 2019-05-31T16:00:00.266Z [4567/48229] - info: [build] admin control panel styles build completed in 50.061sec 2019-05-31T16:00:03.182Z [4567/48229] - info: [build] templates build completed in 52.977sec 2019-05-31T16:00:04.491Z [4567/48229] - info: [build] requirejs modules build completed in 54.289sec 2019-05-31T16:00:04.494Z [4567/48229] - info: [build] Asset compilation successful. Completed in 54.293sec.