Author Topic: Edit standard document  (Read 3441 times)

noorbeast

  • Newbie
  • *
  • Posts: 23
    • View Profile
Edit standard document
« on: December 10, 2008, 01:29:08 am »
I want to add some basic html headings to the standard document template, to suit my use. Could anyone please tell me where I would find the document template?

Many thanks in advance

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Edit standard document
« Reply #1 on: December 10, 2008, 08:29:59 am »
What do you mean by standard document template?

noorbeast

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Edit standard document
« Reply #2 on: December 10, 2008, 09:27:24 am »
I mean the blank page when you open Documents -> New Document. There are templates, I just want to know where they are located/defined so I can create my own, or where the blank page is defined so I can edit it to suit my needs.

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: Edit standard document
« Reply #3 on: December 11, 2008, 11:44:45 am »
Document templates are defined in 'public/assets/javascript/fckeditor/fcktemplates.xml'. For example, to add a template that only has a "Hello World!" title I added this to the XML:

Code: [Select]
<Template title="Hello World" image="template1.gif">
<Description>A Hello World title.</Description>
<Html>
<![CDATA[
<h1>Hello World!</h1>
]]>
</Html>
</Template>

template1.gif should be an image that shows how the template looks like. I just used an image from another template.


noorbeast

  • Newbie
  • *
  • Posts: 23
    • View Profile
Re: Edit standard document
« Reply #4 on: December 11, 2008, 06:16:19 pm »
Many, many thanks, just what I wanted to do.