Custom content block including Concrete5's toolbar
Permalink 1 user found helpful
Hello,
I would like to know if there is a way to add the Concrete5 toolbar that allows you add images/links/files etc (see attached file) into my own custom block so that i can add images from the library into a content block. I've look around and can't find anything about it anywhere...
Thanks in advance,
Joshua :)
I would like to know if there is a way to add the Concrete5 toolbar that allows you add images/links/files etc (see attached file) into my own custom block so that i can add images from the library into a content block. I've look around and can't find anything about it anywhere...
Thanks in advance,
Joshua :)
Thanks for this, it does show what i want but now the images don't show in either edit mode or normal mode... it just displays the name of the image in the content box, any ideas why?
When you are adding the block and add an image does it show correctly the very first time?
I'm guessing that you need to use the tranlateFrom and translateTo functions. What version of concrete5 are you using? The best way to grab these is different depending on that.
I'm guessing that you need to use the tranlateFrom and translateTo functions. What version of concrete5 are you using? The best way to grab these is different depending on that.
No, it never shows correctly.. sometime it displays a broken image and others just the title?
and I'm running the most up to date version...
and I'm running the most up to date version...
also, just looked at the source code and the reason it's not working is because it is putting /view_inline/ into the img src... if i remove that it works but surely i dont have to do that every time?
I'm sorry I don't think my question was clear, when you are still editing and have just added an image (not after you save) does it show you the image in the wysiwyg box?
If so, you need to add this to the save function
and this to the view function
So it translates your wysiwyg box to/from edit mode when you edit and save.
If so, you need to add this to the save function
Loader::helper('content')->translateTo($this->content);
and this to the view function
Loader::helper('content')->translateFrom($this->content);
So it translates your wysiwyg box to/from edit mode when you edit and save.
no, the image doesnt display anywhere.... it just varies from the title to a broken image thing.. even in the editor..
i added what you said and it still doesn't want to work!
i added what you said and it still doesn't want to work!
If you use just the regular Content block do the images show correctly in the editor?
i've just checked and no they dont :( they were working fine this morning though... how strange
It almost seems like the BASE_URL in your /config/site.php might be wrong
i've just looked in my site.php and there is nothing that says BASE_URL... is there supposed to be?
Try adding this to your /config/site.php with your URL
define('BASE_URL', 'http://www.yoururl.com');
then when you create your wysiwyg textarea you do this
That should give you the wysiwyg editor with the bar that you are looking for.