How to used html-editor in custom page (admin panel)
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
How to used html-editor in custom page (admin panel)
I made static-page builder (table/create/edit). With input text/checkbox all understandably. But textarea with vue.component not working.
Code: Select all
<textarea class="form-control item-content" required="required"
:is="html-editor"
:key="idx"
:id="cke-idx"
:value="<?= $enc->html( $this->get( 'itemData/html' ) ); ?>"
:name="item[html]"
:tabindex="6"
v-model="item['html']"
></textarea>
Re: How to used html-editor in custom page (admin panel)
Probably this is the problem:
Try instead:
Note the additional apostrophs!
Code: Select all
:value="<?= $enc->html( $this->get( 'itemData/html' ) ); ?>"
Code: Select all
:value="'<?= $enc->attr( $this->get( 'itemData/html' ) ); ?>'"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to used html-editor in custom page (admin panel)
Did not help. Does it have he to be additionally init js?aimeos wrote: ↑29 Oct 2020, 08:11 Probably this is the problem:Try instead:Code: Select all
:value="<?= $enc->html( $this->get( 'itemData/html' ) ); ?>"
Note the additional apostrophs!Code: Select all
:value="'<?= $enc->attr( $this->get( 'itemData/html' ) ); ?>'"
Re: How to used html-editor in custom page (admin panel)
Could you remove the colon here:
Code: Select all
is="html-editor"
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to used html-editor in custom page (admin panel)
If moved textarea block to first tab its working. Move in the second tab, not working...
Code: Select all
<div class="row item-container">
<div class="col-md-3 item-navbar">
<div class="navbar-content">
<ul class="nav nav-tabs flex-md-column flex-wrap d-flex justify-content-between" role="tablist">
<li class="nav-item basic">
<a class="nav-link active" href="#basic" data-toggle="tab" role="tab" aria-expanded="true" aria-controls="basic"><?= $enc->html( $this->translate( 'admin', 'Basic' ) ); ?></a>
</li>
<li class="nav-item page">
<a class="nav-link" href="#page" data-toggle="tab" role="tab" aria-expanded="false" aria-controls="page"><?= $enc->html( $this->translate( 'admin', 'Page' ) ); ?></a>
</li>
</ul>
</div>
</div>
<div class="col-md-9 item-content tab-content">
<div id="basic" class="row item-basic tab-pane fade show active" role="tabpanel" aria-labelledby="basic">
<div class="col-xl-6 content-block vue-block">
<!-- forms first tab -->
</div>
</div>
<div id="page" class="row item-page tab-pane fade" role="tabpanel" aria-labelledby="page">
<div class="form-group row mandatory">
<div class="col-sm-12">
<textarea class="form-control item-content" required="required"
is="html-editor"
key="idx"
id="cke-idx"
:value="'<?= $enc->attr( $this->get( 'itemData/html' ) ); ?>'"
name="itemData[html]"
:tabindex="6"
></textarea>
</div>
</div>
</div>
</div>
</div>
Re: How to used html-editor in custom page (admin panel)
Each panels is it's own Vue applications. If you add your own one, you need to add a "vue-block" CSS class too to make them a Vue application:
Code: Select all
<div class="form-group row mandatory vue-block">
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
Re: How to used html-editor in custom page (admin panel)
Thank you for help!aimeos wrote: ↑31 Oct 2020, 09:43 Each panels is it's own Vue applications. If you add your own one, you need to add a "vue-block" CSS class too to make them a Vue application:Code: Select all
<div class="form-group row mandatory vue-block">