Page 1 of 1

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

Posted: Fri Feb 23, 2018 7:35 pm
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.

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

Posted: Mon Feb 26, 2018 5:01 pm
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