View Issue Details

IDProjectCategoryView StatusLast Update
0006884WYSIWYG Editor + Media Gallerymodule WYSIWYG Editor + Media Gallery - subpublic2019-04-18 17:37
Reportermario_lorenz Assigned To 
PrioritynormalSeverityfeatureReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.1.1 
Fixed in Version2.2.0 
Summary0006884: several WYSIWYG on one admin page are initiated exponentially by JavaScript
DescriptionI've written a backend module where I initialize three WYSIWYG editors simultaneously on one admin page. There are now 9 editors in my backend module, instead of three as expected. If I look at the source code, there is HTML markup for three editors. Only the editors are initialized three times by Javascript (three times for three editors).
Steps To ReproduceIn the Attachment you´ll find my controller-class and the template.
TagsAdmin Template, JavaScript, WYSIWYG
Attached Files
class_and_template.zip (2,525 bytes)

Activities

QA

2018-08-15 09:51

administrator   ~0012581

Hi mario_lorenz

thank you for reporting the behaviour.

Since it isn't intented to have more than one editor per default, I will change the entry from bug to feature as I see that it is a scenario which could be common to want to have more than one editor on a page.
In the meantime, as a workaround, you could create new tabs and add in each one a single editor instance.

QA

2018-08-15 09:55

administrator   ~0012582

Steps to reproduce:

1. Activate the Module WYSIWYG Editor + Mediathek

2. \OxidEsales\EshopCommunity\Application\Controller\Admin\ArticleMain::render
 
$this->_aViewData["editor"] = $this->_generateTextEditor(
    "100%",
    300,
    $oArticle,
    "oxarticles__oxlongdesc",
    "details.tpl.css"
);
 

Replace with
$this->_aViewData["editor"] = $this->_generateTextEditor(
    "100%",
    300,
    $oArticle,
    "oxarticles__oxlongdesc",
    "details.tpl.css"
);

$this->_aViewData["editor1"] = $this->_generateTextEditor(
    "100%",
    300,
    $oArticle,
    "oxarticles__oxlongdesc",
    "details.tpl.css"
);

$this->_aViewData["editor2"] = $this->_generateTextEditor(
    "100%",
    300,
    $oArticle,
    "oxarticles__oxlongdesc",
    "details.tpl.css"
);



3. /vendor/oxid-esales/oxideshop-ee/Application/views/admin/tpl/include/editor.tpl
[{else}]
    [{$editor}]
    <div class="messagebox">[{oxmultilang ident="EDITOR_PLAINTEXT_HINT"}]</div>
[{/if}]


Replace with
[{else}]
    [{$editor}]
    <div class="messagebox">[{oxmultilang ident="EDITOR_PLAINTEXT_HINT"}]</div>
[{/if}]
[{$editor1}]
[{$editor2}]

mario_lorenz

2018-08-20 14:00

developer   ~0012586

Hi QS,

thanks for your note. Yes, please add this feature in a next release. Because i´ve several Modules with more then one WYSIWYG-Editor. One module has dynamic via PHP instanciated Editors and some Modules with a whole Admin-Page (not with List-View on top and details view on bottom). In both cases i could not seperate the editors in tabs.

In the meantime i use my for OXID6 refactored Editor from OXID4.

mario_lorenz

2018-09-07 12:41

developer   ~0012609

Add a Pull-Request to GitHub: https://github.com/OXID-eSales/ddoe-wysiwyg-editor-module/pull/10

robert blank

2019-01-18 11:45

reporter   ~0012767

Last edited: 2019-01-21 11:14

Bug resolved with https://github.com/OXID-eSales/ddoe-wysiwyg-editor-module/pull/10

Thank You Mario Lorenz!

As this bug was considered not a bug, but a missing feature, the fix was considered a feature. It was released with v2.2.0.
See https://github.com/OXID-eSales/ddoe-wysiwyg-editor-module/compare/v2.1.1...v2.2.0