Announcement

Do not use the forums to submit bug reports, feature requests or patches, submit a New Ticket instead.

#1 2005-03-16 00:15:26

Yermo
Xinha Authority
From: College Park, Md, USA
Registered: 2005-02-13
Posts: 143
Website

full_example-body.html question

Still coming up to speed; checkins coming soon.

So I want to pass in a configuration value from full_example-body.html, so dutifully in STEP 2 after the:

xinha_config = xinha_config ? xinha_config : new HTMLArea.Config();

For grins and giggles I try to do a

xinha_config.pageStyle= ".TEST123 { background-color: red; margin: 0px;}";

However, in HTMLArea.makeEditors() the test:

if(typeof default_config == 'function')
  {
  default_config = default_config();
  }

is always returning TRUE and is trashing any values I try to pass in.

Should I be doing this some other way?

(What I am working on is the Enter generates <p> tag problem. What I want to do add a class="xxx" to all <p> tags; in this test case I want <p class="TEST123">. So from the calling page I want to pass in a style sheet entry for .TEST123 xinha_config.pageStyle and configure the EnterParagraphs plugin to add class="TEST123" to every <p> tag; which I'm guessing would be a xinha_config.EnterParagraphs.pClass for example.)


-----------------------------------------------------------------------------------------
Content Management with Business Intelligence      [url]http://www.formvista.com[/url]

Offline

#2 2005-03-19 00:59:06

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: full_example-body.html question

Yermo wrote:

Should I be doing this some other way?

Ahh.  Yes.  That won't work in the example, because full_example.js overrides it by making it a function.

If you make your own "clean" example (just remove full_example.js should do I think) you should be able to modify the config in the way you expect.

What I am working on is the Enter generates <p> tag problem.

Is there a ticket for that?  I'm not sure I remember the problem.


James Sleeman

Offline

#3 2005-03-19 01:32:45

Yermo
Xinha Authority
From: College Park, Md, USA
Registered: 2005-02-13
Posts: 143
Website

Re: full_example-body.html question

gogo wrote:
Yermo wrote:

Should I be doing this some other way?

Ahh.  Yes.  That won't work in the example, because full_example.js overrides it by making it a function.

If you make your own "clean" example (just remove full_example.js should do I think) you should be able to modify the config in the way you expect.

Thanks!

gogo wrote:

What I am working on is the Enter generates <p> tag problem.

Is there a ticket for that?  I'm not sure I remember the problem.

No, unfortunately not. I've been getting nothing but errors when I try to go view tickets over the last few days. The idea for EnterParagraphs is this:

Right now onEnter it inserts <p>'s instead of <br>'s. We've all decided this is the correct behavior. Unfortunately users don't want to see what they perceive as a double newline when they press Enter.

Using <br>'s is just a problem.

So, what if we modified EnterParagraphs so that onEnter the <p>'s that were inserted had a class=".." attribute from some style sheet entry.

Then, the integrator could decide how they want the <p>'s for the editor generated content to behave. This is better than hardcoding the style, since it's not easy to modify then. it's also better than overriding the default <p> stylesheet entry because it won't bother the rest of the page.

We'd pass in basically two parameters, onEnterStyle and onShiftEnterStyle ... no more <br>'s at all.

Can you see any problems with this approach?


-----------------------------------------------------------------------------------------
Content Management with Business Intelligence      [url]http://www.formvista.com[/url]

Offline

#4 2005-03-19 02:38:21

gogo
Xinha Leader
From: New Zealand
Registered: 2005-02-11
Posts: 1,015
Website

Re: full_example-body.html question

Yes I found that thread, see my post there.


James Sleeman

Offline

Board footer

Powered by FluxBB