I am wanting to create a script that will scan a folder on the sever and then create links to the html pages in the folder. When clicked the links need to load the content of the selected html file into the tiny mce wysiwyg editor and allow the user to edit the file.
I am have no idea of how to go about creating editing links that load the contents of the file to the editor. Could someone help me with some code for this.
loading content into editor
Moderator: General Moderators
Re: loading content into editor
Well after you create the links (many ways to read content from a folder):ezhs8554 wrote:I am wanting to create a script that will scan a folder on the sever and then create links to the html pages in the folder. When clicked the links need to load the content of the selected html file into the tiny mce wysiwyg editor and allow the user to edit the file.
I am have no idea of how to go about creating editing links that load the contents of the file to the editor. Could someone help me with some code for this.
Code: Select all
//1 . for php 5 check http://www.php.net/~helly/php/ext/spl/
//2.
glob()
//3. classical
readdir() //etc.1. click on the link and refresh the whole page ....(getting content with
Code: Select all
file_get_contents()2. You could you AJAX stuff to do the same stuff without refreshing the whole page. -> fancy , using javascript, recommend on heavy page
3. You could load whole content in advance and then switch it with javascript -> not recommended
- ronverdonk
- Forum Commoner
- Posts: 34
- Joined: Sat Jun 10, 2006 7:06 am
- Location: Netherlands