Quote from: Bravado at Dec 20, 2006, 10:19 AM
As far as DIV’s are concerned...you can create layers (DIV’s) with the Layers plugin (http://tinymce.moxiecode.com/tinymce/docs/plugin_layer.html). Make sure that it’s available as a plugin and button in your configuration.
As an added bit of advice, I personally don’t like the idea of allowing users to insert layers and other block level elements through an RTE. I would set those via a template.
You’ve gone a bit over my head here... I don’t really know what "layers" are (except for z-index things that I don’t want to do..).
Here is what I am *trying* to do... I want to incorporate some code-type segments that will contain SQL queries and the resulting output... here is an example, although most of them are much smaller ...
http://people.csse.uwa.edu.au/gordon/numbers-of-bases-data.html
I have "borrowed" the CSS for the .code class from these forums, so that I can do things like the automatic scroll bars, the monospace font and so on...
But the forums enclose any code segments inside
<div class="code">
// code here
</div>
Now, I cut-n-paste the SQL query and output into the document, then I select it all.... now I want to (easily) enclose the whole thing in a <div class="code">. If I use the "Styles" drop-down menu (I have previously added a "code" style in the manager) then it puts it into a <span class="code"> and then it doesn’t work... what happens is that each line gets enclosed in a border, each line of differing length gets a grey background and so on... presumably because <span> is an INLINE and not a BLOCK element.
So I just want a similar thing to make <div>s - I don’t think this is anything to do with layers (is it?)
One more question: how can I make the <div> variable width so that if the content is narrow, then the bounding box will shrink in width .. sometimes I just have a single column of data and want it to be nicely centred.. but the <div> seems to expand to fit the space available (yes, this is just a CSS query, not TinyMCE...)
Cheers
Gordon