Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
add preview ui variable anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
Qoraiche committed May 10, 2019
1 parent 42b7d4a commit d97a855
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
9 changes: 9 additions & 0 deletions resources/scss/_custom-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -320,4 +320,13 @@ p {

.nav-link.disabled {
color: #6c757d !important;
}

.maileclipse-key::before {
content: '\f13d';
position: relative;
margin: -21px 1px;
font-family: FontAwesome;
font-size: 10px;
color: #087fff;
}
10 changes: 3 additions & 7 deletions src/mailEclipse.php
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@ static public function renderPreview($simpleview = false, $view, $template = fal

foreach ($_data as $key => $value) {
if (!is_object($value)) {
$_data[$key] = "{{ $key }}";
$_data[$key] = '<span class="maileclipse-key" title="Variable">'.$key.'</span>';
}
}

Expand All @@ -827,16 +827,12 @@ static public function renderPreview($simpleview = false, $view, $template = fal
try {

if ($simpleview) {

$renderer_html = view($_view, $_data)->render();
return $renderer_html;

return htmlspecialchars_decode(view($_view, $_data)->render());
}

$_md = self::buildMailable(Markdown::class, 'make');
$renderer_html = $_md->render($_view, $_data);

return $renderer_html;
return htmlspecialchars_decode($_md->render($_view, $_data));

} catch (ErrorException $e) {

Expand Down

0 comments on commit d97a855

Please sign in to comment.