| View previous topic :: View next topic |
| Author |
Message |
kGlz
Joined: 05 Feb 2007 Posts: 4 Location: Turkey
|
|
| Back to top |
|
 |
mq
Joined: 25 Nov 2006 Posts: 12
|
Posted: Sat Mar 24, 2007 3:01 pm Post subject: Re: PhpWord Text Editor |
|
|
nice project ; I can't make it run on Linux/ubuntu I would be pleased if you could make a screenshot.
I have also writen such text editor with WYSIWYG features. My probleme was to save file. As reading you code, it seems not to me a proble at all ? $textBuffer->get_text() would be enougth ...
There is some help (script) about building .xml file to build packages. I have done them by hand. |
|
| Back to top |
|
 |
mq
Joined: 25 Nov 2006 Posts: 12
|
Posted: Sat Mar 24, 2007 3:09 pm Post subject: Re: PhpWord Text Editor |
|
|
| mq wrote: |
nice project ; I can't make it run on Linux/ubuntu I would be pleased if you could make a screenshot.
I have also writen such text editor with WYSIWYG features. My probleme was to save file. As reading you code, it seems not to me a proble at all ? $textBuffer->get_text() would be enougth ... .
|
145 # $tbar->set_style(Gtk::TOOLBAR_BOTH);
this line does not work here. |
|
| Back to top |
|
 |
kGlz
Joined: 05 Feb 2007 Posts: 4 Location: Turkey
|
Posted: Sat Mar 24, 2007 5:49 pm Post subject: Re: PhpWord Text Editor |
|
|
| mq wrote: |
nice project ; I can't make it run on Linux/ubuntu I would be pleased if you could make a screenshot.
I have also writen such text editor with WYSIWYG features. My probleme was to save file. As reading you code, it seems not to me a proble at all ? $textBuffer->get_text() would be enougth ...
There is some help (script) about building .xml file to build packages. I have done them by hand. |
Hi mg.
My English some good
I can make it run Win Xp.and no problem.
Screenshot look here
My codes make it save file no problem.My program to look like MS wordpad.
Make save no problem.make in this way.
wordpad_class.php in line #480
| Code: | public function getText($page)
{
$buffer=$this->pages[$page]['buffer'];
$start=$buffer->get_start_iter();
$end=$buffer->get_end_iter();
return $buffer->get_text($start,$end);
} |
| Quote: | 145 # $tbar->set_style(Gtk::TOOLBAR_BOTH);
this line does not work here. |
if not work here it line again . you try
| Code: | | $tbar->set_style(2); |
Best wish
Last edited by kGlz on Thu Aug 16, 2007 11:23 pm; edited 1 time in total |
|
| Back to top |
|
 |
mq
Joined: 25 Nov 2006 Posts: 12
|
Posted: Sat Mar 24, 2007 8:21 pm Post subject: Re: PhpWord Text Editor |
|
|
| kGlz wrote: |
My English some good
I can make it run Win Xp.and no problem.
Screenshot look here
My codes make it save file no problem.My program to look like MS wordpad.
Make save no problem.make in this way.
wordpad_class.php in line #480
| Code: | public function getText($page)
{
$buffer=$this->pages[$page]['buffer'];
$start=$buffer->get_start_iter();
$end=$buffer->get_end_iter();
return $buffer->get_text($start,$end);
} |
| Quote: | 145 # $tbar->set_style(Gtk::TOOLBAR_BOTH);
this line does not work here. |
if not work here it line again . you try
| Code: | | $tbar->set_style(2); |
Best wish |
it seems that when you save files, only text content issave ; You have to work hard to find a way to save text enligthments.
For toolbar style, yo should use rigth definitions :
http://gtk.php.net/manual/en/gtk.enum.toolbarstyle.php
Gtk::TOOLBAR_BOTH here. |
|
| Back to top |
|
 |
mq
Joined: 25 Nov 2006 Posts: 12
|
Posted: Sat Mar 24, 2007 8:25 pm Post subject: Re: PhpWord Text Editor |
|
|
an other little problem, you should use defined php constant for path separator and avoid using "\" :
require_once dirname(__FILE__) . '\main.php';
replace by :
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'main.php';
the first one does not work at all on Unix. But '/' works on windows  |
|
| Back to top |
|
 |
kGlz
Joined: 05 Feb 2007 Posts: 4 Location: Turkey
|
Posted: Sun Mar 25, 2007 12:22 am Post subject: |
|
|
| Quote: |
it seems that when you save files, only text content issave ; You have to work hard to find a way to save text enligthments.
|
yes I know it .thank you help.
are you run Linux and Win XP my program?
| Quote: |
an other little problem, you should use defined php constant for path separator and avoid using "\" :
require_once dirname(__FILE__) . '\main.php';
replace by :
require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'main.php';
the first one does not work at all on Unix. But '/' works on windows Smile
|
thank you help again.
best wish |
|
| Back to top |
|
 |
mq
Joined: 25 Nov 2006 Posts: 12
|
Posted: Sun Mar 25, 2007 11:38 am Post subject: |
|
|
| Quote: | yes I know it .thank you help.
are you run Linux and Win XP my program?
|
I am running on ubuntu (linux). |
|
| Back to top |
|
 |
kGlz
Joined: 05 Feb 2007 Posts: 4 Location: Turkey
|
|
| Back to top |
|
 |
|