Hello,
The TinyMCE wysiwyg plugin occasionally encodes the tilde of MODx links (e.g., [[~1]]) to something like "%7E". I believe it’s an ASCII code.
I’ve set TinyMCE encoding to "raw" as a short term solution, but ideally I’d like to re-enable it and have TinyMCE ignore /only/ tildes. Has anyone else encountered this problem?
Do you know a work-around?
Thanks!
-
☆ A M B ☆
- 3,141 Posts
TinyMCE version?
MODx version?
What is being outputted on the front-end: [[~1]], ~1, or a link, or..?
The links that are formatted like this:
<a href="[[~115]]">
are converted to:
<a href="[[%7E115]]" _mce_href="[[~115]]">
when the page is opened for editing and the visual editor is active.
Browsers use the href property, not the _mce_href.
MODx Revolution version 2.0.0-pl rev7212
Any help you can offer would be great!
Browsers will not read [[~115]] neither. I think you are looking into the manager code only. Take a look to your website output and paste it the generated code. It can not be: <a href="[[%7E115]]" _mce_href="[[~115]]">, it should be something like <a href="/mysite/homepage.html" >
So I converted my links to friendly URLs using the .htaccess file. Great.
However, still whenever I open a file in the MODx manager (with TinyMCE set as the default editor), it automatically converts the links from friendly urls to the %7E# format.
This is what happens: I load the resource, it initially displays (for half a second) in the default MODx HTML editor. Then TinyMCE loads and the view refreshes to the wysiwyg editor. If at this point I hit "Cancel" it asks me if I want to discard my changes. Since I haven’t modified the resource, TinyMCE has already applied their link formatting to the friendly URLs.
If instead of cancelling I open the HTML editor, I can clearly see the following: <li><a href="[[%7E53]]" _mce_href="[[~53]]">Link title</a></li>
That [[%7E53]] used to be an html link. If I save the document, the link will publish as is and it will cease to be navigable.
Just to be absolutely clear, the link goes from <a href="/directory/page.html" _mce_href="/directory/page.html">Link</a> to <a href="[[%7E#]]" _mce_href="[[~#]]">Link</a>
If I then replace the %7E# link with a friendly URL and save the resource, the page will update with the correct link.
Any ideas?