Autoquote in PMs
Hi,
Following on from this thread: http://lithosphere.lithium.com/t5/Product-Support-Board/How-can-I-work-with-my-PMs-more-effectively/m-p/41006
I have created the component and added it to the "Private Notes Page". However, when a user now uses the PM system, upon loading the quote it doesnt break it clear of the curser. So when a user starts typing their message it appears as part of the quote. WHen a user presses enter it either removes the bottom quote line or moves it down the page. The only way to keep the text outside of the quote is to click on the bottom line of the quote and press the down key - this seems to break it clear of the "blockquote".
Upon comparing the HTML for the blockquote with a normal message and this PM it would seem it is not including a < p > < /p > at the end of the blockquote.
I followed the instructions to the letter and made no changes to the component code supplied. Does anyone have any ideas?
Thanks,
Gregg
Hi Gregg,
After taking another look at this, I think what was happening is that it was trying to perform the quote action before the editor was fully loaded. I tweaked the code a bit, and it seems to be better now:
<@liaAddScript> ;(function($) { $(document).bind('LITHIUM:editorLoaded',function() { $('#messageQuote').click(); }); })(LITHIUM.jQuery); </@liaAddScript>
Please keep in mind that with the code from the previous thread, this has not been fully tested or vetted. I'd strongly suggest checking it out in your staging environment first. As usual, you may also need to tweak the code to meet your exact needs.
I hope this helps!
-Adam
test