1

I am trying to implement a solution to allow our staff to easily add references to documents contained within our DMS. I have been following http://sharepointblog.buus-oestergaard.dk/post/Creating-Notes-links-in-SharePoint-2010s-Rich-Text-Editor-(RTE) and have been able to get to the stage of being presented with a modal window which the user can enter text and a hyperlink.

When clicking OK the page errors with the message Object doesnt support property or method $9H.

The error is in some JavaScript that is calling RTE.RteUtility:

$Dq_0: function ($p0, $p1) {
 if ($p0 === 1) {
  var $v_0 = $p1;
  var $v_1 = $v_0[0];
  var $v_2 = $v_0[1];
  // Error on the proceeding line
  if (RTE.RteUtility.$9H($v_2, false)) {
   var $v_3 = RTE.Cursor.get_range();
   var $v_4 = $v_3.parentElement();
   if (!$v_4) {
    return;
   }
   var $v_5 = $v_4.ownerDocument.createElement('A');
   $v_5.href = $v_2;
   if ($v_3.isEmpty()) {
    SP.UI.UIUtility.setInnerText($v_5, ($v_1.trim() !== '') ? $v_1 : $v_2);
    $v_3.insertBefore($v_5);
   } else {
    if ($v_1.trim() !== '') {
     $v_3.replaceHtml($v_1);
    }
    $v_3.wrapRange($v_5);
   }
   $v_3.moveToEndOfNode($v_5);
   RTE.Cursor.update();
   RTE.RteUtility.showRibbonTab('Ribbon.Link', 'LinkTab');
  }}

Based on encountering problems with these $9H type methods being different between the above referenced blog post (SharePoint 2010) and my SharePoint, I figure I have to change the $9H to another method, however I am not sure what this piece of code is doing or which method I should be using.

I haven't been able to find much information on the RteUtility which concerns me that this isn't supported or the ideal way of achieving what I am wanting.

To explain what I would like to implement, I want the user to be able to insert a link with the notes:// protocol which when clicked will be picked up by the local installation of Lotus Notes and open documents. I understand that SharePoint prevents any custom protocols from being used.

Ideally I would like a solution which will be maintainable and isn't likely to be overwritten when SharePoint is updated. The few solutions I have found which recommend modifying core.js and a heap of other files isn't what I would like to pursue (if possible).

Is anyone aware of documentation on the RteUtility or able to provide assistance with how I can overcome this problem? Or does anyone have any ideas on alternatives to achieve what I am seeking?

  • You should not base your code on $v_nbr and similar parameters. The are not officially documented and hence not supported to use (they may break on any update) – Robert Lindgren Oct 24 '14 at 10:45
  • Thanks Robert, are you able to offer any suggestions on how to implement what I am after? – Lima Oct 25 '14 at 3:20
  • Did you ever figure this out? – bgmCoder Dec 3 '15 at 22:16
  • Yeah, got a solution working. I don't have access to it at the moment and will update this question on Monday. – Lima Dec 5 '15 at 8:21

Your Answer

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

Browse other questions tagged or ask your own question.