Hi,
Anyone using the LG Image Manager field? I like to use it because I already have the ImageManager and the FileManager from TinyMCE but it is giving me problems.
One of the problems is that the output of the field is enclosed within P tags, and also has a linefeed on the end.
I think it comes from TinyMCE config because the config states root elements should be put into P tags. But it doesn’t make sense to have that happen to the Image / File fields. It does however with the normal TinyMCE field so it has to stay in the config.
Anyone else experienced this?
I am not sure if I should report this a bug - although it feels like a bug.
Best, Sammi
Hi,
no I did not find anything out about this. But I used this ‘hack’ inside the plugin that uses the image.
$src = preg_replace("/\r\n|\n|\r/", "
", $src);
$src = strip_tags($src);
$src = str_replace(' ','',$src);
It just replaces newlines with html, then strips out all html and finally spaces.
Best, Sammi
I hope the author of this great plugin will be able to fix this 😉 Sammi
Hey Guys,
I’m on it… I have actually updated all of extensions so they are faster and follow the same programming guidelines. Hopefully I will be able to release them (with fixes) before the weeks end.
Cheers
Leevi: Looking forward to you updates!
kstatham: I am using the imgsizer plugin. That is the plugin that uses the LG image manager field. I know it is a hack but I put it into that plugin. So the plugin just gets the field including P tags and a linebreak. Then just below:
$src = str_replace(SLASH, "/", $src); // clean up passed src param
I added my code to clean that up.
I would have to do that in all plugins that use the field so that is obviously a terrible solution but I need something quick. I just could not find where the contents of the field was saved. If I would have - I would have hardcoded some fix there.
While doing this I discovered how terribly simple it is to create plugins for EE ( I even released one: IMG tag modifier). Now I need to understand more about how to create extensions, then modules - and then it is just a matter of time when I take over the world 😉
Best, Sambo
Hey all, I figured this out, for me at least:
The only way I found to fix this was: * edit the field, changing the fieldtype to textinput * change the formatting to something other than none * check the “change all entries” checkbox * change the field back to “none”, check the checkbox again
Fixed! No hack to the imgsizer plugin needed.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.