2

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?

1

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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