Opened 10 years ago
Closed 10 years ago
#12210 closed Bug (wontfix)
Source code formatting is invalid when startupMode source is enabled
Reported by: | Wiktor Walc | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.6.6 |
Keywords: | Cc: |
Description (last modified by )
When startupMode is set to "source" then the source code that appears on startup is broken:
- It is indented by 4 tab characters
- New line characters are missing
After switching to wysiwyg mode and back the source code looks fine.
Confirmed in 4.4.3 and in 3.6.6, did not check earlier versions.
How it looks on startup:
How it should look like:
Attachments (2)
Change History (8)
Changed 10 years ago by
Attachment: | startup_source.png added |
---|
Changed 10 years ago by
Attachment: | correct_formatting.png added |
---|
comment:1 Changed 10 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 10 years ago by
Status: | new → confirmed |
---|
comment:3 Changed 10 years ago by
Status: | confirmed → new |
---|
comment:4 Changed 10 years ago by
Alright, this reasoning may make some sense. In the meantime, for anyone looking for a solution for the issue derscribed here:
editor.on('instanceReady', function() { // Start in source mode with correct formatting this.setMode('source'); });
comment:5 Changed 10 years ago by
Personally I've got a little bit different opinion on that and I would expect that editor will work differently in both mentioned cased. However, I'm sure that there are more people expecting it to work just like now, so there's the usual conflict of expectations.
comment:6 Changed 10 years ago by
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Since there reasoning behind editor working that way and there is a simple workaound for it with editor API, I think we can close this ticket as "won't fix".
According to what Fred told me once, this may be intentional. If source mode is enabled it disables CKEditor's data processor and filters. Similar thing happen when you submit a form while editor is in source mode - content is not filtered and this according to Fred is a correct behaviour. I think that this issue is of the same nature. Source mode is a source mode, the end. Source mode displays the source that was loaded and if that source mode is incorrectly formatted, then it's an integration failure.