Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
AjaxQuote
This discussion has been closed.
Comments
Take the normal quotations extension. Replace the line
function quote(commentId, authorId, authorName)
withfunction normal_quote(commentId, authorId, authorName)
Next, add the following function after the normal_quote function.
function fck_quote(commentId, authorId, authorName) { var selText = getSel(); var commentText = ""; commentText = dumpCodeTree(document.getElementById("CommentBody_" + commentId)); if(selText != "") commentText = selText; var oEditor = FCKeditorAPI.GetInstance('Body') ; if ( oEditor.EditMode == FCK_EDITMODE_WYSIWYG ) { var FCKeditorquote = '<blockquote><cite>'+authorName+'</cite> '+ commentText+'</blockquote><br />'; oEditor.InsertHtml(FCKeditorquote ) ; } else alert( 'You must be on WYSIWYG mode!' ) ; }
Lastly, place this function after the fck_quote function you just inserted.
function quote ( commentId, authorId, authorName ){ if( typeof FCKeditorAPI != "undefined"){ fck_quote( commentId, authorId, authorName ); }else{ normal_quote( commentId, authorId, authorName ); } }
So now when a user clicks on the quote button it will check to see if they are using FCKeditor or not. Then it will select the appropriate method of quoting depending on the editor the user has selected.