Is it possiable to make Content-Completion support inline/embedded language?

Post here questions and problems related to oXygen frameworks/document types.
serioadamo97
Posts: 22

Is it possiable to make Content-Completion support inline/embedded language?

Fri Feb 23, 2018 7:35 pm

Hi all,
After reading documents from the website, I learned how to developed a plugin which can customize Content-Completion. (Also it can be implemented by cc_config.xml in framework)

However, I want to get more.
Is it possiable to make Content-Completion support inline/embedded language?

Example 1:

Code: Select all

<html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <p style="color: green; font-size: 200%"> To demonstrate specificity </p>
  </body>
</html>


In this example, css was embedded in @style.
Is it possiable to implement Content-Completion when user write css in @style attribute value?

Example 2:

Code: Select all

<html>
<body>
<button onclick="test()">button</button>
<script>
function test(){
   alert('hello!');
}
</script>
</body>
</html>


In this example, javascript was embedded in both tag <script> and @onclick.
Is it possiable to implement Content-Completion when user write javascript in @style tag <script> and @onclick?

PS: In VSCode, we can implement this feature by developing Language Server.
Is there any similar concept in Oxygen XML SDK?
Thanks.
Radu
Posts: 5867

Re: Is it possiable to make Content-Completion support inline/embedded language?

Mon Feb 26, 2018 5:01 pm

Hi,

Sorry but we do not have specific API for this in the SDK.
Maybe one possibility would be for you to add a custom side view which would show the CSS or javascript fragment for the current element, allow editing it with enhanced support using your own code and then you could modify the XML document accordingly.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Return to “SDK-API, Frameworks - Document Types”

Who is online

Users browsing this forum: No registered users and 0 guests