Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrate ckeditor #46

Merged
merged 6 commits into from
Apr 15, 2013
Merged

integrate ckeditor #46

merged 6 commits into from
Apr 15, 2013

Conversation

kosssi
Copy link
Contributor

@kosssi kosssi commented Apr 6, 2013

#33 : Integrate ckeditor

        {% render controller("symfony_cmf_create.jsloader.controller:includeJSFilesAction", {
            'editor': 'ckeditor'
        }) %}

@dbu
Copy link
Member

dbu commented Apr 6, 2013

we discussed this at the symfony live hackday and i think this is the way to go until a really good js handling solution is found. the advantage over #42 is that we only maintain the version what is checked out in one single place.

this is also open to improvements by using the composer.json extra fields to configure the repository and version id to use, if somebody wants a non-default version of ckeditor in his project.

@kingcrunch what do you think about this solution?

@dbu
Copy link
Member

dbu commented Apr 6, 2013

@kosssi don't we need to include any css files for ckeditor as well?

@kosssi
Copy link
Contributor Author

kosssi commented Apr 6, 2013

Sorry, but i amend my pull-request...

@dbu ckeditor don't have realy css, i think. It's style.js file.

'/',
{ name: 'styles' },
{ name: 'colors' }
];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the doc will explain that you can overwrite these configuration options in a javascript loaded afterwards. i think this is good enough so we don't want to expose any configuration options to symfony for this but have people change those variables (particularly the config.customConfig path to use a non-default config.js)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it's better ;)

@kosssi
Copy link
Contributor Author

kosssi commented Apr 6, 2013

Now, it's possible to configure ckeditor in composer.json :

"scripts": {
    "post-install-cmd": [
        ...
        "Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCkeditor",
        ...
    ],
    "post-update-cmd": [
        ...
        "Symfony\\Cmf\\Bundle\\CreateBundle\\Composer\\ScriptHandler::downloadCkeditor",
        ...
    ]
},
...
"extra": {
    ...
    "ckeditor-directory": "vendor/symfony-cmf/create-bundle/Symfony/Cmf/Bundle/CreateBundle/Resources/public/vendor/ckeditor",
    "ckeditor-repository": "https://github.com/ckeditor/ckeditor-releases.git",
    "ckeditor-commit": "bba29309f93a1ace1e2e3a3bd086025975abbad0"
}

And you juste should overload init-create-path.js for explain where is ckeditor.

@kingcrunch
Copy link
Contributor

Currently on vacation, but looks like a quite nice solution I think :-)

editorWidgets: {
'default': 'ckeditor',
'dcterms:description': null
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the editorWidgets section should be done in userland, or not? we do not do it in the corresponding script of the hallo editor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@dbu
Copy link
Member

dbu commented Apr 12, 2013

looks good. i added two comments, would be cool if we can solve those. then it should be good to merge.

can you please also do a PR against https://github.com/symfony-cmf/symfony-cmf-docs ?

@@ -105,7 +112,8 @@ public function includeJSFilesAction($editor = 'hallo')
'cmfCreateStanbolUrl' => $this->stanbolUrl,
'cmfCreateImageUploadEnabled' => (boolean) $this->imageClass,
'cmfCreateHalloFixedToolbar' => (boolean) $this->fixedToolbar,
'cmfCreateHalloPlainTextTypes' => json_encode($this->plainTextTypes)
'cmfCreateHalloPlainTextTypes' => json_encode($this->plainTextTypes),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i wonder if we should not have the same functionality for all editors and drop the "hallo" from this parameter. its the same problem regardless of the editor: have one that has no formattings enabled at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@kosssi
Copy link
Contributor Author

kosssi commented Apr 13, 2013

All right for the documentation i do it Saturday April 20. before i don't have time.

dbu added a commit that referenced this pull request Apr 15, 2013
@dbu dbu merged commit 8919fb4 into symfony-cmf:master Apr 15, 2013
@dbu
Copy link
Member

dbu commented Apr 15, 2013

thanks a lot!

maybe we need the lines about setEditorForProperty in the ckeditor js init script like we have them in the hallo editor. but best try this out when writing the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants