Welcome Guest, Not a member yet? Register   Sign In
[SOLVED] NICEdit - Enabling the tool bar automatically.
#1

[eluser]TheFuzzy0ne[/eluser]
I'm messing about with NICEdit, and I've noticed that you have to click the textarea first in order to enable the tool bar. I'm sure this is by design, but does anyone know if there's a way to activate the tool bar, and keep it activated?

Many thanks in advance.
#2

[eluser]Dam1an[/eluser]
Without looking at the source I can't be sure, but it sound like this would be a config setting perhaps?
#3

[eluser]TheFuzzy0ne[/eluser]
It doesn't look like it. I've been reading the docs (which took all of about 30 seconds), and couldn't see anything pertaining to what I need to do.
#4

[eluser]Dam1an[/eluser]
Could maybe try follow the chain of events triggered by an onFocus event? (I would try buy my JS debugging skills are very limited and its time to go home now Smile
#5

[eluser]TheFuzzy0ne[/eluser]
The answer was right in front of my face the entire time... http://wiki.nicedit.com/Editor+Events. Result! Thanks for your help.
#6

[eluser]garymardell[/eluser]
I just went on the homepage of niceedit and tried the demo, all i did was make text bold. Clicked the html button on the toolbar and rather than <b></b> or <strong></strong> it shows <span style="font-weight:bold"></span> I mean i don't know if its just me or that is some poor markup being created. I guess it stops css making you change b or strong to something other than bold but i think some standard markup would be nice.
#7

[eluser]Johan André[/eluser]
[quote author="garymardell" date="1243556871"]I just went on the homepage of niceedit and tried the demo, all i did was make text bold. Clicked the html button on the toolbar and rather than <b></b> or <strong></strong> it shows <span style="font-weight:bold"></span> I mean i don't know if its just me or that is some poor markup being created. I guess it stops css making you change b or strong to something other than bold but i think some standard markup would be nice.[/quote]

No it's not your fault! Smile

NicEdit is very cool in some senses, ie one toolbar for multiple textaras, inline edit etc.
But it's also completly unusable from a validation point of view.
If the code produced is bad, then to me it not an option.
#8

[eluser]TheFuzzy0ne[/eluser]
Johan, shouldn't you be validating the HTML anyway when it's posted? You can never rely on the output of any of these, especially when a malicious user is involved.
#9

[eluser]garymardell[/eluser]
FuzzyOne i think you misunderstood. We're not talking about the actual code the user can submit, just how good (or in this case bad) the markup created by NICEdit is. It creates spans instead of <strong> for example and uses inline styling to make it bold. The html is just not semantic in any way and is awful code produced.
#10

[eluser]TheFuzzy0ne[/eluser]
Ah, OK. I get it now. Just as well I have HTMLPurifier to fix it for me. Tongue




Theme © iAndrew 2016 - Forum software by © MyBB