Jump to content

Show Image URL Option


LostKobrakai
 Share

Recommended Posts

Hi,

I've installed ACE Text Editor today and it's awesome to directly write markdown in a really good looking way. But what I found to be tricky is to insert images there. It would be nice to get some kind of image import like in TinyMCE there, but I think this could be a little time consuming. So I got myself a little workaround. I've added a little input below the description to the ImageField module to show me the url, so I can easily copy it into my body. This would be a nice optional feature to have, so people could activate it if needed.

	protected function ___renderItem($pagefile, $id, $n) {

		$thumb = $pagefile;

		if($this->adminThumbs && $thumb->height > $this->adminThumbHeight) {
			// create a variation for display with this inputfield
			$thumb = $thumb->height($this->adminThumbHeight);
		}

		$out = 	[...]
			// own Code
			"\n\t\t\t<input disabled style='width: 99%' type='text' name='url_$id' value='{$pagefile->url}' />" .
			// End own Code
			"\n\t\t</p>";

		return $out;
	}
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...