Pasted images are not visible in Ticket preview and opened ticket
When I paste an image in the editor I can see it well and have WYSIWIG-view. But it is not visible in the preview tab and not visible after saving. Additionally I can't refer to an uploaded image using redmines !image.png!. Any ideas?
If you paste images directly they will be encoded and placed into html code as base64 "data" Protocol. You have to enable this protocol in the config file from CKEditor! (see example file in the plugin directory of your redmine installation/redmine_ckeditor/config/ckeditor.yml.example and edit the file with your needs and copy the file into redmine installation/config/ckeditor.yml)
allowedProtocols: .....
- urn
- webcal
- xmpp - data
restart redmine/apache and you will be fine :)
is solution dose not work( Rm4.1
The following worked for me:
Add the following line in the end of the plugins/redmine_ckeditor/init.rb file:
(Loofah::VERSION >= "2.3.0" ? Loofah::HTML5::SafeList : Loofah::HTML5::WhiteList)::ALLOWED_PROTOCOLS.add('data')
Restart redmine
Yeah, config options don't work, but @RobertoCesar patch is OK. Is it possible to add it to the next release?
Do you need add the plugins: 'pastebase64' and 'base64image' In config.js add: config.extraPlugins = 'pastebase64'; config.extraPlugins = 'base64image';
And init.rb add: (Loofah::VERSION >= "2.3.0" ? Loofah::HTML5::SafeList : Loofah::HTML5::WhiteList)::ALLOWED_PROTOCOLS.add('data')
Working perfect!