Make WordPress Core

Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#29357 closed defect (bug) (invalid)

tinymce.activeEditor.formatter.apply is not working properly for links

Reported by: unsalkorkmaz's profile unsalkorkmaz Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0
Component: TinyMCE Keywords: reporter-feedback
Focuses: javascript Cc:

Description

tinymce.activeEditor.formatter.apply is working properly for other dom elements (like span, div etc.) but it has problems with <a> element when there is a different attribute already presense.

How to reproduce:

  1. Install http://wordpress.org/plugins/firmasite-theme-enhancer/ plugin, it will add 2 custom buttons to editor.
  2. In editor, when you select normal text and use Styles -> Link to Button -> Button Color -> Standard from dropdown menu, it will successfully apply css to text for making it a button..

but if you select a predefined <a> element with an attribute like this example:
<a rel="nofollow" href="#">simple test</a>
and try to apply same Styles -> Link to Button -> Button Color -> Standard from dropdown menu, it wont work

(Sorry if its not core related but i believe its a bug in core, maybe compat3x plugin causing problem. This code was working before wp3.9 with plugin's 1.2.5 version.)
Related js file:
http://plugins.svn.wordpress.org/firmasite-theme-enhancer/tags/1.3.1/theme-enhancer/assets/js/firmasite-button.js

Change History (3)

#1 @helen
11 years ago

  • Keywords reporter-feedback added

Just to clarify - was this broken in 3.9 or in trunk?

#2 @azaozz
10 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to invalid
  • Status changed from new to closed

Looking at the plugin, it seems you've updated it and converted the TinyMCE plugin to the new APIs in version 4.0. Assuming that fixed any issues you had. If something is still not working well, a better place to report it would be on the TinyMCE bug tracker: http://www.tinymce.com/develop/bugtracker.php.

#3 @unsalkorkmaz
10 years ago

@helen it was working properly before 4.0.
@azaozz problem started after i converted to new API. So converted version have this problem :-/

Note: See TracTickets for help on using tickets.