Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I recently need to do some customization with the Sharepoint's rich text editor. When I looked the Javascript Class Library provided by MSDN, I found it very general also missing some namespace like RTE. I've found some code examples online which use methods like RTE.Cursor.get_range().get_text(). So where did those people find the detail Javascript reference? By reading the source code?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

There is no documented API. However you could run the following command in a browser console to print out all available functions.

var nspace = "SP";
for(var i in eval(nspace))
{
    console.log(i + " = " + eval(nspace+"."+i));
}

This will dump out what is in memory, you can target any namespace you need. Note this works for any javascript library.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.