mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-12 16:28:42 +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
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private string $plain = '';
|
protected string $plain = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Preview content
|
* Preview content
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<div id="<?= $this->renderId(); ?>" class="tabview tab-2 m-editor">
|
<div id="<?= $this->renderId(); ?>" class="tabview tab-2 m-editor">
|
||||||
<ul class="tab-links">
|
<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-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>
|
</ul>
|
||||||
<div class="tab-content">
|
<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">
|
<div class="tab">
|
||||||
<textarea
|
<textarea
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
|
|
@ -17,9 +17,9 @@
|
||||||
<input type="hidden" id="<?= $this->renderId(); ?>-parsed">
|
<input type="hidden" id="<?= $this->renderId(); ?>-parsed">
|
||||||
</div>
|
</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">
|
<div class="tab">
|
||||||
<article data-tpl-text="<?= $this->renderTplText(); ?>" data-tpl-value="<?= $this->renderTplValue(); ?>"><?= $this->renderPreview(); ?></article>
|
<article data-tpl-text="<?= $this->renderTplText(); ?>" data-tpl-value="<?= $this->renderTplValue(); ?>"><?= $this->renderPreview(); ?></article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user