Closed ioleo closed 11 years ago
I cannot replicate this issue. I just installed the latest version and set my language to 'pl' and it works.
trsteel_ckeditor:
width: 50%
toolbar:
- document
- basicstyles
- paragraph
- clipboard
toolbar_groups:
document:
- Source
basicstyles:
- Bold
- Italic
- Underline
- Strike
- RemoveFormat
language: 'pl'
What does your source look like?
Source from Chrome Developer Tool:
<script type="text/javascript">
CKEDITOR.replace("edit_page_content",{
width: '100%',
height: '200',
language: 'pl',
uiColor: "#E4E4E4",
startupOutlineBlocks: 1,
filebrowserBrowseUrl: '/elfinder/',
filebrowserImageBrowseUrl: '/elfinder/',
contentsCss: '/bundles/wrsdesignwebsite/css/ckeditor.css',
toolbar: [{"name":"document","items":["Source"]},{"name":"clipboard","items":["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]},{"name":"editing","items":["Find","Replace","-","SelectAll"]},{"name":"paragraph","items":["Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock"]},{"name":"tools","items":["Maximize","ShowBlocks"]},"\/",{"name":"links","items":["Link","Unlink","Anchor"]},{"name":"insert","items":["NumberedList","BulletedList","-","Image","Table","HorizontalRule"]},{"name":"basicstyles","items":["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]},{"name":"colors","items":["TextColor","BGColor"]},{"name":"styles","items":["Format"]}]
});
</script>
The toolbar part in more human-readable form (only added ENTER and SPACEs which should not change anything in the logic):
toolbar: [
{
"name":"document",
"items":["Source"]
},
{
"name":"clipboard",
"items":["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]
},
{
"name":"editing",
"items":["Find","Replace","-","SelectAll"]
},
{
"name":"paragraph",
"items":["Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock"]
},
{
"name":"tools",
"items":["Maximize","ShowBlocks"]
},
"\/",
{
"name":"links",
"items":["Link","Unlink","Anchor"]
},
{
"name":"insert",
"items":["NumberedList","BulletedList","-","Image","Table","HorizontalRule"]
},
{
"name":"basicstyles",
"items":["Bold","Italic","Underline","Strike","Subscript","Superscript","-","RemoveFormat"]
},
{
"name":"colors",
"items":["TextColor","BGColor"]
},
{
"name":"styles",
"items":["Format"]
}
]
Here is how my editor looks like:
Can you try my config above and see if it works please?
Tried to change array notation (from [ ... ]
to -
), but did not help:
trsteel_ckeditor:
class: Trsteel\CkeditorBundle\Form\Type\CkeditorType
ui_color: "#E4E4E4"
width: 100%
height: 200
language: pl
startup_outline_blocks: true
transformers:
- strip_js
- strip_css
- strip_comments
toolbar:
- document
- clipboard
- editing
- paragraph
- tools
- /
- links
- insert
- basicstyles
- colors
- styles
toolbar_groups:
document:
- Source
clipboard:
- Cut
- Copy
- Paste
- PasteText
- PasteFromWord
- -
- Undo
- Redo
editing:
- Find
- Replace
- -
- SelectAll
basicstyles:
- Bold
- Italic
- Underline
- Strike
- Subscript
- Superscript
- -
- RemoveFormat
paragraph:
- Outdent
- Indent
- -
- JustifyLeft
- JustifyCenter
- JustifyRight
- JustifyBlock
links:
- Link
- Unlink
- Anchor
insert:
- NumberedList
- BulletedList
- -
- Image
- Table
- HorizontalRule
styles:
- Format
colors:
- TextColor
- BGColor
tools:
- Maximize
- ShowBlocks
filebrowser_browse_url:
route: elfinder_show
filebrowser_image_browse_url:
route: elfinder_show
Gonna try copypaste your config now.
Copying your config did not help either, result:
<script type="text/javascript">
CKEDITOR.replace("edit_page_content",{
width: '50%',
language: 'pl',
startupOutlineBlocks: 1,
contentsCss: '/bundles/wrsdesignwebsite/css/ckeditor.css',
toolbar: [{"name":"document","items":["Source"]},{"name":"basicstyles","items":["Bold","Italic","Underline","Strike","RemoveFormat"]},{"name":"paragraph","items":["NumberedList","BulletedList","-","Outdent","Indent","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock"]},{"name":"clipboard","items":["Cut","Copy","Paste","PasteText","PasteFromWord","-","Undo","Redo"]}]
});
</script>
@trsteel88 as far as I can see, the options are passed down, but for some reason the default language is used, maybe the locale file cannot be read (or is not loaded?)
On this screen (my html output) I don't see file Resources/public/lang/pl.js being loaded (i suppose it should be)?
The issue was with the ckeditor 4.0.1 files from https://github.com/trsteel88/TrsteelCkeditorBundle/pull/37
I have updated ckeditor (https://github.com/trsteel88/TrsteelCkeditorBundle/commit/224847a3b5a0d70048f8bc034556ddbb7b7a7c00) and it looks like it is functioning correctly now. Please clear your cache and run the assets:install command
@trsteel88 thank you, issue is fixed
Today I run composer.phar update and got checked out to current master. I see my ckeditor was upgraded to 4.0.1, but unfortunately, it's in English (fallback language).
Is there something wrong with lang file?
My config:
What's wrong?