LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-26-2006, 10:55 AM   #1
vargadanis
Member
 
Registered: Sep 2006
Posts: 248

Rep: Reputation: 30
WYSIWYG editor in theorem


Hi everybody...

A friend of mine and me decided to create a Dreamweaver copy for linux though it is possible to run Dreamweaver8 under linux.
Of course it was free of charge. But we do not know the very basis of Dreamweaver. How is it possible to write a WYSIWYG editor in C (Qt) or Python? I mean what is the theorem. How is it possible to edit visually something that generates an HTML code. I have got no idea... Please give me some topps.
The project will be mostly written in python and only the very critical parts (slow) are gonna be written in C to save time.
 
Old 09-28-2006, 10:00 AM   #2
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Rep: Reputation: 31
Why not helping NVU?
http://www.nvu.com
 
Old 09-29-2006, 05:56 AM   #3
vargadanis
Member
 
Registered: Sep 2006
Posts: 248

Original Poster
Rep: Reputation: 30
Linspire helps them.
And it took too long to understand their code without any effect on the project. And I don't like NVU.
 
Old 09-29-2006, 06:10 AM   #4
Proud
Senior Member
 
Registered: Dec 2002
Location: England
Distribution: Used to use Mandrake/Mandriva
Posts: 2,794

Rep: Reputation: 116Reputation: 116
Lightbulb

If you've still had no real ideas, I think I have a basic idea that should work.

You need your program to parse the HTML into elements forming a hierarchy. This can be done with a DOM XML parser library.

Then for each element that should be visible you need to have a graphical class that calculates it's appearance. Some depend upon elements contained within, you will need to find how attributed like colour will be inherited through the tree and how container elements will eventually calculate their sizes.

Then you need to use this to render the HTML graphically as a webpage, as a browser does, but with listeners/event handlers to detect where a user clicks and find the element most associated with that location.

Then when the user selects another element to add or attributes to change, you can update your tree, update your graphical objects, and rerender the page.

By detected where the user clicked you can also highlight the relevant HTML text in another window/frame/tab where they can manually alter the HTML, again with changes tracked and added back into the parsed tree, to regenerate the GUI.

So it's even more work than making a webbrowser.

Last edited by Proud; 09-29-2006 at 06:11 AM.
 
Old 09-29-2006, 06:15 AM   #5
melinda_sayang
Member
 
Registered: Dec 2003
Location: Petaling Jaya
Distribution: Ubuntu
Posts: 475

Rep: Reputation: 31
That is a big project. Your question explains your programming skill. You should not tackle this such big project.

If you don't like helping nvu, help this:
http://kompozer.net/

At least if you want to make your own project, read their sourcecode first to understand how edit something visually will generate html code.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
HTML editor with WYSIWYG the_gripmaster Linux - Software 6 08-19-2006 09:32 AM
JSP WYSIWYG editor Mufasa Programming 2 11-24-2004 03:32 AM
HTML wysiwyg editor HwzrHlslndr Linux - Software 3 01-01-2003 08:57 PM
WYSIWYG PHP editor CyberDrake General 4 12-21-2002 08:11 AM
WYSIWYG html editor boyinfrance Linux - Software 5 06-18-2002 01:41 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration