How to make a plugin that open a HTML inside a webview in intellij

Hello, good day

I am using the IDEA Ultimate to modify the XML of a project that uses a generator where each tag is a user configuration, for these tags I have associated documentation of how to use it.
What I want to do is a plugin that opens a webview to the HTML of the information inside the intellij, and when i click a tag I change the link to show me the information of that tag, but the problem I have is I'm not fully understanding the documentation and I'm pretty lost.
I there a example plugin to see how it is done, if it can be something similar to what i want to do better, so I understand a little better how I can do it

Thank you so much

PD: Sorry for my poor english

0

Hello,

If I understood you correctly, you want to provide a documentation from an external source for XML elements. Do do that you'll need to implement your com.intellij.lang.documentation.DocumentationProviderEx with com.intellij.lang.documentation.ExternalDocumentationProvider.

You can find an example here

0
Avatar
Permanently deleted user

Hi Dennis,

is correct, the XML documentation is in HTML for each tag and I want to be able to display it in the same editor, either with an internal browser and with a window.

The link that you passed help me clarified some doubts and i found a plugin made for quickdoc to serve as a basis for understanding the structure of the plugin.

The whole project of what I want to do is:

  1. You have a list of HTML tags in a tab, in the docker, that can mark the ones that I will do
  2. When entering an option in the list, identified with the tag, this tag is highlighted in the editor in the XML
  3. Then you can go to quickdoc to see how to use it, but it has to be in HTML


Do you know if it is possible to display simple HTML in the quickdoc, instead of using the javadoc format?

Thank you very much for the help

0

Sorry, this is the proper method.

Yes, you can use simple HTML formatting

0
Avatar
Permanently deleted user

Is there something to activate in the intellij so I can display HTML in the quickdoc?
What I did was add the HTML in the xs: documentation tag of the XSD as follows:

                    <xs:element name="nombrePantalla" type="xs:string" minOccurs="1">
<xs:annotation>
<xs:documentation>
<![CDATA[
<p>Dentro del generador hacemos click sobre la carpeta &ldquo;<strong>XML Productos</strong>&rdquo;, apretamos <strong>CTRL+SHIFT+F</strong> e &nbsp;ingresamos el nombre de la vista o campo</p><p><img class="fr-dib fr-draggable fr-fil" src="/modelo/uploads/b69b0af2b6ca5021e58c48f8164c4ad1257c7385.blob" style="width: 805px; height: 493.952px;"></p><p><!--[if !vml]--> NOTA: la opci&oacute;n &ldquo;<strong>File Mask</strong>&rdquo; debe de esta desmarcada</p><p><br></p>
]]>
</xs:documentation>
</xs:annotation>
</xs:element>


But when I open it with CTRL + Q in the XML it does not show me the HTML, just plain text

0
Avatar
Permanently deleted user

I finally make it Works, my error was i was using CDATA in xs:documentation tag, now i getting the HTML correctly in quickdoc

0

请先登录再写评论。