[Logo] Enterprise Client Community
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Difference in text rendering: SimpleHTMLEditor <=> HTML inside dialog  XML
Forum Index -> Development
Author Message
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

(question received by mail - response through the forum)

We use the SimpleHTMLEditor (Quill-version) in many places and are actually quite happy with the functionality.

Unfortunately, there is an ugly discrepancy between the text displayed in the editor and the display in a TextPane or also with "DirectHtmlInset": There, a line spacing is inserted before each "<p>", which is not visible in the editor.

Only the editor always wraps p-tags around text... so you never get what you expected.

Björn Müller, CaptainCasa GmbH
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5519
Offline

The Quill Editor internall uses some own style sheet for rendering the text that is edited:

Code:
 eclnt/risc/ext_quill/quill136/quill.snow.css
 


So you need to take over the style sheet into your dialog and render the content using the same style-environment.

Luckily Quill keeps all its style classes in super-separated namespaces so it is not a problem to integrated this into CaptainCasa dialogs.

The way to go is:

1. Integrate the Quill-style sheet into the CaptainCasa dialogs. This is done through system.xml:

Code:
 <system>
     ...
     <riscclientstyle src="eclnt/risc/ext_quill/quill136/quill.snow.css"/> 
     ...
 </system>
 


2. Before taking over the text into e.g. a TEXTPANE with CONTENTTYPE "text/html" do:

Code:
         m_htmlDisplayText =
             "<div class='ql-editor'>" + 
             m_htmlEditText +
             "</div>";
 


Now the text is using the style definitions from the Quill editor.

Kind regards! Björn

Björn Müller, CaptainCasa GmbH
 
Forum Index -> Development
Go to:   
Powered by JForum 2.1.6 © JForum Team