redactor-plugins icon indicating copy to clipboard operation
redactor-plugins copied to clipboard

Not functional under Redactor version 8.1.1

Open billdami opened this issue 12 years ago • 4 comments

This plugin does not seem to be working under version 8.1.1 (Oct 18th) of Redactor. I ran a quick test, adding console.log(html); immediately before the redactor.insertHtml(html); statement and it is correctly getting the selected html and cleaning it, however the insertHtml() call does not seem to modify the selection in the editor.

This is happening when using the editor in both textarea mode, and contenteditable element mode.

billdami avatar Oct 25 '12 15:10 billdami

None of the buttons in redactor seem to work in html view so i don't think it's a bug in my code.

I am using the same version as you are and is woking perfectly, I just updated the plugin, added buffer and sync. Could you please test it again?

Thank you

johnsardine avatar Oct 25 '12 16:10 johnsardine

Ok I tried your updated code and it seems like it does work in some cases, put other instances it does not behave as expected. One example is for the following html content:

<h1>Some Text</h1>
<div>test</div>

The resulting HTML is:

<h1></h1>
Some Text test

Or when executed on the content <h1>Some text</h1> the plugin will not modify the content at all.

billdami avatar Nov 01 '12 13:11 billdami

Hi, I also use this plugin, but same problem as @billdami

lichtner avatar Nov 07 '12 23:11 lichtner

I understand your problem, It happens on my side as well. If you do console.log(html); you will see tag free text, the problem is within redactor and the way it replaces the selection, and I can't change any of it.

@billdami if you select <h1>Some text</h1>, the selection will contain only Some text and since it's already tag free, it won't be changed.

johnsardine avatar Nov 08 '12 00:11 johnsardine