Good morning, I know that there must be an answer somewhere but I'm looking for 2 days without a solution. I have this URL generated by CKEditor when I upload an image with KCFinder. <img alt="" src="/sistema/kcfinder/upload/images/giant-talon-01.jpg" style="height:492px; width:800px" /> but how can I save this url in the field of a table and then show it in the browser, I need it to be like this: images/giant-talon-01.jpg
I'm two days looking and trying everything I could find but nothing works. I'm using CKEditor 4.1 with integrated KCFinder. I can not understand that an application as complete as CKEditor not have a clear solution to this because the help files are very complicated and the suggestions of others are wrong and do not work too. Many thanks to all,
Paulo
I did something similar in
Hi flh,
Hi flh,
I tested its function but it did not work, maybe not replace the values correctly. With the function str_replace could get to it: <img alt="" src="/sistema/kcfinder/upload/images/favela.jpg" style="height:425px; width:650px" />
But as the image size is variable, does not work on images with different size specified by str_replace:
$frase = $row['imagem'];
$frase = str_replace(' ','',$frase);
$saudavel = array('<img','alt=""','/sistema/','src="','style="height:425px;width:650px"/>','"/>','"');
$saboroso = array('');
$novafrase = str_replace($saudavel, $saboroso, $frase);
I changed the config.js CKEditor well: CKEDITOR.config.disableObjectResizing = true, and it worked only once, the second did not work anymore, can not understand why.
I need to configure CKEditor to disable the inclusion of the Style tag = height-width and have a url like this output: <img alt="" src="/sistema/kcfinder/upload/images/favela.jpg"/>
Thank you for your help, I will continue trying to find a solution.
Paulo
Well my first proposal did
Well my first proposal did give what you asked for the 1st time - I checked now myself.
For the second result, I confirmed that this will work:
Sorry, did not mean that the
Sorry, did not mean that the function was wrong but I was wrong to replace the values as my table.
I'll test again to confirm ok?
Well, I just solve the problem, see the solution I found:
$frase = $row['imagem'];
$frase = str_replace(' ','',$frase);
$saudavel = array('<img','alt=""','/sistema/','src="','"/>','"');
$saboroso = array('');
$novafrase = str_replace($saudavel, $saboroso, $frase);
$posicao = strpos($novafrase, 'jpg');
$sai = substr($novafrase, $posicao+3);
$saindo = ('');
$novafrasee = str_replace($sai, $saindo, $novafrase);
I think there is some redundancy in the code but I'll keep testing though as it is now works well.
Forgive me if I expressed it badly, you were a great help my friend.
A big hug and thank you.
Paulo
Wow! its function works
Wow! its function works perfectly well. What do you think of my solution? is redundant or consumes too much memory?
Big hug my friend, thank you
Thank me to
Hy,
This post it help me a lot. Thanks