Skip to content

Create a new block when the user presses return#187

Closed
matthias-g wants to merge 1 commit intobasecamp:masterfrom
matthias-g:master
Closed

Create a new block when the user presses return#187
matthias-g wants to merge 1 commit intobasecamp:masterfrom
matthias-g:master

Conversation

@matthias-g
Copy link
Copy Markdown

With this change a new block is created when the user presses the return key.

This makes it possible to use Trix.config.blockAttributes.default.tagName = "p" to use <p> tags instead of <div> tags and have a new paragraph created by pressing return (see #117).
Pressing shift + return creates just a newline.

@gitviola
Copy link
Copy Markdown

+1

@marcek
Copy link
Copy Markdown

marcek commented Apr 14, 2016

👍

@divyenduz
Copy link
Copy Markdown

Is this likely to be merged anytime soon ?

@ghost
Copy link
Copy Markdown

ghost commented Feb 3, 2017

+1

@gregblass
Copy link
Copy Markdown

Thanks for this!

@andresgutgon
Copy link
Copy Markdown

+1

@andresgutgon
Copy link
Copy Markdown

If you need to add a WYIWG editor to your rails app http://quilljs.com/ produce <p> as block. There is also this gem which is a fork of original gem with latest http://quilljs.com JS https://github.com/factorialco/quill-rails

@dankmitchell
Copy link
Copy Markdown

+1

@toufali
Copy link
Copy Markdown

toufali commented Jan 16, 2018

For reference we tried to implement this fix manually, but it's possible the fix references a function that no longer exists. We had to move onto an alternate solution because paragraphs wrapped in divs are a deal-breaker for us 😞

@stale
Copy link
Copy Markdown

stale bot commented Sep 17, 2018

This pull request has been automatically marked as stale after 90 days of inactivity. It will be closed if no further activity occurs.

@ghost
Copy link
Copy Markdown

ghost commented Feb 5, 2019

Any chance of his being merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants