Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Ckeditor Bundle Laravel Package

drymek/ckeditor-bundle

View on GitHub
Deep Wiki
Context7

Symfony2 CKEditor Bundle

Build Status

Add the following lines to the deps file:

[TrsteelCkeditorBundle]
    git=http://github.com/trsteel88/TrsteelCkeditorBundle.git
    target=/bundles/Trsteel/CkeditorBundle

Update your vendors by running:

$ php ./bin/vendors

Add the Trsteel namespace to your autoloader.

<?php
// app/autoload.php

$loader->registerNamespaces(array(
    'Trsteel' => __DIR__.'/../vendor/bundles',
    // your other namespaces
));

Add the bundle to the application kernal.

<?php
// app/AppKernel.php

public function registerBundles()
{
    return array(
        // ...
        new Trsteel\CkeditorBundle\TrsteelCkeditorBundle(),
        // ...
    );
}

Install assets.

$ php ./app/console assets:install web --symlink

Configure the default settings for the app. This step is not required for the bundle to function.

trsteel_ckeditor:
    class: Trsteel\CkeditorBundle\Form\CkeditorType
    toolbar: ['document', 'clipboard', 'editing', '/', 'basicstyles', 'paragraph', 'links', '/', 'insert', 'styles', 'tools']
    toolbar_groups:
        document: ['Source','-','Save','-','Templates']
        clipboard: ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo']
        editing: ['Find','Replace','-','SelectAll']
        basicstyles: ['Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat']
        paragraph: ['NumberedList','BulletedList','-','Outdent','Indent','-','JustifyLeft', 'JustifyCenter','JustifyRight','JustifyBlock']
        links: ['Link','Unlink','Anchor']
        insert: ['Image','Flash','Table','HorizontalRule']
        styles: ['Styles','Format']
        tools: ['Maximize', 'ShowBlocks']
    ui_colour: '#000000'
    startup_outline_blocks: true
    width: 800 #Integer or %
    height: 300 #Integer or %

These settings can also be configured for a specific form.

<?php

$form = $this->createFormBuilder($post)
            ->add('title', 'text')
            ->add('content', 'ckeditor', array(
                'toolbar' => array('document','basicstyles'),
                'toolbar_groups' => array(
                    'document' => array('Source')
                )
                'ui_colour' => '#fff',
                'startup_outline_blocks' => false,
                'width'    => '100%',
                'height' => '320',
            ))
            ->getForm()
;

You can create additional toolbar groups. Just create the group and specify the items. As you can see in the above form the 'document' toolbar group has been overwritten and only shows the 'Source' icon.

In your config.yml you could add an additional toolbar_group:

trsteel_ckeditor:
    toolbar: ['document_with_source_only', 'clipboard', 'editing', '/', 'basicstyles', 'paragraph', 'links']
    toolbar_groups:
        document_with_source_only: ['Source']

Or even overwrite the 'document' toolbar group in your application completely.

trsteel_ckeditor:
    class: Trsteel\CkeditorBundle\Form\CkeditorType
    toolbar: ['document', 'clipboard', 'editing', '/', 'basicstyles', 'paragraph', 'links', '/', 'insert', 'styles', 'tools']
    toolbar_groups:
        document: ['Source']
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle
dmstr/api-platform-utils-bundle
dmstr/api-configuration-bundle
chrisdev/ux-components
baks-dev/finances
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle