sozi-projects / Sozi

A "zooming" presentation editor
http://sozi.baierouge.fr
Mozilla Public License 2.0
1.59k stars 165 forks source link

Ability to give a title to the HTML document generated #519

Open NedNet29 opened 3 years ago

NedNet29 commented 3 years ago

Summary of feature request

When opening Sozi HTML generated document in a browser, the browser displays "Untitled" as the name of the page. It would be cool if there was a simple field where we can type the title we wish to appear (I make this suggestion because I'm promoting Sozi to colleagues not skilled in IT, so I can't really ask them to edit the HTML page created by Sozi)

Version of Sozi and other relevant software

(not relevant since it's a feature request)

Steps to reproduce the problem

open a Sozi HTML generated document with a browser : it displays "Untitled - <frame ID>" as the name of the page

Hints and solutions (optional)

Editing the titleHTML markup isn't doing anything, but changing "Untitled" by the desired title in following part of JS code does the job : [...] {key:"title",get:function(){var e=this.document.root.getElementsByTagNameNS("http://www.w3.org/2000/svg","title");return e.length?e[0].firstChild.wholeText.trim():"Untitled"}}, [...]

Obviously, anyone who does this has to be careful if the title wanted needs to include double-quote char ;-)

aumouvantsillage commented 3 years ago

Currently, the title of the presentation is taken from the SVG document. You can edit it in Inkscape (File / Document properties / Metadata). I should add this info somewhere in the documentation.

NedNet29 commented 3 years ago

Thank's. Still, being able to edit in Sozi would be great since SVG file can come from elsewhere than Inkscape

amelillo commented 2 years ago

Though, you could still open it in Inkscape and edit the information you need to change. Moreover, I solve this problem opening the html with an editor and replacing every occurrence (two, actually) of the string "Untitled" with my preferred title. Quick and dirty but effective.

NedNet29 commented 2 years ago

I agree, but as I said elsewhere, I'm promoting Sozi to coworkers who don't want or have time to do such things (they work as adult professional trainers).