-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.1.1
-
None
-
Using Chrome as a client browser
-
Any
-
MOODLE_21_STABLE
-
-
Using Google Chrome under both Windows and Linux I've experienced various strange issues with links in TinyMCE. I haven't seen these issues when using IE or Firefox.
If you insert some text on a new line, and then select the entire line and insert a hyperlink, then want to continue writing on the next line, duplicate links are created and can be seen in the TinyMCE source editor. These links are also saved which can have other consequences - e.g. when using Moodle Media.
Replication instructions:
- Create a new page
- In one of the TinyMCE editors type the text:
Line One
Line Two
- Select the text "Line One", and insert a link (e.g. to http://www.google.com), then press the insert button
- Hit return in the editor window
- View the HTML
In my example the result I'm seeing is:
<p><a href="http://www.google.com">Line One</a></p>
|
<p><a href="http://www.google.com"></a></p>
|
<p>Line Two</p>
|
Although this doesn't make a major difference in this example, if you're inserting Moodle Media, this has rather frustrating results. Since each video is stored as a URL, and the content of the tag is ignored for all intent and purposes, each copy of the URL is converted to a video even if it's empty. The result is that you end up with multiple copies of the same video on the same page - one for every time you hit the return key.