<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Scott,</p>
    <p>I'll add an internal issue to improve the DocumentTypeInformation
      API.</p>
    <p>Possibly a not so elegant approach would be to get access to the
      framework XML file
      "DocumentTypeInformation.getFrameworkStoreLocation()", parse it
      and obtain the information from there. <br>
    </p>
    <p>Regards,</p>
    <p>Radu</p>
    <pre class="moz-signature" cols="72">Radu Coravu
Oxygen XML Editor</pre>
    <p></p>
    <div class="moz-cite-prefix">On 6/14/24 20:05, Scott Prentice wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:316335490.01718384882753.JavaMail.alg@alg">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <p><font face="Verdana">Hi Radu,</font></p>
      <p><font face="Verdana">Thanks! I'll play with the script
          parameter a bit more to see how that works.<br>
        </font></p>
      <p><font face="Verdana">It seems that the </font>DocumentTypeInfo
        API is different than the DocumentTypeInformation API. I'm
        trying to get the active framework's "Description", which is
        available from DocumentTypeInfo.getDescription() but not
        DocumentTypeInformation.getDescription(). Interestingly,
        DocumentTypeInformation.getName() does work.</p>
      <p>Any ideas on how to access the framework description from the
        authorAccess object?</p>
      <p>Thanks,</p>
      <p>Scott<br>
      </p>
      <div class="moz-cite-prefix">On 6/13/24 9:39 PM, Oxygen XML Editor
        Support (Radu Coravu) wrote:<br>
      </div>
      <blockquote type="cite"
        cite="mid:34c27347-6233-4094-b87f-df57a9bc675a@oxygenxml.com">
        <meta http-equiv="Content-Type"
          content="text/html; charset=UTF-8">
        <p>Hi Scott,</p>
        <p>So the "script" parameter should be a piece of Javascript
          content. For example you can pass as value of the "script"
          parameter this entire Javascript code here:</p>
        <p><a class="moz-txt-link-freetext"
href="https://github.com/oxygenxml/javascript-sample-operations/blob/master/copy-xml-to-clipboard/copy-xml-to-clipboard.js"
            moz-do-not-send="true">https://github.com/oxygenxml/javascript-sample-operations/blob/master/copy-xml-to-clipboard/copy-xml-to-clipboard.js</a></p>
        <p>To the value passed using "script" we add the entire
          Javascript from the "commons.js". So I guess in your case you
          have placed the entire content in the "commons.js" and passed
          an empty "script" parameter, which should also work as long as
          you have a "doOperation()" function.</p>
        <p>About accessing the DocumentTypeInfo API, your script has
          global access to an object named "authorAccess" which maps to
          this Java class:</p>
        <p><a class="moz-txt-link-freetext"
href="https://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/ecss/extensions/api/AuthorAccess.html"
            moz-do-not-send="true">https://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/ecss/extensions/api/AuthorAccess.html</a></p>
        <p>So something like this in the JS code:</p>
        <p>authorAccess.getEditorAccess().getDocumentTypeInformation()</p>
        <p>should give you access to this Java class:</p>
        <p><a class="moz-txt-link-freetext"
href="https://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/exml/workspace/api/editor/documenttype/DocumentTypeInformation.html"
            moz-do-not-send="true">https://www.oxygenxml.com/InstData/Editor/SDK/javadoc/ro/sync/exml/workspace/api/editor/documenttype/DocumentTypeInformation.html</a></p>
        <p>That similar
          "ro.sync.ecss.extensions.api.webapp.doctype.DocumentTypeInfo"
          API that you wanted access to is specific for our web author
          in browser editor tool.<br>
        </p>
        <p>Regards,</p>
        <p>Radu</p>
        <pre class="moz-signature" cols="72">Radu Coravu
Oxygen XML Editor</pre>
        <div class="moz-cite-prefix">On 6/13/24 19:48, Scott Prentice
          wrote:<br>
        </div>
        <blockquote type="cite"
          cite="mid:316335490.01718297462750.JavaMail.alg@alg">
          <meta http-equiv="Content-Type"
            content="text/html; charset=UTF-8">
          <p><font face="Verdana">Thanks, Radu.</font></p>
          <p><font face="Verdana">I have a couple questions.</font></p>
          <p><font face="Verdana">It's not clear to me how the "script"
              parameter works with the JSOperation class. I assume it
              can be used to pass in values to the code in commons.js,
              but I'm not seeing how you'd do that. Can you point me to
              any examples?</font></p>
          <p><font face="Verdana">Also. I see that commons.js has access
              to the AuthorAccess API. I'd like to access </font>DocumentTypeInfo
            interface
            (ro.sync.ecss.extensions.api.webapp.doctype.DocumentTypeInfo)
            .. can I do that from commons.js? I've tried a few things,
            without much success.<br>
          </p>
          <p>Thanks!</p>
          <p>Scott<br>
          </p>
          <p><br>
          </p>
          <div class="moz-cite-prefix">On 6/12/24 8:27 PM, Oxygen XML
            Editor Support (Radu Coravu) wrote:<br>
          </div>
          <blockquote type="cite"
cite="mid:65277cef-b020-46de-850b-ccf72f7dcc2c@oxygenxml.com">
            <meta http-equiv="Content-Type"
              content="text/html; charset=UTF-8">
            <p>Hi Scott,</p>
            <p>Right. We do not have a special Author operation to show
              a message to the end user.</p>
            <p>This operation could be used to open a web page if for
              example you want to present to the end user the
              information in a web browser:</p>
            <p><a class="moz-txt-link-freetext"
href="https://www.oxygenxml.com/doc/versions/26.1/ug-editor/topics/dg-default-author-operations.html#dg-default-author-operations__openinsystemappoperation"
                moz-do-not-send="true">https://www.oxygenxml.com/doc/versions/26.1/ug-editor/topics/dg-default-author-operations.html#dg-default-author-operations__openinsystemappoperation</a><br>
            </p>
            <p>Regards,<br>
              Radu</p>
            <pre class="moz-signature" cols="72">Radu Coravu
Oxygen XML Editor</pre>
            <div class="moz-cite-prefix">On 6/13/24 03:06, Scott
              Prentice wrote:<br>
            </div>
            <blockquote type="cite"
              cite="mid:316335490.01718237283020.JavaMail.alg@alg">
              <meta http-equiv="Content-Type"
                content="text/html; charset=UTF-8">
              <font face="Verdana">If you're interested, here's one way
                to do this. I'm sure there's a more elegant way and this
                is probably a bit if a hack, but it does what I need
                right now.</font>
              <p>1. In. your framework's Document Type dialog, on the
                Author:Actions subtab, add an action to the framework,
                give it an ID and a Name.<br>
                2. In the Action dialog select this Operation:
                ro.sync.ecss.extensions.commons.operations.JSOperation<br>
                3. A 'script' argument will be added, leave the value
                empty.<br>
                4. Choose OK. (Leave the Document Type dialog up for
                now.)<br>
                5. Create a commons.js file in the root of your
                framework directory, with the following content ..</p>
              <p>    function doOperation(){<br>
                        parentFrame = authorAccess.getParentFrame();<br>
                       
                javax.swing.JOptionPane.showMessageDialog(parentFrame,
                "MESSAGE HERE");<br>
                    }</p>
              <p>6. In the Document Type dialog, on the Author:Menu
                subtab, add your new action to your menu (assuming one
                exists).<br>
                7. Choose OK, then OK.</p>
              <p>Open a document in Author view that uses your
                framework. You should see the new menu item.</p>
              <p>Clearly, if you're already using the commons.js file
                for something else, you'll need to pass in some
                parameter and tweak the JS code .. but this is a start. 
                :-)<br>
              </p>
              <p>Cheers,</p>
              <p>Scott<br>
              </p>
              <div class="moz-cite-prefix">On 6/12/24 1:32 PM, Scott
                Prentice wrote:<br>
              </div>
              <blockquote type="cite"
cite="mid:9323604e-9f69-4d1d-9243-c8e134084e16@leximation.com">
                <meta http-equiv="content-type"
                  content="text/html; charset=UTF-8">
                <p><font face="Verdana">Hi,</font></p>
                <p><font face="Verdana">Is there a built-in method for
                    creating an action (to call from a toolbar or menu)
                    that displays a simple dialog that contains
                    informational text? I'd like to have an "About"
                    dialog that's associated with a framework. I assume
                    I can do this by creating a custom class, but wanted
                    to see if there was an OOB option for this.</font></p>
                <p><font face="Verdana">Thanks!</font></p>
                <p><font face="Verdana">Scott</font></p>
                <p><font face="Verdana"><br>
                  </font></p>
                <p><font face="Verdana"><br>
                  </font></p>
                <br>
                <fieldset class="moz-mime-attachment-header"></fieldset>
                <pre class="moz-quote-pre" wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
                href="mailto:oXygen-user@oxygenxml.com"
                moz-do-not-send="true">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext"
href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user"
                moz-do-not-send="true">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
              </blockquote>
              <br>
              <fieldset class="moz-mime-attachment-header"></fieldset>
              <pre class="moz-quote-pre" wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
              href="mailto:oXygen-user@oxygenxml.com"
              moz-do-not-send="true">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext"
href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user"
              moz-do-not-send="true">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
            </blockquote>
            <br>
            <fieldset class="moz-mime-attachment-header"></fieldset>
            <pre class="moz-quote-pre" wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
            href="mailto:oXygen-user@oxygenxml.com"
            moz-do-not-send="true">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext"
href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user"
            moz-do-not-send="true">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
          </blockquote>
          <br>
          <fieldset class="moz-mime-attachment-header"></fieldset>
          <pre class="moz-quote-pre" wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
          href="mailto:oXygen-user@oxygenxml.com" moz-do-not-send="true">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext"
          href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user"
          moz-do-not-send="true">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
        </blockquote>
        <br>
        <fieldset class="moz-mime-attachment-header"></fieldset>
        <pre class="moz-quote-pre" wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated moz-txt-link-freetext"
        href="mailto:oXygen-user@oxygenxml.com" moz-do-not-send="true">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext"
        href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user"
        moz-do-not-send="true">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
      </blockquote>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
oXygen-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:oXygen-user@oxygenxml.com">oXygen-user@oxygenxml.com</a>
<a class="moz-txt-link-freetext" href="https://www.oxygenxml.com/mailman/listinfo/oxygen-user">https://www.oxygenxml.com/mailman/listinfo/oxygen-user</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">
</pre>
  </body>
</html>