Hi,
I've created a form with text_format field which have #format value set to CkEditor:
$form['text'] = array(
'#type' => 'text_format',
'#title' => t('HTML'),
'#default_value' => $text,
'#attributes' => array('class' => array('input-settings')),
'#format' => 'ckeditor',
);
Almost everything works fine, but some of features in the CKEditor just freezing if I click on them and return this JavaScript error:
Uncaught TypeError: Failed to execute 'contains' on 'Node': parameter 1 is not of type 'Node'.
For example if I click on the hyperlink for the first time then it works correctly, but for the second time it return the error and freeze: http://prntscr.com/ils3he
Thanks for the help.
Comments
Comment #2
wim leersckeditoris the machine name of a Text Editor, but#formatrequires you to specify a Text Format (or, as it's known internally, aFilterFormatconfig entity ID).So for example
Comment #3
NikaDevs commentedHi,
In my case the "ckeditor" is also a name of the Text Format, which was created by the CkEditor module. So the question is still opened.
Thanks.
Comment #4
wim leersCan you post the stack trace for that JS error?
Also: right now, this is not providing sufficient information to reproduce this problem. Could you provide those steps? Thanks!
Comment #5
NikaDevs commentedHi,
This is the stack trace of the JS error: https://monosnap.com/file/BdrbQrmS4ZEThRht7ZkTarvQpcMwmG
Thanks.
Comment #6
cilefen commentedComment #7
wim leersPlease upload screenshots to d.o issues directly; those external image hosting services usually cease to exist.
Thanks for providing that screenshot of the JS error, but it doesn't allow me to reproduce this problem. I need the actual steps to reproduce this on a fresh Drupal site. Otherwise I can't help you. Hope you understand.
Comment #8
wim leers