How Can i Fetch Text File Content into FCk Editor

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
bhagwat
Forum Newbie
Posts: 13
Joined: Sat Jun 14, 2008 12:28 am

How Can i Fetch Text File Content into FCk Editor

Post by bhagwat »

Hello
My Objective is to,
assign the value of FCK Editor from Text File Content.
Please Help Me
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: How Can i Fetch Text File Content into FCk Editor

Post by onion2k »

The fact it's FCKEditor is irrelevant ... you just need to stick the content into the textarea that FCK is attached to. Open the file with file_get_contents() and echo the contents into the right bit of the html. You might need to use htmlentities() on it depending on what's in the file.
bhagwat
Forum Newbie
Posts: 13
Joined: Sat Jun 14, 2008 12:28 am

Re: How Can i Fetch Text File Content into FCk Editor

Post by bhagwat »

Thanks For Reply.
I am already use this function.
when i read the content of doc file then the formatting of text is ruined.
Please Help Me.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: How Can i Fetch Text File Content into FCk Editor

Post by John Cartwright »

Are you refering to the line breaks not appearing correctly? Try passing the contents through nl2br()
bhagwat
Forum Newbie
Posts: 13
Joined: Sat Jun 14, 2008 12:28 am

Re: How Can i Fetch Text File Content into FCk Editor

Post by bhagwat »

thank you Sir,
When i am passing the content of doc file into text area of FCK Editor. then the data shown i n this format.





ÐÏࡱá����������������>��þÿ ���������������J����������M������þÿÿÿ����I���ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿì¥Á�[€ ��ð¿�������������À���bjbj¬ú¬ú������������������ �@>��ΐ�ΐ�‚���������������������"�������ÿÿ���������ÿÿ���������ÿÿ�����������������·�����R������R��•������•������å������å������å�������������ÿÿÿÿ����ù������ù������ù��8���1��l�����4���ù������ã+��p��Ñ������Ñ�����á������á������á������â������â������â������†+�����ˆ+������ˆ+������ˆ+������ˆ+������ˆ+������ˆ+������S.��¢��õ0��j���ˆ+���������������������å������Î����������������������¢��@���â������Î������Î������ˆ+��������������•������•������á��������������á��Á��+�����Ö!������Ö!������Ö!������Î��š���•��8���á������å������á������†+��������������Ö!������������������������������������������������������Î������†+��������������Ö!������Ö!��V���*��@���Í���������������������������������������������������������������������Æ*������á������ÿÿÿÿ���� €Öû“ÏÈ��������ù������h��¢��B*�������������r+�����³+��0���ã+������N*��x���_1������
��ô��_1�����Æ*������������������������������������������������������������������������������_1��������������å������Æ*��¬���â��"��������Ö!�����������0��ž�����������������������������������â������â������â������ˆ+������ˆ+��������������������������������������þ��Ø����������������������������������â������â������â������ã+������Î������Î������Î������Î��������������ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ������������ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����ÿÿÿÿ����_1������â������â������â������â������â������â��������������������������������������������������������������â������â������â������R�� ��[��:����� ��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������BHAGWAT SINGH
er.bhagwatsingh@yahoo.co.in
er.bhagwatsingh@gmail.com
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: How Can i Fetch Text File Content into FCk Editor

Post by onion2k »

"doc file"? You mean it's a Microsoft Word document? You can't load that into FCKEditor. You need to export it from Word as either HTML or plain text. .doc is a very complicated format that's pretty much impossible to use in a web based CMS.
bhagwat
Forum Newbie
Posts: 13
Joined: Sat Jun 14, 2008 12:28 am

Re: How Can i Fetch Text File Content into FCk Editor

Post by bhagwat »

Actually i want to convert doc to pdf so i use this.
if there is any other method then tell me the solution.
please help me.
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Re: How Can i Fetch Text File Content into FCk Editor

Post by John Cartwright »

The only way that I know of is to use COM, and your going to need to have microsoft word installed on the server. Heres a code snippet I found for you, http://www.wynia.org/wordpress/word-to- ... -word2pdf/
Post Reply