CkEditor how to pass config

0
0

Hi,

I need that my editor don’t encode HTML, need to put this config

CKEDITOR.config.basicEntities = false;
CKEDITOR.config.entities = false;
CKEDITOR.config.entities_greek = false;
CKEDITOR.config.entities_latin = false;
CKEDITOR.config.htmlEncodeOutput = false;
CKEDITOR.config.entities_processNumerical = false;

in visual studio I do:

this.ckEditor1.Options.config = new[] { “basicEntities = false”, “entities = false” , “entities_latin = false”,”htmlEncodeOutput = false”,”entities_processNumerical” };

but don’t work… where am I wrong?

best

Cristian Zerbinati

  • You must to post comments
0
0

Hi Cristian,

You can put the values directly in the CKEditor’s Options configuration (don’t nest it with config). You can either add them from the control’s Options configuration in the Designer or add them in code like this:

 this.ckEditor1.Options = new { basicEntities = false, entities = false, entities_latin = false, htmlEncodeOutput = false, entities_processNumerical = true };

 

You can check that the values are applied correctly in the Appear event of the CKEditor with something like this:

private void ckEditor1_Appear(object sender, EventArgs e)
{
    this.ckEditor1.Eval("this.editor.config.basicEntities", (r) =>
    {
        AlertBox.Show(r.ToString());
    });
}

 

HTH,

Levie

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.