GithubHelp home page GithubHelp logo

egeloen / ivoryckeditorbundle Goto Github PK

View Code? Open in Web Editor NEW
336.0 20.0 116.0 8.03 MB

Provides a CKEditor integration for your Symfony project.

License: MIT License

PHP 97.63% HTML 0.85% Shell 1.31% C++ 0.22%

ivoryckeditorbundle's Introduction

README

Travis Build Status AppVeyor Build status Code Coverage Scrutinizer Code Quality Dependency Status

Latest Stable Version Latest Unstable Version Total Downloads License

The bundle provides a CKEditor integration for your Symfony Project. It automatically registers the new ckeditor form type which can be easily as well as highly configured.

Documentation

Please, read the official documentation.

Testing

The bundle is fully unit tested by PHPUnit with a code coverage close to 100%. To execute the test suite, check the travis configuration.

Contribute

We love contributors! Ivory is an open source project. If you'd like to contribute, feel free to propose a PR! You can follow the CONTRIBUTING file which will explain you how to set up the project.

License

The Ivory CKEditor Bundle is under the MIT license. For the full copyright and license information, please read the LICENSE file that was distributed with this source code.

ivoryckeditorbundle's People

Contributors

adam187 avatar aitboudad avatar aivus avatar alkemist avatar axinet avatar bastien-wink avatar cassianotartari avatar christopheferreboeuf avatar cordoval avatar dunglas avatar ferdynator avatar gelolabs avatar javiereguiluz avatar jmather avatar l-vo avatar manuelj555 avatar maritoperezdeargentina avatar maxailloud avatar mbabker avatar mbartok avatar oscargala avatar pavemaksim avatar rasanga avatar rosier avatar ruscon avatar sroze avatar tnajanssen avatar toofff avatar umpirsky avatar zhil avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ivoryckeditorbundle's Issues

Not working where application root folder is not /

In my development environment web projects are accessed via http://localhost/project/web/app_dev.php. In such cases, config.js, language file and some others cannot load, as the browser looks for it in /bundles/ivoryckeditor/, which, of course, doesn't exists.

I found that changing line 9 in ckeditor_widget.html.twig from

var CKEDITOR_BASEPATH = '/bundles/ivoryckeditor/';

to

var CKEDITOR_BASEPATH = '{{ asset('bundles/ivoryckeditor/') }}';

solves the problem. I just didn't want to fork for this small modification... :)

CSS CkEditor Content

Nice Bundle ;)
is there any way to configure the content css of the ckeditor?
I mean use an external css file?

inactive scope ("request")

after commit db93af5
when i want to clear cache :
[Symfony\Component\DependencyInjection\Exception\InactiveScopeException] You cannot create a service ("ivory_ck_editor.helper.templating") of an inactive scope ("request").

how easy way to Mange Files ?

hi
i ded look for jonlil/JonlilCKFinderBundle, but it simce that is not stable solution : https://github.com/jonlil/JonlilCKFinderBundle/issues/7
and me i m not so good to take this project.

my question is how to easly integret this CKFINDER in my project ?
more oven i m just looking to have he filesManager (upload/download) i my web site, maybe there better solution?

thank if you can help.

Use your bundle with PrestaCMS

Hi I'm working on a CMS and I want to use your bundle but I have one problem with it.

Now if I want to add a wysiwyg field I found that I should modify my admin classes to add a ckeditor field.

As I don't want to couple my cms to ckeditor, my need is to have a twig extension to render in my layout to enhance textarea with wysiwyg classes.

Have you done this before ?

I want integrate form type ckeditor with the Sonata Admin Bundle in sonata_type_collection

All is fine but, when i create a sonata_type_collection like this:

//ProductAdmin.php
$formMapper
->add('languages', 'sonata_type_collection', array(
'by_reference' => false,
'label' => 'languages'
), array(
'edit' => 'inline',
'inline' => 'table'
)
)
//ProductLanguageAdmin.php
$languages = $this->getConfigurationPool()->getContainer()->get("esolving_page_core")->getLanguages();
foreach ($languages as $languageK => $language) {
$choiceLanguages[$languageK] = $language;
}
$formMapper
->with('general')
->add('language', 'choice', array(
'label' => 'language',
'choices' => $choiceLanguages))
->add('name', null, array('label' => 'name'))
->add('description', 'ckeditor', array(
'label' => 'description',
'config_name' => 'standard'
))
->end()
;

then in product append other table inline of languages, the first is fine, but then ckeditor is crushing, any help please?

Problems since upgrade to Symfony 2.0.13

Since the upgrade from Symfony 2.0.12 to Symfony 2.0.13 I can't use the CKEditor anymore. The error message is the follow:

Fatal error: Declaration of Ivory\CKEditorBundle\Form\Type\CKEditorType::getDefaultOptions() must be compatible with that of Symfony\Component\Form\FormTypeInterface::getDefaultOptions() in /var/www/vendor/bundles/Ivory/CKEditorBundle/Form/Type/CKEditorType.php on line 123

Anyone have an idea what could be wrong? maybe a bug? else I didn't change anything else, except upgrading Symfony.

Multiple forms of same type in the same page

When you create multiple forms of same type in one page, browser renders CKEditor at the place of first instance of the textarea of first form. because it searches for the id and the id is same for each form (Symfony2 gets data from datatype name).

Instead of calling replace function of ckeditor, it should be a solution to add a class attribute like this:
'attr'=>array('class'=>'ckeditor')

In addition these lines should be removed from ckeditor_widget.html.twig

    <script type="text/javascript">
        if (CKEDITOR.instances['{{ id }}']) {
            delete CKEDITOR.instances['{{ id }}'];
        }

        {% for plugin_name, plugin in plugins %}
            CKEDITOR.plugins.addExternal('{{ plugin_name }}', '{{ plugin.path }}', '{{ plugin.filename }}');
        {% endfor %}

        CKEDITOR.replace('{{ id }}', {{ config | raw }});
    </script>

Line endings issue

\r\n lots of it everywhere.... And would be good to convert it to unix format \n

Support for CKEditor 4.3.1

I created some widgets (eg. "videobox") using the latest ckeditor package, inserted them in the Ivory/Resources/public/plugins/videobox and tried to use them (config.extraPlugins = 'videobox').
But the editor returns an error that the "editables" is an unknown function, which is a crucial for the widget component. (Also the "widget" plugin was also missing.)

Does bundle support widgets/custom widgets? Do you plan to upgrade the bundle in near future?

Configuring ui-color

In your example to configure the color of the ui you use ui-color but it doesn't work.

According to the CKEditor the parameter is uiColor.

Documenation needs update for this.

ckeditor_widget doesn't "print" script tag

Hello,

I'm having trouble getting the bundle to work since I updated some of my dependencies.

I am working with CKEditorBundle 2.1.5. I have to mention that the problem that I have is also happening when I tried CKEditorBundle 2.2.*.

When I try to display a ckeditor form type in my form, like this :
->add('description', 'ckeditor', array(
'label' => false
))

And then in my template :
...
{{ form_row(form.description) }}
...

The WYSIWYG displays well, but then the script tags that come after in the ckeditor.widget.html.twig are printed but are not interpreted (see the image).
I don't really know if this especially related to the bundle, but I had no problem until I updated my dependencies.
Does anybody see what could be the problem?

Thank you !
bug

plugin integration?

hi
i try to integrate plugin (youtube, google map, ...) but i have error all the time !


"NetworkError: 404 Not Found - http://www.neo.com.dev/bundles/ivoryckeditor/plugins/youtube/?t=D6IEplugin.js"
?t=D6IEplugin.js
uncaught exception: [CKEDITOR.resourceManager.load] Resource name "youtube" was not found at "/bundles/ivoryckeditor/plugins/youtube?t=D6IEplugin.js".

config.aml
ivory_ck_editor:
    default_config: default
    plugins:
        youtube:
            path:     "/bundles/ivoryckeditor/plugins/youtube"
            filename: "plugin.js"
....
     neoTest:
         toolbar: 'neoToolbar_1'  # full - standard - basic
         filebrowserBrowseRoute: 'elfinder'
         filebrowserBrowseRouteParameters: []
         extraPlugins:           "youtube"
    toolbars:
        configs:
            neoToolbar_1:
                - ['youtube','Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo', '-','Link', 'Unlink', 'Anchor']
                - ['Image', 'Table', 'HorizontalRule', 'SpecialChar' ,'-' ,'Maximize','Source' ]
                - "/"
                - ['Bold', 'Italic', 'Strike', '-', 'RemoveFormat' ,'-' ,'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'Blockquote']
                - "/"
                - [ "Maximize", 'Styles', 'Format', 'About']

what cam it be? can you help?
thank.

Cannot add Ordered/UnorderedList

$builder->add('description', 'ckeditor', array(
        'config' => array(
            'toolbar' => array(
                array(
                    'name' => 'document',
                    'items' => array(),
                ),
                '/',
                array(
                    'name' => 'basicstyles',
                    'items' => array('Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', 'OrderedList', 'UnorderedList','-', 'RemoveFormat'),
                ),
            ),
            'ui_color' => '#ffffff',
        //...
        ),
    ));

I added list support however the tools do not appear in the toolbar. Where is the problem?

Get error when try to call field on Entity persist

Hi, maybe this isn't a issue but I'm getting "Column 'description' cannot be null" error while try to use the bundle. See I have this in my ProductType.php:

  $builder
            ->add('upc', 'text', array('required' => true))
            ->add('name', 'text', array('required' => true))
            ->add('description', 'ckeditor', array('required' => false))
            ->add('age_limit', 'text', array('required' => false));

Then in my controller I do this:

    $entityProduct = new Product ();

    $form = $this->createForm(new ProductType(), $entityProduct);
    $form->handleRequest($request);

    if ($form->isValid()) {
        $em = $this->getDoctrine()->getManager();

        $em->persist($entityProduct);
        $em->flush();
    }

For some reason or miss configuration from my part it's failing, where? Of course field have values (see the attached image)

1

Using CKeditor with JQuery in Symfony2

Using the way described in the following link:
http://ckeditor.com/blog/CKEditor_for_jQuery

I receive an error calling the method .ckeditor on an object (Uncaught TypeError: Object [object Object] has no method 'ckeditor' ).

Code:

function edit(obj)
{
var textarea = $("<.textarea></.textarea>");
textarea.attr('id', 'editor');
textarea.val(html);
textarea.appendTo(obj);
textarea.ckeditor();
}

(The dots are there to fix the not viewing raw html by github, they are not in the code)

I tried it in plain js too and it didn't work there either.

Default config

It would be nice to have a default configuration, so if one would like to alter the behavior of all the instances he won't be forced to go over and set config_name per each form type.

I'm currently using the SonataAdminBundle and would like to add extraAllowedContent setting and I don't seem to have an easy way for doing so.

I should extend the bundle and override all its form types which are using ckeditor. I find this pretty annoying.

ckeditor form type not working

After updating sf2 and its bundles ckedtiro form type stopped working. Note i had to update CKEditorType class CKEditorType in order to avoid errors complaining about not implementing FormTypeInterface correctly.

That's the error i got after updating class CKEditorType:

Notice: Undefined index: toolbar in /home/sibok/public_html/SalleBcn/vendor/bundles/Ivory/CKEditorBundle/Form/Type/CKEditorType.php line 21

I modified class CKEditorType leaving it as:

setAttribute('toolbar', $options['toolbar']) ->setAttribute('ui_color', $options['ui_color']); } /** - {@inheritdoc} */ public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form) { $view ->setVar('toolbar', $form->getAttribute('toolbar')) ->setVar('ui_color', $form->getAttribute('ui_color')); } /** - {@inheritdoc} */ public function setDefaultOptions(OptionsResolverInterface $resolver) { $resolver->setDefaults(array( 'required' => false, 'toolbar' => array( array( 'name' => 'document', 'items' => array('Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates') ), array( 'name' => 'clipboard', 'items' => array('Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo') ), array( 'name' => 'editing', 'items' => array('Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt') ), array( 'name' => 'forms', 'items' => array('Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField') ), '/', array( 'name' => 'basicstyles', 'items' => array('Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat') ), array( 'name' => 'paragraph', 'items' => array('NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl') ), array( 'name' => 'links', 'items' => array('Link','Unlink','Anchor') ), array( 'name' => 'insert', 'items' => array('Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak') ), '/', array( 'name' => 'styles', 'items' => array('Styles','Format','Font','FontSize') ), array( 'name' => 'colors', 'items' => array('TextColor','BGColor') ), array( 'name' => 'tools', 'items' => array('Maximize', 'ShowBlocks','-','About') ) ), 'ui_color' => null )); $resolver->addAllowedValues(array('required' => array(false))); } /** - {@inheritdoc} */ public function getParent(array $options) { return 'textarea'; } /** - {@inheritdoc} */ public function getName() { return 'ckeditor'; } }

Config enterMode / shiftEnterMode

I'm trying to configure the enterMode so I can use
instead of

and chrome is throwing this error:

Cannot read property 'br' of undefined

My configuration is quite simple:
ivory_ck_editor:
configs:
simple:
toolbar: [ [ "Bold", "Italic", "Underline", "-", "RemoveFormat", "-", "Maximize" ] ]
enterMode: "CKEDITOR.ENTER_BR"
shiftEnterMode: "CKEDITOR.ENTER_BR"

¿How can we use the CKEDITOR.<> defines?

Smileys escaping bug

Hi there,

I have a strange problem ... Locally all works fine but when i deploy my app to live and include any smilies image i am having double escaping issue.

<img alt=\"kiss\" height=\"20\" src=\"http://zwooper.test.digitaleffect.co/bundles/digitalckeditor/plugins/smiley/images/kiss.gif\" title=\"kiss\" width=\"20\" />

Am I doing anything wrong? I looked up the database and this output is coming from the db...

configuration witch FMElfinderBundle

Hi i put config from integration maual - dont have any errors but dont see ckeditor in FMElfinderBundle. It should show when i click edit txt or .html file ? maybe i must configure somethink else ? please more info.

Sf 2.3.2

hi first i want to said that on the paper it look very nice, i just try Timymce and i got same probleme when it's time to refersh by ajax, jquery hope that this one dont have the same probleme.

i try to user on Symfony 2.3.2. is there problemes or not compatibility?

i get this error :

Fatal error: Call to undefined method Symfony\Component\Form\Form::getAttribute() in .....\zorg.dev\vendor\egeloen\ckeditor-bundle\Ivory\CKEditorBundle\Form\Type\CKEditorType.php on line 73

thank

Why using {{ value | raw }} in Twig and just echo $value in PHP template?

I'm asking it, because I nearly had problem with this - http://stackoverflow.com/questions/20571887/ckeditor-and-code-parsing-strange-change-after-submitting-code

The problem was the string was in raw format and then CKEditor cannot read correct HTML. If I use

in PHP template

Or

{{ value }} in Twig template

in files ckeditor_widget.html.php, ckeditor_widget.html.twig

The problem is solved and HTML is valid. This change has no impact on real source code in page, which loads data from entity submitted by ckeditor field. After this change, is my CKEditor working correctly.

Toolbar ?

hi
i want to know if there is possibility to get in easy way change the "Full Toolbar" to "Standard Toolbar" or "Simple Toolbar" as they propose in CKEditor website ?
( http://ckeditor.com/demo#toolbar )
what abort inline mode ?

thank

Broken <dt> support.

After updating to dev-master

are being replaced with

.
I believe it's caused by upgrading to ckeditor 4.1 since commit 9f2ddcc works just fine.

Default configuration not working

Tried to setup default Ck configuration in yml, as described in manual:

ivory_ck_editor:
    default_config: my_config
    configs:
        my_config:
          toolbar: full

I'm getting errors, because undefined variables: "Warning: Invalid argument supplied for foreach() in /egeloen/ckeditor-bundle/Ivory/CKEditorBundle/Resources/views/Form/ckeditor_widget.html.php" lines 15/19/23
I'm not planing to use plugins, templates, or need custom styles, so I expect default configuration to prepare those needed variables and work out of the box.

CKEditor Upload Files/Images

Hi guys,

I try to integrate the filebrowser* but i can't, is not clear in the documentation. How can i integrate?

Thanks!

When adding ckeditor in a collection form type (right now using sonata) like above, ckeditor is shown as textarea

When adding ckeditor in a collection form type (right now using sonata) like above, ckeditor is shown as textarea (no rich editor):

class AType extends AbstractType
{
$builder->add( 'titol', 'text', array( 'label' => 'titol' ) )
->add( 'sotsTitol', 'text', array( 'label' => 'titol' ) )
->add( 'blocs', 'collection', array(
'type' => new \myVendor\myBundleBundle\Form\Type\BType(),
'allow_add' => true,
'allow_delete' => true,
'by_reference' => false
)
)
;

........

class BType extends AbstractType
{
/**
* {@inheritdoc}
*/
public function buildForm(FormBuilder $builder, array $options)
{
$builder->add( 'href', 'text', array() )
->add( 'imatge', 'text', array() )
->add( 'altImatge', 'text', array() )
->add( 'titol', 'text', array() )
->add( 'text', 'ckeditor', array() )
;
}

Error after update

Hi,

I just updated to 2.2.0 and i get the error:
You cannot create a service ("ivory_ck_editor.helper.templating") of an inactive scope ("request").

on cache:clear

Not storing value in sonata_type_collection

Hi,

When using the ckeditor in sonata_type_collection pressing the "Add new" button adds a row where one of the fields is of type ckeditor. Write something in all the fields and then press again "Add new". The value entered in the ckeditor field in the fist row is lost. The values for the rest of the fields are kept.
ckeditor_not_storing_value

Changing language options

Hi,

I can currently edit the config.js file in the bundle to change the language option, is there a way this can be done in my own bundle?

Much in the same way that I can specify an array of toolbar options

assets_version breaks CKEDITOR_BASEPATH

In my project we use assets_version to bust caches. Unfortunately this breaks functionality for CKEDITOR_BASEPATH ( /Resources/views/Form/ckeditor_widget.html.twig line 9).

Currently the only workable fix I found was modifying the variable definition in javascript ( /Resources/public/ckeditor.js):
var d=window.CKEDITOR_BASEPATH.replace(/\?.*/, '')||'';

Sadly, twig doesn't have a regexp replace, nor can I find a way to get an asset without a version appended.

hth

404 errors when loading Form through ajax call

Hi,

I'm using your IvoryCKEditorBundle. It is working great with regular Post/Get forms. However, I also have a form which I load through an ajax call and when I load it in that way, I get 404 messages:

GET http://project/admin/config.js?t=B8DJ5M3 404 (Not Found)
GET http://project/admin/lang/en.js?t=B8DJ5M3 404 (Not Found)
Uncaught TypeError: Cannot read property 'options' of undefined
GET http://project/admin/skins/kama/editor.css?t=B8DJ5M3 404 (Not Found)

Any idea how I can make it work with ajax loaded forms?
Thank you.

same issue as closed issue #8

i have the same issue but dont understood how to make it workout.
Got 2.0 branch but keep getting the same error:

after those modifications on CKEditorType

The option "toolbar" does not exist

elfinder integration example

Hi,

In the readme for the fileupload elfinder integration, the example config uses:

filebrowserUploadRoute: elfinder

When I used it, I did get the "upload" tab in the CKEditor, but when uploading an image, it loaded the entire file manager into the small line where you can upload a file. It was really unusable for me.

Shouldn't the config be changed to:

filebrowserBrowseRoute: elfinder

That way you can use the "Browse on server" button for an image and use the Elfinder interface to upload/manage images and files.

Remove the dependency to Router in ConfigManager

The router should not be a dependency of the ConfigManager. The router is used to generated the route, which is part of the presentation layer.

A valid implementation will be to move the router call into the view, the ConfigManager will only generate the route name and route parameter.

What do you thing ?

Not working with jQuery ajaxForm

Your bundle works perfectly with normal GET/POST requests, but I have a form that is an ajaxForm (jQuery), and POST data is not updated.

Ckeditor is supposed to work perfectly with ajax due to jQuery adapter. But it looks like ckeditor 4.x is not shipped with jQuery adapter.

Any help with this?

Data to the ckeditor

I need to render the editor with a preset data.
Im trying this:

$builder->add('history', 'ckeditor', array( 'toolbar' => $toolbar , 'data' => $dados));

but its not working at all..
what should i do?

AutoGrow plugin support?

Do we have any sort of plugin management is the intention to have all plugins there in the bundle to prevent overriding in src?

I guess I can download it and declare it in my child bundle but seems a bit 'not nite!' ?

Templates plugin configuration

Hi!

I added the templates plugin to CKEditor and it works fine. The only problem I'm having is figuring out how I can add templates from my config.yml. I've been trying with this config layout. The templates list is emptied (if I remove my template, the list is populate by the default values which are part of the plugin) which makes me think that I'm almost there, but my template doesn't appear in the list.

extraPlugins: templates
templates :
    -
        title : 'My template'
        description : 'Description for my template'
        html : '<h2>Template 1</h2>'

Another example would be :

extraPlugins: templates
templates :
    -
        title : 'My other template'
        description : 'Description for my other template'
        html : 
            -
                '<h2>Template 1</h2>'+
                '<small>Template 1</small>'

Any idea?

[SOLVED] IvoryCKEditorBundle Configuration

I have successfully configured CKEditor in my Symfony Project like this:

$ckconfig = array(
            'toolbar' => array(
                array(
                    'name'  => 'basicstyles',
                    'items' => array('Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat'),
                ),
                array(
                    'name'  => 'paragraph',
                    'items' => array('NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote'),
                ),
                array(
                    'name'  => 'links',
                    'items' => array('Link','Unlink'),
                ),
            ),
            'forcePasteAsPlainText'=> true
);

Since I have more Editors, I have tried to create a Global Configuration like this, but I still have less success:

   $builder
            ->add('name', 'text', array('label' => 'Name'))
            ->add('description', 'ckeditor',
                    array('label' => 'Short Description',
                          'required' => false,
                           'config' => $ckconfig,
                            'trim' => true
                    )
            )
ivory_ck_editor:
    configs:
        my_config:
            toolbar:   [How would the above config looks like here ?]
            forcePasteAsPlainText: true
$builder
            ->add('name', 'text', array('label' => 'Name'))
            ->add('description', 'ckeditor',
                    array('label' => 'Kurztext',
                          'required' => false,
                            'config_name' => 'my_config',
                            'trim' => true
                    )
            )

Add PHP template support

The bundle only defines a Twig template and so, made it only usable with it. We should allows end users to use it with the PHP template engine.

files not found

When I installed IvoryCKEditorBundle, CKeditor didn't show up. Firebug telled me it was because some files were not found.
They were not found because they were searched at http://localhost/ and not at http://localhost/my_project/.

I suggest this to fix it :
In Resources/view/Form/ckeditor_widget.html.twig :
Replace this line : var CKEDITOR_BASEPATH = '../../bundles/ivoryckeditor/';
By this : var CKEDITOR_BASEPATH = '{{ asset('bundles/ivoryckeditor') }}/';
It will automatically search the files in the assets directory.

styleSet.add config

Hi there!

I'm trying to add styles to the styles menu in CKEditor. Trying to figure out how to add it to the default list while using the configuration method you explain in the docs of your bundle.

i tried with this :

ivory_ck_editor:
    configs:
        admin:
            uiColor:                "#000000"
            styleSet.add:           ( 'default', [
                                        { name: 'Just a test',      element: 'h2', styles: { 'font-style': 'italic' } }
                                    ])

but the yaml parser bugs out on the syntax...

I also tried with :

ivory_ck_editor:
    configs:
        admin:
            uiColor:                "#000000"
            styleSet.add:           { name : 'Strong Emphasis ProjectName', element : 'strong' }

and this :

ivory_ck_editor:
    configs:
        admin:
            uiColor:                "#000000"
            styleSet:           { name : 'Strong Emphasis ProjectName', element : 'strong' }

they both don't do anything...

Do you know how I should go about for this?

Thanks!

'Config' does not exist

The option "config" does not exist
500 Internal Server Error - CreationException

I'm facing this issue when I try to add config options like this :

$builder->add('field', 'ckeditor', array(
    'config' => array(
        'toolbar' => array(
            array(
                'name'  => 'document',
                'items' => array('Source', '-', 'Save', 'NewPage', 'DocProps', 'Preview', 'Print', '-', 'Templates'),
            ),
            '/',
            array(
                'name'  => 'basicstyles',
                'items' => array('Bold', 'Italic', 'Underline', 'Strike', 'Subscript', 'Superscript', '-', 'RemoveFormat'),
            ),
        ),
        'ui_color' => '#ffffff',
        //...
    ),
));

Editor is working fine if i remove config options but it displays all the tools,Please help me

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.