SharePoint inserts a special link to a multi-line text field

Source: Internet
Author: User

1. Insert a multi-line text field named content in the test list, for example:

2. Add a link in the content field, for example:

3. Try to enter a link in the Notes format, for example:

4. When you click OK, a message box is displayed, such:

5. Someone may say that you can directly edit the source code of multiple lines of text, such:

6. Click Save and use F12 to view HTML elements, for example:

We can see that the href attribute is out of SharePoint format;

7. Our solution is to add http: // before the Notes link at the time of insertion, such:

8. You can see the HTML elements at the front end. Normally, http: // is added, which is in script format;

9. format the http: // script as follows:

function FormatNotesLink() {    var all = document.getElementsByTagName("a");    for (var i = 0; i < all.length; i++) {        if (all[i].href.indexOf("http://notes//") == 0) {            all[i].href = all[i].href.replace("http://notes//", "notes://");        }    }}setInterval(FormatNotesLink, 500);

10. Use the F12 tool to check whether everything is normal, for example:

11. Some people may say that the customer knows how to add http: // to the front, so that we can modify the dialog box for inserting the link, such:

12. Modify the rtedialog file under layouts, for example:

Location: C: \ Program Files \ common files \ microsoft shared \ Web Server Extensions \ 15 \ template \ layouts

Modify:

Summary

Of course, this is only a small problem encountered during the use of SharePoint. When I encountered this problem, I also went to Google and found that there was a blog with a rewrite of ribbon or multi-line text fields, I think it is too complicated. I thought of this method. If you have friends in need, it would be a small reference.

In addition to links like notes, many other things can also be processed like this, such as scripts. If you are interested, you can try it on your own.

Now, let's take a rest... Take a break...

SharePoint inserts a special link to a multi-line text field

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.