Jump to content

Update relative paths in TinyMCE


Nico Knoll
 Share

Recommended Posts

Hey,

it's always the same: I'm builing a local version of a webseite using TinyMCE fields in the backend with images etc. But after uploading to the live server the relative path to images and pages change (of course). It would be lovely to have a module or a function to refresh this relative paths in TinyMCE / textareas :)

What do you guys think?

/ Nico

Link to comment
Share on other sites

A good approch would be to store the installation path somewhere and when you load the admin path to compare it (maybe automatically) to the actual path. If the path is changed you could show a note "The path has changed - check for broken links?" directing to a page where you see all broken links with possible - working - fixes and a way to manually update them :)


Maybe only check after login like this "the password-system is updated bla bla" note in 2.3 :)

Link to comment
Share on other sites

If you set the textarea to content type html, in the field settings, PW will take care of it.

If you set the textarea to content type html, in the field settings, PW will take care of it.

  • Like 2
Link to comment
Share on other sites

I always develop on the same directory level as the site would be when live, so never had to deal with those issues.

Every new site has it's own vhost.

Yep, been doing this for a while now as well, and never looked back. It just saves you a lot of headaches.

Link to comment
Share on other sites

@Soma: Sorry for the misunderstanding - I really meant the local domain thing Martijn described :)

@Martijn: I use XAMPP for developing so I guess I just have to change the hostname table, haven't I?


And btw. it's "private/etc/hosts" on mac :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...