Code

Discussion on Visual editor - A drupal 8.x/9.x page/block builder

Discussion on Visual editor - A drupal 8.x/9.x page/block builder

Cart 109 sales

drupalthemez supports this item

Supported

70 comments found.

Hey there I would like to have columnComponent to have an inner div for positioning porpuses. <div class="col-lg-6 col-md-6 col-sm-6 col-xs-12"> <div class="column-inner"> Other components goes here </div> <div> is there a way to edit the file to achieve this. Thanks </div></div>

I See. I know that I can do that but I am creating custom components and I kind of need to set an image field (select/upload) and get the plain URL to use it on twig template. So starting from image Component, instead of rendering the whole img tag I need only its url (image_format applied, so it can be set).

<?php /** * @file * Contains \Drupal\visual_editor\Plugin\VisualEditorComponent\ImageComponent. */ namespace Drupal\visual_editor\Plugin\VisualEditorComponent; use Drupal\visual_editor\VisualEditorBase; use Drupal\Core\Form\FormStateInterface; use Drupal\file\Entity\File; /** * Provides a 'image' visual editor compoent. * * @VisualEditorComponent( * id = "image", * type = "widget", * name = @Translation("Image"), * description = @Translation("Place image in content"), * iconClass = "fa fa-picture-o", * ) */ class ImageComponent extends VisualEditorBase { public function buildForm(array &$form, FormStateInterface $form_state, array $settings) { $content = $settings['content']; $styles = \Drupal::entityTypeManager()->getStorage('image_style')->loadMultiple(); $image_styles = []; foreach ($styles as $style) { $image_styles[$style->id()] = $style->getName(); } $content = $settings['content']; $fids = $form_state->getValue([ 'content', 'media', 'fids', 'entity_ids', ]); $files = []; $content['media']['table'] = empty($content['media']['table'])?[]:$content['media']['table']; if (!empty($fids)) { $files = \Drupal::service('plugin.manager.visual_editor')->getFids($fids); } else { $files = array_keys($content['media']['table']); } $form['content']['media'] = \Drupal::service('plugin.manager.visual_editor')->browserForm($files, $content['media']['table']); $form['content']['image_format'] = [ '#type' => 'select', '#title' => t('Image format'), '#options' => $image_styles, '#empty_option' => t('- None -'), '#default_value' => isset($content['image_format']) ? $content['image_format'] : '', ]; } public function render($settings){ $content = $settings['content']; if(isset($content['fid']) || isset($content['media_upload']['image'][0])){ $fid = !empty($content['fid'])?$content['fid']:$content['media_upload']['image'][0]; $build = parent::getBuild($settings); $files = !empty($content['media']['table']) ? array_keys($content['media']['table']) : []; if (!empty($files)) { foreach ($files as $key => $file) { $file_data = $content['media']['table'][$file]; $file = File::load($fid); $path = $file->getFileUri(); if (!empty($content['image_format'])) { $image['#theme'] = 'image_style'; $image['#style_name'] = $content['image_format']; } else { $image['#theme'] = 'image'; } $image['#uri'] = $path; $build['#content'][$key]['path'] = $image; } } } return $build; } } and use it like this style="background-image:url('{{ content.image }}');"

DO NOT LAUGH! :)

Hi,

I have installed this module but when i try to click on + symbol nothing working.

https://screenshots.firefox.com/YZYEPkIpnoMjMcYA/www.spectrait.net

Can we have a call? Sharing my contact number using support@drupalthemez.com

As of now there is no way to insert webform inside container. But we will update you soon on the same.

Thanks every thing is working fine

Hello! I am using your visual editor but is not working right. I am doing 4 columns with images but in the front end I just see 3 columns and the 4 is broken… Could you help me?

Hi,

Please check if column settings for desktop are applied as col-lg-3. Also check if you have added any additional class/style to col which has margin on left/right.

If possible, can you share a fronted link?

Hi, Just a few feature requests… 1. Ability to label to or preview row/colums/content – when you build a big page, it gets really confusing to know what is where. Ex. https://www.screencast.com/t/DGwk7aCOvc

2. Ability to move content/columns between rows. I started creating rows, but then realized I needed Wrapped rows, so I had to start all over because I could not just move columns/content between rows

3. Add “Update settings and Close” button at bottom – to exit out of the window.

Overall, you did a fantastic job on this module!

Thank you for your valuable inputs, we will implement suggestions given by you.

Hi,

You can use “Component title” from row settings to set title for row(for feature request 1). Currently it is available for row only.

There is a bug with adding a link in the Rich Text widget. https://www.screencast.com/t/iiDpRw5ROQzM

Hi,

Please find below link to add a patch to the module to resolve rich text link issue

http://www.drupalthemez.com/content/visual-editor-11-patch-rich-text-anchor-dialog

That worked perfect! Thanks for the quick fix!

Hi Your product look promising, specially the accordion. it is pretty new and there is not a really big documentation, which confuses me a little. I’m in front of a bigger project, so my questions: - how sure is it that you maintain this plugin further? Even if you don’t sell it like you expect? - do you provide some more documentation soon?

Hi,

I am actively maintaining and creating new components for this module. Also I am working on video tutorials and documentation for each component.

What module used dependencies ?

Which used in Content format Block ? Could you permisson allow create Block custom ? I want see feature in Block .

As of now it supports all block content types. Creating block content from component can be implemented, but it will take some time for development. If you are looking for creating basic block, then instead of creating it from visual editor you can use Rich text component of visual editor.

ok thanks for reply.

Cool Item! Good Luck!

nice work, fantastic ! I wish you big sales and a nice day :)

Amazing work! GLWS! :)

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey