i am on the newest version of backdrop. i have ckeditor attached to the "full html" input format, and not to the "filtered html" format.

i have an image in the content. i saved the node with "filtered html" as the format. i edit, and here is a screenshot of that part of the html:

 

i change the format to "full html" and do nothing other than save the node with that format. then i edit it again, and here is the html for that image:

 

in addition to adding all that code around my image, now the ckeditor toolbar is completely disabled when i am in full html mode:

 

any ideas at all?

 

 

Comments

I guess you should first set format to "full html" and after that enter your code. If you enter the code before switching to "full html" mode (i.e. with "filtered" mode active) then it is treated as a usual text by ckeditor.

I am not completely sure but as far as I know it is not possible to mix both modes in the same text field.

On a side note, in case you want an image linking to some destination you can do that with just "filtered html" mode.

Also, you may want to adjust your ckeditor toolbar in Configuration -> Content authoring -> Text Editors and formats -> Filtered HTML. This allows you to add required tools or remove those you don't need.

thanks for the response, but i'm afraid none of that really helps.

ckeditor is purposely not attached to the filtered html format. it is attached to the full html format. i am somewhat familiar with the input formats and ckeditor toolbar configuration.

i am not trying to mix modes in a single field, i was switching up to demonstrate the problem. and also to work around it. the problem occurs only when SAVING the node with the full html format set. i can use the full html to enter content into the field no problem (that is how the image got there), but if i save it with that format, a bunch of extra html is added that i don't want (at one point it was even impacting the display). if i save it with filtered html selected (even if i have used full html to enter content), everything seems fine.

saving with the full html format is causing ckeditor to do things i don't want, and i can't see that i can turn it off. but at least now i think i can work around it.

after saving as full html, here is what happens. this screenshot shows the bottom of the actual image (the 4 boxes), and then the additional stuff that ckeditor is adding.

 

and here is the html generated by ckeditor that results in that rendering:


<p><span contenteditable="false" tabindex="-1"><span contenteditable="false" tabindex="-1"><a data-widget="image" href=""><img alt="Polypol Stroll" src="/files/inline-images/polypol-stroll.png" width="500" /></a><span style="background: rgba(220, 220, 220, 0.5) url(&quot;https://polygonpolitics.com/core/misc/ckeditor/plugins/widget/images/handle.png&quot;) repeat scroll 0% 0%; top: -15px; left: 0px; display: block;"><img draggable="true" height="15" role="presentation" src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" title="Click and drag to move" width="15" /></span><span title="Click and drag to resize">​</span></span><span style="background: rgba(220, 220, 220, 0.5) url(&quot;https://polygonpolitics.com/core/misc/ckeditor/plugins/widget/images/handle.png&quot;) repeat scroll 0% 0%; top: -15px; left: 0px; display: block;"><img alt="" draggable="true" height="15" role="presentation" src="data:image/gif;base64,R0lGODlhAQABAPABAP///wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==" title="Click and drag to move" width="15" /></span><span title="Click and drag to resize">​</span></span></p>

 

i am starting to wonder if the image itself is somehow corrupted, causing ckeditor to do wacky things. this problem does not seem to occur with other images. but with that image, i can never get the toolbar back once i save as full html. on any node i try it on. bizarre, but i cannot see any other possibility.

UPDATE:

i think i may see when this problem occurs.

we had removed the link icon from the ckeditor toolbar (which only appears when in full html mode), purposely.

it appears that when i add an <a> tag around the image directly in the html (while in filtered input mode), ckeditor adds a ton of html, including some attributes on the <a> tag.

however, if i put the link icon back into the ckeditor toolbar, and use full html and the toolbar to wrap the image in a link, it appears to work fine, without all the extra garbage. but i still have to save the node with filtered as the selected format.

i don't really understand why ckeditor is doing what it is doing, but whatever it is has changed sometime in the past month or so.