Hi All,
I'm using ckeditor inside an aspx page. I want to change the styles definition inside the combo styles of the editor when the user on the "onchange" event of dropdownlist. this is the code:
but it doesn't work? why? the same definition inside the config.js of the editor works fine!
I'm using ckeditor inside an aspx page. I want to change the styles definition inside the combo styles of the editor when the user on the "onchange" event of dropdownlist. this is the code:
// dropdown inside aspx page
<asp:DropDownList ID="ddl_Dominio" runat="server" Width="99%" onchange="javascript:test(this.value);"></asp:DropDownList>
<script type="text/javascript">
$(document).ready(function () {
$('#ckeditor').ckeditor();
$('#ckeditor').val($("#<%= hidCKEDitorValue.ClientID %>").val());
});
function test(idDominio){
var editor = $('#ckeditor').ckeditorGet();
if (idDominio == 20) {
// Casino styles
editor.config.stylesSet = 'my_stylesCasino:../ckeditor/cms_styles/stylesCasino.js';
}
else if (idDominio == 21) {
// Poker styles
editor.config.stylesSet = 'my_stylesPoker:../ckeditor/cms_styles/stylesPoker.js';
}
else if (idDominio == 22) {
// Bingo styles
editor.config.stylesSet = 'my_stylesBingo:../ckeditor/cms_styles/stylesBingo.js';
}
}
</script>but it doesn't work? why? the same definition inside the config.js of the editor works fine!
