Skip to content

Commit 1f1c812

Browse files
committed
Issues-491: Fix quote functionality
1 parent 56058c6 commit 1f1c812

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

vanilla/plugins/Quotes/class.quotes.plugin.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public function profileController_afterAddSideMenu_handler($sender) {
8585
*
8686
* @param profileController $sender
8787
*/
88+
/*
8889
public function profileController_quotes_create($sender) {
8990
$sender->permission('Garden.SignIn.Allow');
9091
$sender->title(t("Quote Settings"));
@@ -140,7 +141,7 @@ public function profileController_quotes_create($sender) {
140141
141142
$sender->render('quotes', '', 'plugins/Quotes');
142143
}
143-
144+
*/
144145
/**
145146
* Set user's quote folding preference in the page for Javascript access.
146147
*

vanilla/plugins/Quotes/js/quotes.js

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Gdn_Quotes.prototype.GetEditor = function () {
105105
var editor = $(this.currentEditor);
106106
if (!document.body.contains(this.currentEditor) || !editor.length) {
107107
// FIX: https://github.com/topcoder-platform/forums/issues/83
108-
editor = $('.richEditor-textWrap').first();
108+
editor = $('.bodybox-wrap').first();
109109
}
110110

111111
return editor;
@@ -165,23 +165,7 @@ Gdn_Quotes.prototype.QuoteResponse = function(Data, Status, XHR) {
165165

166166
// Insert the quote text into the editor.
167167
Gdn_Quotes.prototype.ApplyQuoteText = function(QuoteText) {
168-
var Editor = this.GetEditor();
169-
170-
// First try and throw an event.
171-
Editor.trigger('appendHtml', QuoteText + '<br />');
172-
173-
QuoteText = QuoteText + '\n';
174-
Editor.val(Editor.val() + QuoteText);
175-
176-
// DEPRECATED: cleditor support
177-
if ($('div.cleditorMain').length) {
178-
Editor.val(Editor.val() + '<br/>');
179-
Editor.get(0).editor.updateFrame();
180-
}
181-
182-
Editor
183-
.focus()
184-
.trigger('autosize.resize');
168+
$(document).trigger('ApplyQuoteText', [QuoteText]);
185169
};
186170

187171
(function(window) {

0 commit comments

Comments
 (0)