Redactor Composer 1.3.4 Released!
-
One thing that would be really helpful would be someone fixing the reply/quote bug:
https://github.com/NodeBB/nodebb-plugin-composer-redactor/issues/15
The changes have been made to core, but I'm out to sea with what needs to happen in the redactor plugin for this.
Here's the key changes and areas of interest from what I can gather::
https://github.com/NodeBB/NodeBB/commit/cf36f7bc79258f5e2ae933d6ee7a059adc2e377d
https://github.com/NodeBB/nodebb-plugin-composer-default/commit/1d37b6d1556656019e1cbbf3956b4efe5d0046e0
https://github.com/NodeBB/nodebb-plugin-composer-redactor/blob/master/static/lib/client.js#L18 -
Gogo @administrators @Community-Representatives give composer redactor and composer default some love
-
Core triggers 2 events when a new reply or quote is happening
$(window).trigger('action:composer.post.new', { tid: tid, pid: getData(button, 'data-pid'), topicName: topicName, text: username ? username + ' ' : '' });
and
$(window).trigger('action:composer.addQuote', { tid: tid, slug: ajaxify.data.slug, index: getData(button, 'data-index'), pid: getData(button, 'data-pid'), topicName: topicName, username: username, text: selectionText });
the redactor plugin needs to listen to these with
window.on
, the events pass the quoted text in the fieldtext
.Then you need to insert the
text
into the text area of redactor as a quote maybe in a<blockquote>
Check out how composer-default does it here -
Hello,
To upload files in Redactor, I use this :
Edit "node_modules/nodebb-plugin-composer-redactor/static/lib/client.js" and add these lines at the end of the file
$.Redactor.opts.fileUpload='/api/post/upload'; $.Redactor.opts.fileUploadParam='files[]'; $.Redactor.opts.fileUploadKey='url';
Edit "redactor.js" too, and set :
fileUpload: true,
Stop and restart NodeBB.
It's not nice but it's work for me. Editing message seems to duplicate urls... not good.
I'm waiting for an image and file upload in local which can display thumnails, but I'm very bad in JS so I can't help you...
See you.
V. -
sent pull request
-
any way to support nodebb plugins like mentions, emoji, canned responses, etc in redactor?
-
Installed on our forum, and it's working well. Found these problems - using Firefox (Chrome is completely unaffected and works fine).
- Highlighting text doesn't work 9/10 in WYSIWYG mode
- To highlight text, having to switch to HTML mode.
- when text is highlighted and the link button clicked, the text you've highlighted isn't passed to the "text" box under where you enter the URL. It has to be re-entered.
Like @exo-do would like to know how to add the Emoji button back in, preferably in along with the new buttons - the actual shortcuts for emoji still work with the plugin enabled (though don't convert until after the post has been made - i.e. they don't show up in WYSIWYG mode).
-
@Danny-McWilliams To clarify, they wouldn't be added "back in". This is a new plugin so they'd just be added.
Creating a button and functions isn't too complicated. @exo-do just sent a pull request for adding tables in today. Take a look at the Redactor documentation, and feel free to give it a shot. -
@Danny-McWilliams said:
Highlighting text doesn't work 9/10 in WYSIWYG mode
To highlight text, having to switch to HTML mode.
when text is highlighted and the link button clicked, the text you've highlighted isn't passed to the "text" box under where you enter the URL. It has to be re-entered.Gonna have to give that a test to recreate and debug. Could you please raise an issue for it on GitHub?
-
@drew no problem, I will tonight as soon as I get on my PC
-
Tables now added thanks to a pull request from martyalicante
-
The firefox issue has been resolved. Thanks guys!