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
Joined: Tue Oct 17, 2017 5:05 pm

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

Post by serioadamo97 »

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: 9018
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu »

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
Post Reply