Opened 8 years ago

Last modified 7 years ago

#14658 confirmed Bug

BBCode adds extra nodes when toggling modes in default sample.

Reported by: Alan Howshall Owned by:
Priority: Normal Milestone:
Component: General Version: 4.5.0
Keywords: Cc:

Description (last modified by Jakub Ś)

Steps to reproduce

  1. Download CKBuilder package of
  2. Extract and load /samples/index.html into Firefox or other browser
  3. Toggle into and out of 'View source'

Expected result

Default pre-filled content source code should be rendered in BBCode [ ] style tags and remain unchanged when toggling into and out of View source

Actual result

On intial toggle into View source you can see that source code has NOT been converted to BBCode as should. Toggling back into RTE view then causes unwanted HTML tag code to be progressively added to RTE and source code content on repeated View Source toggling

Other details (browser, OS, CKEditor version, installed plugins)

CKEditor version 4.5.9. Tested in Firefox 46 and Chrome 50 on Windows 8.1

Please note that unlike previously raised I have now been able to confirm this bug in CKBuilder with minimal number and only CK Source created plugins

I believe this problem is related to the plugin ordering that CKBuilder is doing, rather than any it not being possible to have these plugins work together. As if you look at that is a download package with the exact same elements showing selected on CKBuilder UI web page, but that 2nd version does work correctly (however when I add all my desire plugins via CKBuilder I then can't get CKBuilder to produce a valid build for me)


This issue is about fixing BBcode plugin so that it works in certain situation. When building CKEditor with BBCode plugin and displaying default sample, extra nodes are added while switching between source/wysiwyg. The plugin should be adjusted to handle that as content is basic sample is very basic.

Change History (10)

comment:1 Changed 8 years ago by Alan Howshall

Any comment or update into investigations of this CKBuilder issue yet?

comment:2 Changed 8 years ago by Alan Howshall

Please could someone from CK review and provide at least some initial answer to this as it has now been 4 weeks since raising initial ticket with no replies.

Many thanks in advance, Alan

comment:3 Changed 8 years ago by Jakub Ś

Resolution: invalid
Status: newclosed
Version: 4.5.9

Instead of checking default samples I have checked /ckeditor/samples/old and ask you to do the same.

When you open replacebycode sample you will see that instead of HTML, you can see HTML text. THis is happening because BBCode plugin is included and conflicts with HTML output. To fix that problem please remove the bbcode plugin:

CKEDITOR.replace( 'editor1', {
	removePlugins : 'bbcode'

I will get to proper solution in a moment...

Now, please open /ckeditor/samples/old/bbcode/bbcode.html and notice it works correctly. Why is that?

There are two important things to notice:

  1. If you want to use BBCode you need extra configuration. You need to remove quite a few plugins, modify toolbar, smileys and so on. You need to know that bbcode plugin is more of a simple proof of concept and will not work with advanced HTML out of the box. It will need extra coding to support e.g. tables, images, headers etc.
  2. Please notice the initial content inside textarea. In all previous samples, you had HTML while in bbcode you actually have bbcode and that is the content this plugin wants - This is some [b]sample text[/b]. You are using [url=]CKEditor[/url].

I have to close this issue as invalid again but if you have any comments or simply disagree, please do not hesitate to continue this topic (I can always reopen it).

comment:4 Changed 8 years ago by Alan Howshall

Thank you for your answer and explanation.

While I readily appreciate that your BBCode plugin doesn't (and can't due to BBCode language limitations) support more advanced HTML coding, I think there is still an issue here that your default /ckeditor/samples/index.html only has simple 'Hello world' text, carriage returns + a link, but seems to only half trigger BBCode plugin usage such that contents are corrupted on toggling to Source Code view and back again.

It appears that on toggle into Source code view <a href=" is being turned into <url href=" (but not full BBCode of [url=) and on exit of Source Code view line returns are being converted into new real HTML <br>, but that previous HTML <br /> were changed into plain text on the way into source code view!

So at least some of BBCode plugin functionality is activating even without the explicit extraPlugins: 'bbcode' call?

Surely it makes sense that, when/if BBCode plugin is included within CKBuilder download, that the default and recommended /ckeditor/samples/index.html should work properly with included BBCode output? Given that sample does only include simple styling that CAN be encoded into BBCode with the existing plugin.

comment:5 Changed 8 years ago by Jakub Ś

Surely it makes sense that, when/if BBCode plugin is included within CKBuilder download, that the default and recommended /ckeditor/samples/index.html should work properly with included BBCode output?

I understand the toggling problem and adding new HTML node. In general this is happening because conversion breaks, CKEditor tries to fix HTML, fails to do so and so on and so on....

Please note however that BBCode plugin expects BBCode and not HTML. In general it is very easy to break anything that expects one input but receives other. I think this is a key point here.

On one hand I agree this should not happen with default sample but on the other the invalid input was provided for the plugin.

I will need to ask someone from the team about this ticket to get different point of views.

comment:6 Changed 8 years ago by Jakub Ś

Component: Project : CKBuilderGeneral
Description: modified (diff)
Resolution: invalid
Status: closedreopened
Summary: BBCode output stops working when other plugins added via CKBuilderBBCode adds extra nodes when toggling modes in default sample.

We agree that it should not happen with default sample thus I'm confirming this issue. I have Edited main description a bit.

comment:7 Changed 8 years ago by Jakub Ś

Status: reopenedconfirmed
Version: 4.5.0

comment:8 Changed 8 years ago by Alan Howshall

Many thanks for re-opening and confirming. Will look forward to hearing further progress.

comment:9 Changed 8 years ago by Alan Howshall

Any progress or likely timescales on this in 3 months since raising?

comment:10 Changed 7 years ago by Alan Howshall

Any update or likely timescales for a fix of this confirmed issues? It's now been 9 months since I originally raised...

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy