mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-22 21:30:54 +01:00
added ability to set a base href, to get relative image-pathes working in htmlarea
This commit is contained in:
parent
3ca724bf61
commit
5594a20a3b
@ -157,7 +157,7 @@
|
|||||||
@param $content string of the htmlarea (will be run through htmlspecialchars !!!), default ''
|
@param $content string of the htmlarea (will be run through htmlspecialchars !!!), default ''
|
||||||
@param $style string inline styles, eg. dimension of textarea element
|
@param $style string inline styles, eg. dimension of textarea element
|
||||||
*/
|
*/
|
||||||
function htmlarea($name,$content='',$style='')
|
function htmlarea($name,$content='',$style='',$base_href='')
|
||||||
{
|
{
|
||||||
if (!$style) $style = 'width:100%; min-width:500px; height:300px;';
|
if (!$style) $style = 'width:100%; min-width:500px; height:300px;';
|
||||||
|
|
||||||
@ -187,7 +187,14 @@
|
|||||||
// var htmlareaConfig = new HTMLArea.Config();
|
// var htmlareaConfig = new HTMLArea.Config();
|
||||||
// htmlareaConfig.editorURL = '."'$this->phpgwapi_js_url/htmlarea/';
|
// htmlareaConfig.editorURL = '."'$this->phpgwapi_js_url/htmlarea/';
|
||||||
</script>\n";
|
</script>\n";
|
||||||
|
|
||||||
|
// set a base href to get relative image-pathes working
|
||||||
|
if ($base_href)
|
||||||
|
{
|
||||||
|
$GLOBALS['phpgw_info']['flags']['java_script_thirst'] .= '<base href="'.
|
||||||
|
($base_href[0] != '/' && substr($base_href,0,4) != 'http' ? $GLOBALS['phpgw_info']['server']['webserver_url'].'/' : '').
|
||||||
|
$base_href.'" />'."\n";
|
||||||
|
}
|
||||||
$GLOBALS['phpgw_info']['flags']['java_script'] .=
|
$GLOBALS['phpgw_info']['flags']['java_script'] .=
|
||||||
'<script type="text/javascript">
|
'<script type="text/javascript">
|
||||||
var htmlareaConfig = new HTMLArea.Config();
|
var htmlareaConfig = new HTMLArea.Config();
|
||||||
|
Loading…
Reference in New Issue
Block a user