Problem/Motivation

drupal.js?v=9.2.18:16 Uncaught Error: ace.edit can't find div #edit-field-todo-code-field-0-value-ace-editor

the correct Id would be.
id="edit-field-todo-code-field-wrapper"

Drupal 9.2.18
ACE V2.0

Issue fork ace_editor-3284429

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bennos created an issue. See original summary.

bennos’s picture

Version: 2.0.x-dev » 8.x-1.4

Sorry wrong version. It's V8.1.4

meeni_dhobale’s picture

Assigned: Unassigned » meeni_dhobale

Working on it.

frob’s picture

Is there a reason we don't just attach it to the nearest wrapping div element?

frob’s picture

Assigned: meeni_dhobale » frob

Your branch doesn't have any changes. Looks like all that needs to happen is changing this line https://git.drupalcode.org/issue/ace_editor-3284429/-/blob/3284429-js-lo... to look for the first wrapping div.

I ran into this bug when trying to use the ace editor in layout builder.

frob’s picture

Assigned: frob » Unassigned
rajab natshah’s picture

Version: 8.x-1.4 » 2.0.x-dev
Status: Active » Needs work

Needs an updated issue fork and MR for the 2.0.x branch.

rajab natshah’s picture

Title: JS looks for wrong Div ID. » Fix JS Looking for Wrong Div ID
rajab natshah’s picture

Status: Needs work » Fixed
rajab natshah’s picture

Status: Fixed » Closed (fixed)
rajab natshah’s picture

Status: Closed (fixed) » Fixed

Fixed on 2.0.x: the editor attaches through the .js-form-type-textarea wrapper, and the static-context configuration read in the formatter was corrected, so both problems this issue reported are resolved.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.