I am receiving style
information from the backend, but it includes an unwanted prefix. I need to remove this prefix and keep only the necessary styling. Can you suggest the correct approach?
This is the current style code I am obtaining:
<style>
043BF83A8FB24A418DA4248840101DE5 .cls_0 {
font:26px 'Arial';
color:rgb(0,0,0);
font-weight:bold;
}
043BF83A8FB24A418DA4248840101DE5 .cls_1 {
font:26px 'Arial';
color:rgb(0,0,0);
}
043BF83A8FB24A418DA4248840101DE5 .cls_11 {
font:13px 'Arial';
color:rgb(0,0,0);
}
043BF83A8FB24A418DA4248840101DE5 .cls_12 {
font:16px 'Arial';
color:rgb(0,0,0);
font-weight:bold;
}
043BF83A8FB24A418DA4248840101DE5 .cls_13 {
font:16px 'Arial';
color:rgb(0,0,0);
}
</style>
This is the expected style code:
<style>
.cls_0 {
font:26px 'Arial';
color:rgb(0,0,0);
font-weight:bold;
}
.cls_1 {
font:26px 'Arial';
color:rgb(0,0,0);
}
.cls_11 {
font:13px 'Arial';
color:rgb(0,0,0);
}
.cls_12 {
font:16px 'Arial';
color:rgb(0,0,0);
font-weight:bold;
}
.cls_13 {
font:16px 'Arial';
color:rgb(0,0,0);
}
</style>
My attempt, which is not successful:
var styleText = $('style').get(1).html();
console.log(styleText); //throws error "Uncaught TypeError: undefined is not a function"