Comments (10)
Can you attach some screens with the issues?
Thanks!
from yii2-imperavi-widget.
Hope this helps http://pbrd.co/1wROx98
from yii2-imperavi-widget.
Do you have some JS conflicts? Or JS errors?
from yii2-imperavi-widget.
Yep.
ReferenceError: RedactorPlugins is not defined
It's strange that i've got only one tho, because both are undefined.
from yii2-imperavi-widget.
Really strange. Can you show your full and real code, because I can't reproduce the bug?
Thanks!
from yii2-imperavi-widget.
That's all I really can c&p, the other stuff is too complex/integrated.
But it's all the same, if I switch the calls (notes and content), the same happens, the last one doesnt get rendered. If I remove all "plugins" (s. obove) once more, both get rendered properly.
This only happens when "plugins" is there but empty.
use kartik\widgets\FileInput;
use vova07\imperavi\Widget as Redator;
use kartik\helpers\Html;
use kartik\widgets\ActiveForm;
<div class="container-fluid">
<?php $form = ActiveForm::begin(['options'=>
[
'enctype'=>'multipart/form-data'
]
]) ?>
<div class="row">
<span class="col-sm-12">
<?php if ($title->IsType1()): ?>
<?= $form->field($data, 'content_name')->textInput(['maxlength' => 255]) ?>
<?= $form->field($data, 'content')->widget(Redator::className(), [
'settings' => [
'lang' => 'en',
'minHeight' => 200,
'pastePlainText' => true,
'plugins' => [
#'counter',
#'textdirection',
]
]
]);
?>
<?php elseif ($title->IsType2()): ?>
<?= $form->field($data, 'content')->widget(FileInput::classname(), [
'options' => [
'accept' => '*',
'multiple' => false,
],
'pluginOptions' => [
'showPreview' => false,
'showRemove' => false,
'showUpload' => false,
'showCaption' => true,
'browseClass' => 'btn btn-primary btn-block',
'browseIcon' => '<i class="glyphicon glyphicon-file"></i> ',
'browseLabel' => Yii::t('app','Select'),
],
])->label(false);
?>
<?php endif; ?>
</span>
</div>
<div class="row">
<span class="col-sm-12">
<?= $form->field($titlecontent,'notes')->widget(Redator::className(), [
'settings' => [
'lang' => 'en',
'minHeight' => 200,
'pastePlainText' => true,
'plugins' => [
#'counter',
#'textdirection',
]
]
]);
?>
</span>
</div>
<div class="row">
<span class="col-sm-1 col-sm-offset-11">
<?= Html::submitButton(Yii::t('app','Apply'), ['class' => 'btn btn-primary']) ?>
</span>
</div>
<?php ActiveForm::end(); ?>
</div>
from yii2-imperavi-widget.
Having the same bug, falling back to 1.1.12.
Here's how I use the version 1.2.0:
use vova07\imperavi\Widget as ImperaviRedactor;
foreach (Language::getLanguages() as $lang) {
$content = $form->field($model, 'title'.$lang->url)->textInput();
$content.= $form->field($model, 'content'.$lang->url)->widget(
ImperaviRedactor::className(), [
'settings' => [
'buttonSource' => true,
'lang' => 'ua',
'pastePlainText' => true,
'minHeight' => 200,
'imageManagerJson' => Url::to(['/posts/default/images-get']),
'imageUpload' => Url::to(['/posts/default/image-upload']),
'plugins' => [
'clips',
'fullscreen',
'table',
'video',
'counter',
'imagemanager'
],
],
]);
}
As a result Imperavi Redactor Widget renders only on last iteration of foreach
, on other iterations I have simple textareas.
Moreover i have no errors in javascript console.
v. 1.1.12 works fine with my code.
from yii2-imperavi-widget.
Hi @lafiel and @blackwolfinsane !
Can you update to 1.2.1 and check if the issue was fixed?
Thanks!
from yii2-imperavi-widget.
Hi @vova07!
Thank you, in 1.2.1 everything is okay
from yii2-imperavi-widget.
Thank you @blackwolfinsane !
from yii2-imperavi-widget.
Related Issues (20)
- Как изменить цвет заголовка? HOT 1
- Sticky блок HOT 3
- Конструкция "="" в тегах <img> HOT 2
- Как изменить список удаляемых тегов? HOT 7
- GetImagesAction and GetFilesAction return invalid paths for files in subfolders
- При редактировании теряется форматирование HOT 1
- Some strange happens with versions HOT 1
- Как разрешить отображение тега "script" HOT 7
- Spell Check
- Редактор не сразу появляется при переключении табов компонента yii/bootstrap4/tabs HOT 1
- How to control buttons? HOT 5
- Проблема с тегом <p> HOT 3
- Редактор дублирует текст при вставке HOT 1
- How to add superscript and subscript buttons?
- Не выводится стиль форматирования h6
- Please add en.js to the language folder
- Тэг p внутри li
- CodeMirror implementation for source
- При загрузке картинки ошибка
- Bugs on adding an image
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yii2-imperavi-widget.