Skip to content

Remove wrapping <div>, clean up & refactor#724

Open
samuelpecher wants to merge 8 commits intosandbox-improvementsfrom
clean-up
Open

Remove wrapping <div>, clean up & refactor#724
samuelpecher wants to merge 8 commits intosandbox-improvementsfrom
clean-up

Conversation

@samuelpecher
Copy link
Collaborator

@samuelpecher samuelpecher commented Feb 10, 2026

  • Remove two layers of <div> wrapping, both in the rails helper and in js API's set value()
  • Clean-up value-set unwrapping code
  • Refactor functions used solely within an editor.update() to not create a new update loop
  • Refactor functions using a listener to use the passed state
  • Remove console warnings for WrappedTableNode
  • Turns off stimulus debug

cc @packagethief

Commands execute in an `editor.update` context already
Simplify the code since `editorState.read()` can return a value
Remove `editor.update()` call as the `node` param suggests an existing
update context.
@samuelpecher samuelpecher marked this pull request as ready for review February 10, 2026 18:12
Copy link
Member

@packagethief packagethief left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, @samuelpecher


// Configure Stimulus development experience
application.debug = true
application.debug = false
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/play live

samuelpecher and others added 3 commits February 11, 2026 13:48
ActionText galleries use `<div>`, and would cause any image to become
wrapped in a gallery. Rather than wrap the entire value in a `<div>` and
wrap text nodes which cannot be attached to the root node in a `<p>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments