mirror of
https://github.com/friendica/friendica
synced 2025-04-23 03:50:13 +00:00
added code, quote styles to editor
This commit is contained in:
parent
8d0ba93436
commit
dfd3cef734
4 changed files with 29 additions and 53 deletions
|
@ -59,38 +59,11 @@
|
|||
$Text = preg_replace("(\[font=(.+?)\](.+?)\[\/font\])","<span style=\"font-family: $1;\">$2</span>",$Text);
|
||||
|
||||
// Declare the format for [code] layout
|
||||
$CodeLayout = '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="quotecodeheader"> Code:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="codebody">$1</td>
|
||||
</tr>
|
||||
</table>';
|
||||
$CodeLayout = '<code>$1</code>';
|
||||
// Check for [code] text
|
||||
$Text = preg_replace("/\[code\](.+?)\[\/code\]/is","$CodeLayout", $Text);
|
||||
// Declare the format for [php] layout
|
||||
$phpLayout = '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="quotecodeheader"> Code:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="codebody">$1</td>
|
||||
</tr>
|
||||
</table>';
|
||||
// Check for [php] text
|
||||
$Text = preg_replace("/\[php\](.+?)\[\/php\]/is",$phpLayout, $Text);
|
||||
|
||||
// Declare the format for [quote] layout
|
||||
$QuoteLayout = '<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="quotecodeheader"> Quote:</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="quotebody">$1</td>
|
||||
</tr>
|
||||
</table>';
|
||||
|
||||
$QuoteLayout = '<blockquote>$1</blockquote>';
|
||||
// Check for [quote] text
|
||||
$Text = preg_replace("/\[quote\](.+?)\[\/quote\]/is","$QuoteLayout", $Text);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue