User tests: Successful: Unsuccessful:
This creates the ability for an editor-xtd plugin to return an array of buttons, instead of just one button object.
To test, replace this code in
/plugins/editors-xtd/readmore/readmore.php
return $button;
with:
$button2 = new JObject;
$button2->modal = false;
$button2->class = 'btn';
$button2->onclick = 'alert("Hurray!");return false;';
$button2->text = 'An extra button!';
$button2->name = 'smiley-2';
$button2->link = '#';
return array($button, $button2);
Result after patch (using core TinyMCE editor):
The reason I would like this to make it into J3.5 is because of the changes made to the way the new TinyMCE handles the editor buttons.
This makes it impossible to 'manipulate' the html output of the buttons and make an editor button plugin create multiple buttons.
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Is this a new feature?
I updated the description: Request to get this into J3.5
Yes, it is a new 'feature'. Or more an added ability.
If this does not make it into Joomla 3.5 I will need to drop support for the TinyMCE editor in J3.5 for one of my extensions.
PS: There is no change in behaviour for any existing editor plugin extensions. They will all just keep working.
I have tried to test this. New button with smiley face is coming but readmore button functionality is not working properly.
When i clicked readmore button between two paragraph in the article, on the front end it is just introducing new line between the two paragraph. Either i am using readmore button wrong way or there is some problem.
Reply me what is it!
I have tested this item successfully on b50885b
Tested using two editor-xtd plugins from my custom extension. After patch, the two plugins still work as before. Plus, with this change, I can now merge two plugins into one (which is generating two buttons)
@shubhamnba2009 That's how the readmore button works.
You can test how it works before the patch. Should do the same.
I have tested this item successfully on b50885b
The new button came on TinyMCE editor as expected.
Status | Pending | ⇒ | Ready to Commit |
RTC
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-05 19:27:08 |
Closed_By | ⇒ | wilsonge |
Merged
Labels |
Removed:
?
|
Milestone |
Added: |
Thanks :)
@dgt41 Would like you to look at this too