Mistři v programování na #hovnokod

JavaScript #1713

niet nad presnou specifikaci elementu...

this.insertQuote = function( elementObject, finalObject , type )
    {
        text = '';
        userName = elementObject.parent().parent().parent().parent().prev().children().children().next().html();
        textData = elementObject.parent().parent().parent().parent().prev().children().next().children().next().next().next().html();

        finalText = $(finalObject).val();
        cursorPosition = $(finalObject).getCursorPosition();
        dataTextSize = finalText.length;

        prefix = finalText.substring(0,cursorPosition)
        postfix = finalText.substring(cursorPosition,dataTextSize)

        text = prefix +'[quote="'+userName+'" ] ' + textData + '[/quote]' + postfix;
        $(finalObject).val( text );
    }

Anonymous,