Hi,
in online help you show how to do a language state transition from HTML to CSS when the "<style>" tag is matched in a HTML document.
But CSS can also be used as "inline" code, e.g. <body style="background-color:red;">
In order to make the language transition, I defined a new state in the HTML language definition:However this does not work as expected. Also the problem is that DefaultState of the CSS language is not the right one here. But defining the state="ValueState" (which is my state for the CSS code within the { }) for the StateTransition - I get an error saying:
"When a child language is specified for a scope state transition, the language's state key must be 'DefaultState'."; but according to the online help, this should work!)
Any idea how I can get this working?
Regards,
Joe
in online help you show how to do a language state transition from HTML to CSS when the "<style>" tag is matched in a HTML document.
But CSS can also be used as "inline" code, e.g. <body style="background-color:red;">
In order to make the language transition, I defined a new state in the HTML language definition:
<!-- Start Tag Attribute String Inline CSS Values -->
<State Key="StartTagAttributeInlineStyleValueState" TokenKey="StartTagAttributeStringValueDefaultToken">
<!-- Scopes -->
<Scopes>
<Scope>
<RegexPatternGroup LookBehind="style" Type="StartScope" TokenKey="StartTagAttributeStringValueStartToken" Style="TagAttributeValueStyle" PatternValue="= {LineTerminatorWhitespaceMacro}* \"" />
<RegexPatternGroup Type="EndScope" TokenKey="StartTagAttributeStringValueEndToken" Style="TagAttributeValueStyle" PatternValue="\"" />
<StateTransition Filename="CSS.xml" ChildLanguageBackColor="WhiteSmoke">
<ExplicitPatternGroup TokenKey="StartTagAttributeStringValueEndToken" Style="TagAttributeValueStyle" PatternValue=""" />
</StateTransition>
</Scope>
</Scopes>
</State>
"When a child language is specified for a scope state transition, the language's state key must be 'DefaultState'."; but according to the online help, this should work!)
Any idea how I can get this working?
Regards,
Joe