Forum closed. New forum available at http://community.wymeditor.org/

Editor-view stylesheet?

Support forum for WYMeditor.

Editor-view stylesheet?

Postby Slip Nine on Sat Jul 21, 2007 4:06 am

This might be interpreted as a dumb question to be answered with a link to the docs but I've been through them and tried everything I can think of. Basically, I want to set a specific value for wymeditor/iframe/default/wymiframe.css and I can't figure out how to do just that. I have no experience with Javascript in particilar, but am familiar with coding in general (if not good at it)

Things I've tried:

- Skin: 'myStyle'

Despite hopes inspired by the naming scheme under the iframe folder, the skin option only appears to affect the wymeditor/skins/default directory. Fair enough; though even in regards to the skins directory, I could only manage to break the default style, failing to make it work even there. Copying the default to 'myStyle' does not appear to work, making me think skins have to be detailed in the javascript somewhere and might yet allow me to specify a different iframe css, but I don't know enough javascript to puzzle it out. The feature appears to be completely undocumented, the only thing the docs mention are that the option exists.

- stylesheet: 'myStyle.css'

This option baffles me, to be honest. It works, but very poorly. The need to comment out the style code is extremely non-user-friendly and leads to code errors due to lack of the useful syntax highlighting features users are used to having in their programs. This would be somewhat mitigated if the parser would pick up uncommented style definitions as well, allowing commented lines only for editor-specific code (which I personally have no need for), but instead all code must be copied and commented. Still, it works, but being that there exists and is used a standalone css file for the editor appearance ( wymeditor/iframe/default/wymiframe.css ), changing that file seems to make much more sense.

- iframebasepath: "wymeditor/iframe/myStyle/"

Lacking options, I went looking in the script files themselves. Found alongside the documented function, this looks like exactly the option I need--

<edit> Silly me, had my slashes backwards. No longer breaks it, still does not appear to have any effect. </edit>

--Since this isn't even mentioned in the documentation, it's possible it's not functional or supported, so I can't really complain.

- iframehtml: <lots of quoted code here>

The simple, brute-force method. If I can't feed the script an iframe directory path, I'll just set it manually. (I note to myself that the pre-set option for this uses a value WYM_IFRAME_BASE_PATH, which I presume is supposed to be derived from the above option somehow). This option, much like 'skin:' is mentioned in the documentation with no explanation or definition and somewhat similarly, appears to have no effect. In fact, unlike skin: which I can at least break, inputting valid or invalid values for this option (specifically changing the src='') seems to have no bearing whatsoever on the actual iframe code.

Conclusion

I'm an idiot and am doing something majorly wrong here =/ The above options have been placed in my index.html file like so:

$j(".wymeditor").wymeditor({ <HERE> })

Other options unrelated to my goal such as html: do work, as well as the above stylesheets: option, which simply does not suit my needs. The ability to break several of the options implies that they are getting through and I have confirmed my path tense with the working options. I know this can't be that difficult, but the above speaks for itself. I of course have the option of simply changing the css in the wymeditor/iframe/default directory (which I would choose over the implimentation of the 'stylesheet:' option), but it's neither a good choice or an efficient one, since adding multiple projects to the system would then require adding IDs to body tags or somesuch, bloating them with content-oriented data. Again, it would work, but so should the right way.

So tell me, what am I overlooking to get these options to work?

My system:

WYMeditor 0.4 b2
jquery-1.1.3.1.pack.js
Firefox 2.0.0.5 clean install (I use Opera for day-to-day webbrowsing)
Windows XP x64 edition SP2 (Equiv. to Windows Server 2003 SP2, not XP home/pro SP2)
Slip Nine
 
Posts: 2
Joined: Thu Jul 19, 2007 11:36 pm

Postby jfh on Thu Aug 02, 2007 9:11 am

Hi,

Sorry but I'm not sure I correctly understand what you say.
I want to set a specific value for wymeditor/iframe/default/wymiframe.css

Do you want to use another CSS file, or do you want to style something in the iframe, e.g. change the backgrounds of paragraphs?
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby Slip Nine on Fri Aug 03, 2007 7:26 am

Most simply: I'd like to use a whole new path for the iframe contents so I can have several (possibly user-created) different templates definable from a single index.php.

The "stylesheet:" option system would actually be be ideal if styles would fall through to the iframe without needing to be quoted out, since I'd get the ability to set classes with the GUI. I could still get templatability by setting the html manually, so it would work, I just need to be able to take standard .css files. Changing the parser isn't something that's within my skillset though, so I'll make due with figuring out what I'm doing wrong with the first option.
Slip Nine
 
Posts: 2
Joined: Thu Jul 19, 2007 11:36 pm


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest