Book a Demo

Author Topic: edit hyperlink details in notes  (Read 4172 times)

Pawel Jasinski

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
edit hyperlink details in notes
« on: March 03, 2012, 08:52:03 am »
hi,

When I add a class, than add a hyperlink to the notes, is there a way to change the hyperlink or at least to show where the hyperlink is pointing?

I have tried:
- context menu (nothing relevant there)
- double click (nothing happens)
- ctrl click (follows the link ok)
... some other ctrl/alt/shift click (no luck)
- highlight the link and click link button (it adds new link)


If I copy/paste content of the notes into word, links are preserved and can be edited with Ctrl-K.

Cheers,
Pawel


qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: edit hyperlink details in notes
« Reply #1 on: March 04, 2012, 12:32:18 am »
I don't have an answer but it sounds like EAUI. Wait a couple of days and if nobody else knows an answer send a bug report.

q.

carolin.boeckler

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: edit hyperlink details in notes
« Reply #2 on: March 22, 2012, 06:07:34 pm »
I also recognized this. I guess it is a bug.
But there is one possibility to see the URL.
Install EnarSpy: http://blog.lieberlieber.com/2011/03/01/free-tool-enar-spy-for-enterprise-architect/
Go on the element with the link - right mouse button - extensions - enarspy - element details
in notes you see the html-tag <a href="...">
Bye, Caro

Pawel Jasinski

  • EA User
  • **
  • Posts: 29
  • Karma: +0/-0
    • View Profile
Re: edit hyperlink details in notes
« Reply #3 on: March 22, 2012, 08:00:49 pm »
I had enar-spy installed (mainly to look at internal object ids). Thanks for the hint.
We plan to put together a plugin to allow for html edit in notes as well as in memo fields of a tagged value. As far as I can tell it will be open sourced.
--pawel

carolin.boeckler

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
    • View Profile
Re: edit hyperlink details in notes
« Reply #4 on: March 23, 2012, 06:16:21 pm »
I have already my own dll.
Here one little part, maybe it will help you.
In TextNotes is only the notes in html and webBrowser1 shows only the images.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.Text.RegularExpressions;
using System.Xml;

namespace MyModel{
    public partial class ShowNotes : Form
    {
        public ShowNotes()
        {
            InitializeComponent();

        }

        public ShowNotes(String Notes, EA.Repository Rep)
        {

            InitializeComponent();
            String NotesHTML=Notes;
            String Output = "";
             XmlDocument xde = new XmlDocument();
             xde.LoadXml("<html>"+Notes+"</html>");
 
             XmlNodeList Nodelist_tag_a = xde.GetElementsByTagName("a");

             foreach (XmlNode Node_tag_a in Nodelist_tag_a)
             {
                 string imagurl = Node_tag_a.Attributes.GetNamedItem("href").Value;
                 string imagurl1 = imagurl.Replace("\\", "\\\\");
                 string[] kindofurl = imagurl.Split('.');
                 bool website = imagurl.StartsWith("$inet://");
                 bool diagram = imagurl.StartsWith("$diagram://");
                 bool element = imagurl.StartsWith("$element://");
                 string endung = kindofurl.Last();
                 if (endung.ToLower() == "png" || endung.ToLower() == "gif" || endung.ToLower() == "jpg" || endung.ToLower() == "jpeg" || endung.ToLower() == "bmp")
                 {
                     Output += Node_tag_a.InnerText+"<br><img src=\""+imagurl+"\" width=350><br>";
                 }
                 if (endung.ToLower() == "pdf")
                 {
                     Output += Node_tag_a.InnerText + ": " + "<a href=\"" + imagurl + "\">Pdf</a>(Right mouse button 'Link speichern unter' or 'Verknüpfung kopieren')<br>";
                 }
                 if (website)
                 {
                     imagurl = imagurl.Replace("$inet://https://", "https://");
                     imagurl = imagurl.Replace("$inet://http://", "http://");
                     imagurl = imagurl.Replace("$inet://", "http://");
                     Output +=  Node_tag_a.InnerText + ": <a href=\"" + imagurl + "\" target=_blank>Link</a><br>";
                 }
                 if (diagram)
                 {
                     imagurl = imagurl.Replace("$diagram://", "");
                     EA.Diagram Diagram = (EA.Diagram)Rep.GetElementByGuid(imagurl);
                     Output += Node_tag_a.InnerText + ": "+ Diagram.Name + " (diagram name) " ;
                 }
                 if (element)
                 {
                     imagurl = imagurl.Replace("$element://", "");
                     EA.Element Element = (EA.Element)Rep.GetElementByGuid(imagurl);
                     Output += Node_tag_a.InnerText + ": " + Element.Name + " (element name) " + Element.Alias + " (element alias)";
                 }
             }

             webBrowser1.DocumentText = Output ;
                  TextNotes.Text = NotesHTML + "\n\n"+ Output;
             TextNotes.Select(0, 0);

                        

        }
        private void ShowNotes_Load(object sender, EventArgs e)
        {


        }
    }
}
« Last Edit: March 23, 2012, 06:19:55 pm by carolin.boeckler »

skiwi

  • EA Expert
  • ****
  • Posts: 2081
  • Karma: +46/-82
    • View Profile
Re: edit hyperlink details in notes
« Reply #5 on: March 27, 2012, 12:29:15 pm »
Quote
hi,
When I add a class, than add a hyperlink to the notes, is there a way to change the hyperlink or at least to show where the hyperlink is pointing?

I have tried:
- context menu (nothing relevant there)
- double click (nothing happens)
- ctrl click (follows the link ok)
... some other ctrl/alt/shift click (no luck)
- highlight the link and click link button (it adds new link)


If I copy/paste content of the notes into word, links are preserved and can be edited with Ctrl-K.

Cheers,
Pawel

This sort of problem is not new,
see
Hyperlink in RTF document
Hyperlinks in NOTES
Orthogonality rules
Position and Team disestablished, thanks austerity.
Now itinerant.