mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-23 16:33:17 +01:00
* email: fix for ->no initial border on plaintext editor textarea<-
This commit is contained in:
parent
8e41dc91ff
commit
c361ef0219
@ -596,9 +596,9 @@
|
|||||||
$this->t->set_var('mimeType', 'html');
|
$this->t->set_var('mimeType', 'html');
|
||||||
$ishtml=1;
|
$ishtml=1;
|
||||||
} else {
|
} else {
|
||||||
$style="border:0px; width:100%; height:400px;";
|
$border="1px solid gray; margin:1px";
|
||||||
// initalize the CKEditor Object to enable switching back and force
|
// initalize the CKEditor Object to enable switching back and force
|
||||||
$editor = html::fckEditorQuick('body', 'ascii', $sessionData['body'],'400px','99%');
|
$editor = html::fckEditorQuick('body', 'ascii', $sessionData['body'],'400px','99%',false,$border);
|
||||||
$this->t->set_var('tinymce', $editor); //html::fckEditorQuick('body', 'ascii', $sessionData['body'],'400px','99%'));
|
$this->t->set_var('tinymce', $editor); //html::fckEditorQuick('body', 'ascii', $sessionData['body'],'400px','99%'));
|
||||||
$this->t->set_var('mimeType', 'text');
|
$this->t->set_var('mimeType', 'text');
|
||||||
$ishtml=0;
|
$ishtml=0;
|
||||||
|
@ -883,7 +883,6 @@ function setupPlainEditor(plaineditor, height)
|
|||||||
{
|
{
|
||||||
//Do some presets on the new editor
|
//Do some presets on the new editor
|
||||||
plaineditor.style.width = "99%";
|
plaineditor.style.width = "99%";
|
||||||
plaineditor.style.borderWidth = 0;
|
|
||||||
plaineditor.style.height = height;
|
plaineditor.style.height = height;
|
||||||
plaineditor.style.borderWidth = "1px";
|
plaineditor.style.borderWidth = "1px";
|
||||||
plaineditor.style.borderStyle = "solid";
|
plaineditor.style.borderStyle = "solid";
|
||||||
|
@ -184,7 +184,7 @@
|
|||||||
|
|
||||||
<!-- BEGIN simple_text -->
|
<!-- BEGIN simple_text -->
|
||||||
<div id="editorArea">
|
<div id="editorArea">
|
||||||
<TEXTAREA class="input_text" name="body" style="width:99%; height:100%" wrap="virtual" wrap="soft">{body}</TEXTAREA>
|
<TEXTAREA class="input_text" name="body" style="width:99%; height:100%; border:1px solid gray; margin:1px" wrap="virtual" wrap="soft">{body}</TEXTAREA>
|
||||||
</div>
|
</div>
|
||||||
<!-- END simple_text -->
|
<!-- END simple_text -->
|
||||||
|
|
||||||
|
@ -170,7 +170,8 @@ class html
|
|||||||
$Protocol = '(http:\/\/|(ftp:\/\/|https:\/\/))'; // only http:// gets removed, other protocolls are shown
|
$Protocol = '(http:\/\/|(ftp:\/\/|https:\/\/))'; // only http:// gets removed, other protocolls are shown
|
||||||
$Domain = '([\w-]+\.[\w-.]+)';
|
$Domain = '([\w-]+\.[\w-.]+)';
|
||||||
$Subdir = '([\w\-\.,@?^=%&;:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
|
$Subdir = '([\w\-\.,@?^=%&;:\/~\+#]*[\w\-\@?^=%&\/~\+#])?';
|
||||||
$Expr = '/' . $NotAnchor . $Protocol . $Domain . $Subdir . '/i';
|
$optBracket = '';
|
||||||
|
$Expr = '/' . $NotAnchor . $Protocol . $Domain . $Subdir . $optBracket . '/i';
|
||||||
|
|
||||||
$result = preg_replace( $Expr, "<a href=\"$0\" target=\"_blank\">$2$3$4</a>", $result );
|
$result = preg_replace( $Expr, "<a href=\"$0\" target=\"_blank\">$2$3$4</a>", $result );
|
||||||
|
|
||||||
@ -552,13 +553,15 @@ class html
|
|||||||
* @param string $_height='400px'
|
* @param string $_height='400px'
|
||||||
* @param string $_width='100%'
|
* @param string $_width='100%'
|
||||||
* @param boolean $_purify=true
|
* @param boolean $_purify=true
|
||||||
|
* @param string $_border='0px' NOT used for CKEditor
|
||||||
* @return string the necessary html for the textarea
|
* @return string the necessary html for the textarea
|
||||||
*/
|
*/
|
||||||
static function fckEditorQuick($_name, $_mode, $_content='', $_height='400px', $_width='100%',$_purify=true)
|
static function fckEditorQuick($_name, $_mode, $_content='', $_height='400px', $_width='100%',$_purify=true, $_border='0px')
|
||||||
{
|
{
|
||||||
if (!self::htmlarea_availible() || $_mode == 'ascii')
|
if (!self::htmlarea_availible() || $_mode == 'ascii')
|
||||||
{
|
{
|
||||||
return "<textarea name=\"$_name\" style=\"width:100%; height:400px; border:0px;\">$_content</textarea>";
|
//TODO: use self::textarea
|
||||||
|
return "<textarea name=\"$_name\" style=\"".($_width?" width:".$_width.';':" width:100%;").($_height?" height:".$_height.';':" height:400px;").($_border?" border:".$_border.';':" border:0px;")."\">$_content</textarea>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user