Working N1ED and Paragraph modules together
The problem
When you edit the content on some pages in Drupal, sometimes you want to mix different types of content on one page. You want to mix one, two, and three column layouts, attached images, product items and other types of content, etc.
Paragraphs solves the problem
The most popular solution is to use Paragraphs module. It gives you a feature to define some blocks which contain one or more Drupal fields inside. Then you can add them in the contents. You can also set some limits for the blocks: some of them can be added many times, some - just one, the same for fields inside them.
Not too easy to configure and use, but this is a must for all websites with the rich structure on their pages.
N1ED improves and simplifies Paragraphs
N1ED is a plugin for CKEditor. It upgrades CKEditor to let it:
- Create Bootstrap structure
- Insert new widgets inside this structure
- other features (like file manager/image editor) not related to Paragraphs
As far as CKEditor and N1ED run inside blocks of Paragraphs module, they will help you to create a structure inside them. They are very useful when you want to create multiple content blocks with different column numbers (different backgrounds, etc.) going one by one. In this case you do not create new Paragraph blocks, you create new blocks inside CKEditor.
Please see the scheme above to see the difference.
Advantages of this approach:
- Your article editing form is shorter and more simple. Paragraphs module adds a lot of repeating descriptions and unused duplicate buttons to all blocks it creates.
- Your pages load faster. Drupal will store all contents you edit inside CKEditor in one place (as one Paragraph block), so fewer pieces need to find in DB when builds the page for end users.
- You can still mix other types of content. CKEditor with N1ED will power up your HTML editing experience. Paragraphs module helps you with all other kinds of Drupal content.
Lifehack: N1ED has its one block builder for content fields, so if you do not plan to mix HTML content with other types of Drupal entities, you can stay with N1ED only and do not use Paragraphs module at all (and enable it when you really require it).
N1ED installation together with Paragraphs
The order of installation of N1ED and Paragraph modules does not matter. You can also install N1ED to existing websites that use Paragraphs and it will not break them.
The best when you have some Paragraphs type (create it in Administration
-> Structure
-> Paragraphs types
) with the only field of type "Text (formatted, long)". This type of field content will let CKEditor attach it. Limit the number of these fields inside each Paragraph type to 1 (no need to have more, you will add new blocks using N1ED Bootstrap Editor tools). Also please hide the label of this field in options not to show unwanted captions to website visitors.
All other Paragraphs types you will add will be related to something different to HTML contents. For example, attached files or product cards and other Drupal entities managed not by CKEditor.