Try to use the ARS button in TinyMCE.
I cna insert an ARS item
Nothing happens
I get a console error:
According to @nikosdion this is caused by a backward incompatible API break in the editor. See akeeba/release-system#126 (comment) for his explanation.
Labels |
Added:
?
|
Category | ⇒ | JavaScript |
I have only tried and succeeded to reproduce the issue with com_content (which uses JForm). However, how you display the editor should not break the API used by editor-xtd plugins to insert raw content into it.
Status | New | ⇒ | Discussion |
Hmm strange, how about moving these lines: https://github.com/joomla/joomla-cms/blob/staging/media/editors/tinymce/js/tinymce.js#L12-L15 after line 107?
Didn't work for me, but not sure if I did it right. JS is all magic to me.
you still need to compress that file or use debug mode
It turns out that it wasn't the core in this case
The editor
variable that is passed to the function has way too many quotes, so in arslink.php (the xtd-button) the js part should be:
$js = <<<JS
;// This comment is intentionally put here to prevent badly written plugins from causing a Javascript error
// due to missing trailing semicolon and/or newline in their code.
function arsSelectItem(id, title) {
var tag = '<a href='+'\"index.php?option=com_ars&view=Item&id='+id+'\">'+title+'</a>';
jInsertEditorText(tag, '$name');
jModalClose();
};
JS;
Why had this code been working ever since Joomla! 1.5.15 without a problem? Or why did JCE never had an issue with it? You can see the version history in https://github.com/akeeba/release-system/commits/development/plugins/editors-xtd/arslink/arslink.php The code is untouched since 2012. In fact it's untouched for much longer, I just didn't care enough to import older SVN history to Git :)
@nikosdion you used to have the javascript wrapped in double quotes till bda0d61afa7ee66a8c707b675450f74fe51bdc4b then you switched to <<<JS
but you forgot to take out the extra unneeded double quote an the dots from that variable. Why does this work with other editors? I have no clue, but honestly I find it extremely weird that this line actually resolves correctly the id in any js script
Closing as a vendor Problem.. thanks.
Status | Discussion | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-09-27 17:41:42 |
Closed_By | ⇒ | zero-24 |
@Bakual is the form that contains the editor field rendered through jform?