mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-01-24 07:18:41 +00:00
autoselect tab with content
This commit is contained in:
parent
b10e5b00a2
commit
80b190ab3e
|
|
@ -60,7 +60,7 @@ class TextView extends View
|
|||
* @var string
|
||||
* @since 1.0.0
|
||||
*/
|
||||
private string $plain = '';
|
||||
protected string $plain = '';
|
||||
|
||||
/**
|
||||
* Preview content
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<div id="<?= $this->renderId(); ?>" class="tabview tab-2 m-editor">
|
||||
<ul class="tab-links">
|
||||
<li><label tabindex="0" for="<?= $this->renderId(); ?>-c-tab-1"><?= $this->getHtml('Text', 'Editor'); ?></label>
|
||||
<li><label tabindex="0" for="<?= $this->renderId(); ?>-c-tab-2"><?= $this->getHtml('Preview', 'Editor'); ?></label>
|
||||
<li<?= !empty($this->plain) ? ' class="active"' : ''; ?>><label tabindex="0" for="<?= $this->renderId(); ?>-c-tab-2"><?= $this->getHtml('Preview', 'Editor'); ?></label>
|
||||
</ul>
|
||||
<div class="tab-content">
|
||||
<input type="radio" id="<?= $this->renderId(); ?>-c-tab-1" name="tabular-1" checked>
|
||||
<input type="radio" id="<?= $this->renderId(); ?>-c-tab-1" name="tabular-1">
|
||||
<div class="tab">
|
||||
<textarea
|
||||
tabindex="0"
|
||||
|
|
@ -17,9 +17,9 @@
|
|||
<input type="hidden" id="<?= $this->renderId(); ?>-parsed">
|
||||
</div>
|
||||
|
||||
<input type="radio" id="<?= $this->renderId(); ?>-c-tab-2" name="tabular-1">
|
||||
<input type="radio" id="<?= $this->renderId(); ?>-c-tab-2" name="tabular-1"<?= !empty($this->plain) ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<article data-tpl-text="<?= $this->renderTplText(); ?>" data-tpl-value="<?= $this->renderTplValue(); ?>"><?= $this->renderPreview(); ?></article>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user