Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GHS] There was a problem initializing the editor. TypeError: target[key] is not iterable #10951

Closed
theezeb opened this issue Dec 4, 2021 · 1 comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:bug This issue reports a buggy (incorrect) behavior.

Comments

@theezeb
Copy link

theezeb commented Dec 4, 2021

📝 Provide detailed reproduction steps (if any)

  1. Enable GHS plugin with enabled all HTML features.
  2. Use this HTML data in editor(I'm using decoupled-document)
<p><span id='1'><span class='wrapped manual-map' id='2'>hello</span></span></p>
  1. it will throw error
  2. Use this HTML data
<p><span class='wrapped manual-map' id='1'><span id='2'>hello</span></span></p>
  1. It works.

✔️ Expected result

<p><span id='1'><span class='wrapped manual-map' id='2'>hello</span></span></p>

❌ Actual result

image

❓ Possible solution

If you have ideas, you can list them here. Otherwise, you can delete this section.

📃 Other details

  • Browser: Chrome
  • OS: Ubuntu 20.0.4 LTS
  • First affected CKEditor version: v31.0.0
  • Installed CKEditor plugins:
Plugin config
/**
 * @license Copyright (c) 2003-2021, CKSource - Frederico Knabben. All rights reserved.
 * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
 */

// The editor creator to use.
import DecoupledEditorBase from '@ckeditor/ckeditor5-editor-decoupled/src/decouplededitor';

import Essentials from '@ckeditor/ckeditor5-essentials/src/essentials';
import FontSize from '@ckeditor/ckeditor5-font/src/fontsize';
import FontFamily from '@ckeditor/ckeditor5-font/src/fontfamily';
import FontColor from '@ckeditor/ckeditor5-font/src/fontcolor';
import FontBackgroundColor from '@ckeditor/ckeditor5-font/src/fontbackgroundcolor';
import Autoformat from '@ckeditor/ckeditor5-autoformat/src/autoformat';
import Bold from '@ckeditor/ckeditor5-basic-styles/src/bold';
import Italic from '@ckeditor/ckeditor5-basic-styles/src/italic';
import Strikethrough from '@ckeditor/ckeditor5-basic-styles/src/strikethrough';
import Underline from '@ckeditor/ckeditor5-basic-styles/src/underline';
import Heading from '@ckeditor/ckeditor5-heading/src/heading';
import Indent from '@ckeditor/ckeditor5-indent/src/indent';
import IndentBlock from '@ckeditor/ckeditor5-indent/src/indentblock';
import Link from '@ckeditor/ckeditor5-link/src/link';
import List from '@ckeditor/ckeditor5-list/src/list';
import ListStyle from '@ckeditor/ckeditor5-list/src/liststyle';
import Paragraph from '@ckeditor/ckeditor5-paragraph/src/paragraph';
import PasteFromOffice from '@ckeditor/ckeditor5-paste-from-office/src/pastefromoffice';
import SourceEditing from '@ckeditor/ckeditor5-source-editing/src/sourceediting';
import GeneralHtmlSupport from '@ckeditor/ckeditor5-html-support/src/generalhtmlsupport';

export default class DecoupledEditor extends DecoupledEditorBase { }

// Plugins to include in the build.
DecoupledEditor.builtinPlugins = [
	Essentials,
	FontSize,
	FontFamily,
	FontColor,
	FontBackgroundColor,
	Autoformat,
	Bold,
	Italic,
	Strikethrough,
	Underline,
	Heading,
	Indent,
	IndentBlock,
	Link,
	List,
	ListStyle,
	Paragraph,
	PasteFromOffice,
	SourceEditing,
	GeneralHtmlSupport,
];

// Editor configuration.
DecoupledEditor.defaultConfig = {
	toolbar: {
		items: [
			'heading',
			'|',
			'sourceEditing',
			'fontfamily',
			'fontsize',
			'fontColor',
			'fontBackgroundColor',
			'|',
			'bold',
			'italic',
			'underline',
			'strikethrough',
			'|',
			'numberedList',
			'bulletedList',
			'|',
			'undo',
			'redo'
		]
	},
	htmlSupport: {
		allow: [
			{
				name: /^(div|section|span)$/,
				attributes: true,
				classes: true,
				styles: true
			}
		]
	},
	// This value must be kept in sync with the language defined in webpack.config.js.
	language: 'en'
};
---

If you'd like to see this fixed sooner, add a 👍 reaction to this post.

@theezeb theezeb added the type:bug This issue reports a buggy (incorrect) behavior. label Dec 4, 2021
@theezeb theezeb changed the title [GHS]There was a problem initializing the editor. TypeError: target[key] is not iterable [GHS] There was a problem initializing the editor. TypeError: target[key] is not iterable Dec 4, 2021
@FilipTokarski
Copy link
Member

Hi, thanks for the report. This case looks like it's a duplicate of #10657, closing.

@FilipTokarski FilipTokarski added the resolution:duplicate This issue is a duplicate of another issue and was merged into it. label Dec 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution:duplicate This issue is a duplicate of another issue and was merged into it. type:bug This issue reports a buggy (incorrect) behavior.
Projects
None yet
Development

No branches or pull requests

2 participants