Submitted by wenmin92 on 2019/01/17 04:12
I don't want to set every properties when I want some words in the paragraph or the whole paragragh have a special style, that's boring and inefficient.
If I can define a set of custom styles like MS Word, that will be handy.
 
Thanks!
 

Comments

The default styles of paragraphs are set by the CSS file.  There is a default CSS file installed with InfoQube. The command to switch CSS files is in one of the menus but you can put it on a toolbar if you wish (I have).

The CSS file defines the font, size, line spacing and how much space to leave after each paragraph.  But it defines much more than that.

You might find it interesting to find out about CSS files.  The CSS files which I produced have some information about how to define your own styles. They are written as a sort of tutorial, they might be worth a read.

If you want something different from the style defined in the CSS file then you must override those settings by explicitly formatting the text.

It might be possible to define arbitrary named styles in the CSS file similar to the facilities available in a word processor but so far I have not been able to successfully do this. The names appear in the drop down list but are not applied correctly.  I believe this is because it is Internet Explorer which handles the display of text in the document pane and so InfoQube has limited control over how the text is displayed.

 

wenmin92

2019/01/17 22:40

In reply to by Paul_J_Miller

Thank you very much for your meticulous reply.
But I still have a few questions that I don't understand:
  1. If the css file can sync?
  2. There are currently only 18 built-in styles, see below. What I really want to do is add more styles in this list, for example, add a style named "box paragraph" with a dotted border and yellow background. 
  3. Can I quick set some words in a sentence using code tag? maybe need a special button in the menu bar? In markdown, You can call out code or a command within a sentence with single backticks(`).
Thank you for all the work you have done.

Pierre_Admin

2019/01/17 23:06

In reply to by wenmin92

Hi,
 
I have yet to update the documentation for the Doc pane w.r.t. recent changes...
 
This is not yet supported.
 
What is partially supported is the use of HTML Class. To use it:
  1. Menu > Edit > Edit Stylesheet
  2. Enter your class definition as .classname1
  3. Switch to code view and enclose the text with <span class='classname1 classname2'> and </span>
  4. Switch to normal view
As an example, you could define a class for bold and one for italic:
.bold {font-weight: bold;}
.italic {font-style: italic;}
 
Then in code view enter: <span class="italic bold">this text will be bold and italic</span>
 
Support for classes will come, but it is rather complicated to implement
 
Pierre_Admin
IQ Designer
 

wenmin92

2019/01/17 23:45

In reply to by Pierre_Admin

This software has been very good, very grateful that you continue to provide richer functionality.

Pierre_Admin

2019/01/18 00:43

In reply to by Paul_J_Miller

Hi Paul,
 
[quote]
The names appear in the drop down list but are not applied correctly.  I believe this is because it is Internet Explorer which handles the display of text in the document pane and so InfoQube has limited control over how the text is displayed.
[/quote]
 
I'm pretty sure that IE is not preventing this feature, I just need to code it !
 
 
Pierre_Admin
IQ Designer
 

jnmwarren

2019/01/18 08:19

In reply to by Paul_J_Miller

How do you get the CSS file to appear in the drop down? I have several CSS file but they are not appearing in the dropdown list.

Pierre_Admin

2019/01/18 11:03

In reply to by jnmwarren

The Style sheet uses a hierarchy of paths to choose which one to use. That way, a specific document can override some settings of a more general style sheet
 
The order is:
  1. Actual file if full path is specified
  2. IQBase.Files path
  3. User files path
  4. IQ App data path
To support this hierarchy, the dropdown does not populate the list, Simply type the name of the style sheet
 
Checkout v109 release notes on this subject:
  • New: Doc pane: Style sheet support
  • New: Doc pane: Format Style Sheet: Set the style sheet for this item or leave blank to use the default style sheet (defined in Tools > Options > HTML)
  • New: Doc pane: Edit > Edit Style Sheet. Opens the program associated with .css files. Hold Shift to show the Open with dialog
  • New: Doc pane: Edit > Remove Embedded Styles command
  • New: Doc pane: Support for gradients and other CSS3 visual effects. Set IE mode to 11 to enable. Note: You must open and close InfoQube once to enable this feature
  • New: Doc pane: H1...H6 and Normal paragraph style command buttons (Ctrl +1...6 and 0 do the same thing)
  • New: Doc pane: Format > Remove Format command. Shortcut is Ctrl + Space
  • New: Doc pane: Style sheet drowdown: Entries can now be removed. Use the up / down cursors to select a style sheet and press the Delete key to remove the entry
  • New: Fields: ItemHTMLStyle holds the item specific style sheet
 
Thanks for asking, it reminded me I must update that part of the documentation !
 
Pierre_Admin
IQ Designer
 

Paul_J_Miller

2019/01/18 11:50

In reply to by jnmwarren

[quote=jnmwarren]
How do you get the CSS file to appear in the drop down? I have several CSS file but they are not appearing in the dropdown list.
[/quote]
 
IQ doesn't pick up the available CSS files automatically.  The drop down list starts off unpopulated so you must know the filename of the CSS file.  If it is on the path which InfoQube searches then only the filename (without extension) is needed and IQ will find it.
 
Type the filename into the dropdown and if it is on the path which InfoQube searches then it will be found and used.  If it is not on the path which InfoQube searches then you will need to type the full path, and the drop down will become messy.
 
After it has been typed in once then it will be in the dropdown permanently for all items (unless you edit the options.ini file to get rid of it).
 
I put my CSS files in the IQ application data directory which in my case is 'C:\Users\Paul\AppData\Roaming\InfoQube', yours will be different but you can extrapolate from this where it is.
 
Hope this helps.

Pierre_Admin

2019/01/18 12:12

In reply to by Paul_J_Miller

[quote=Paul_J_Miller]
After it has been typed in once then it will be in the dropdown permanently for all items (unless you edit the options.ini file to get rid of it).
[/quote]
Thanks Paul,
 
FYI:
  • New: Doc pane: Style sheet drowdown: Entries can now be removed. Use the up / down cursors to select a style sheet and press the Delete key to remove the entry
 
Pierre_Admin
IQ Designer
 

jnmwarren

2019/01/18 12:13

In reply to by Paul_J_Miller

This helps a lot. Thanks you.