Opened 8 years ago

Closed 8 years ago

#16955 closed Bug (invalid)

CKeditor generates JS error on 'source' on form element

Reported by: Steven Owned by:
Priority: Normal Milestone:
Component: General Version: 4.6.2
Keywords: javascript error, source, inline editor Cc:

Description

Steps to reproduce

  1. Setup a html page with a form element with CKeditor as an inline editor
  2. activate the editor on a form element
  3. click 'source' button

Expected result

the 'view source' modal

Actual result

An javascript error: TypeError: a.name.replace is not a function

Other details (browser, OS, CKEditor version, installed plugins)

Chrome v57.0.xxxx
OS: Windows
https://www.screencast.com/t/aAfZeKNdY

https://www.screencast.com/t/dPJHLS0lPc

Build plugins: plugins : {

'a11yhelp' : 1, 'basicstyles' : 1, 'bidi' : 1, 'blockquote' : 1, 'ckawesome' : 1, 'ckwebspeech' : 1, 'clipboard' : 1, 'colorbutton' : 1, 'colordialog' : 1, 'contextmenu' : 1, 'dialogadvtab' : 1, 'div' : 1, 'elementspath' : 1, 'enterkey' : 1, 'entities' : 1, 'floatingspace' : 1, 'font' : 1, 'format' : 1, 'forms' : 1, 'horizontalrule' : 1, 'html5validation' : 1, 'htmlwriter' : 1, 'iframe' : 1, 'image' : 1, 'image2' : 1, 'indentblock' : 1, 'indentlist' : 1, 'justify' : 1, 'language' : 1, 'lineheight' : 1, 'link' : 1, 'list' : 1, 'liststyle' : 1, 'magicline' : 1, 'oembed' : 1, 'pastefromword' : 1, 'pastetext' : 1, 'removeformat' : 1, 'selectall' : 1, 'showblocks' : 1, 'showborders' : 1, 'smiley' : 1, 'sourcedialog' : 1, 'specialchar' : 1, 'stylescombo' : 1, 'tab' : 1, 'table' : 1, 'tabletools' : 1, 'toolbar' : 1, 'undo' : 1, 'wsc' : 1, 'wysiwygarea' : 1

},

Config file: CKEDITOR.editorConfig = function( config ) {

Define changes to default configuration here. For example: config.language = 'fr'; config.uiColor = '#0181ae'; config.language = 'en'; config.allowedContent = {

$1: {

Use the ability to specify elements as an object. elements: CKEDITOR.dtd, attributes: true, styles: true, classes: true

}

}; config.height = '80%'; config.resize_enabled = true;

disallowes onclick etc and script config.disallowedContent = 'script; *[on*]; *[javascript:*];vbscript;*[vbscript:*] '; config.enterMode = CKEDITOR.ENTER_BR; config.shiftEnterMode = CKEDITOR.ENTER_P; config.contentsCss = 'https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css'; CKEDITOR.dtd.$removeEmptyspan? = false;

config.removePlugins = ; config.extraPlugins = 'image2,ckawesome,ckwebspeech';

config.fontawesomePath = 'https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css'; config.ckwebspeech = {

'culture' : 'en-us', 'commandvoice' : 'command', trigger voice commands 'commands': [ command list

{'newline': 'new line'}, trigger to add a new line in CKEditor {'newparagraph': 'new paragraph'}, trigger to add a new paragraph in CKEditor {'undo': 'undo'}, trigger to undo changes in CKEditor {'redo': 'redo'} trigger to redo changes in CKEditor

]

};

if ( CKEDITOR.env.ie && CKEDITOR.env.version < 9 )

CKEDITOR.tools.enableHtml5Elements( document );

};

Change History (1)

comment:1 Changed 8 years ago by Marek Lewandowski

Resolution: invalid
Status: newclosed

hi @flechamobile, as far as I understand from desc above, you want to create CKEditor 4 on a <form> element rather than textarea or div which is not supported.

Wrap your form element simply with a div, and that should solve your problem.

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy