htmlArea

A directory of browser-based WYSIWYG editors

  MAIN
INDEX
SEARCH
POSTS
WHO'S
ONLINE
LOG
IN

Home: htmlArea 3 (beta): htmlArea 2 & 3 archive (read only): htmlArea v3.0 - Discussion:
Do not do linebreaks and CSS problems.


The htmlArea 2 & 3 editors have been discontinued.

We've made these forums available as a read-only reference and knowledge-base for people using or developing editors based on htmlArea 2 or 3.

Anyone who is interested in taking over version 2 or 3 is free to do so. All we ask is that you choose a new name that doesn't have "htmlarea" in it to avoid confusion with this site. We'll even give you a link in the directory to make it easier for people to find you. If you are developing or hosting an htmlArea based-editor under a new name, please submit it to our directory.

 


frankieJ
New User

Dec 8, 2004, 10:20 AM

Post #1 of 2 (2558 views)
Shortcut
Do not do linebreaks and CSS problems. Can't Post

Hi!

I have some problems with the TableOperations and CSS. The problem is i have cfg.toolbar where i list all features i want. I don´t want all the TableOperation stuff...only the remove,add columns and rows. So i did like this:

TableOperations.btnList = [
["row-insert-above", "tr"],
["row-insert-under", "tr"],
["row-delete", "tr"],
null,
["col-insert-before", "td"],
["col-insert-after", "td"],
["col-delete", "td"],
];

..later....
editor.registerPlugin(TableOperations);

The only butons i want will be inserter on a new row. I don´t want this. I want it inserted where i want it. How do i do that?

The same stuff with the CSS, it will be inserted in a new row:

editor.registerPlugin(CSS, {
combos : [
{label: "Styles:",
options: { "None" : "",
"Header 1" : "head1",
"Header 2" : "head2",
"grey text" : "grey"
}
}
]
});

How can i make the CSS combo and the tablebuttons appear where i want them to appear?

Regards,
Frankie


tgoyer
New User

Feb 2, 2005, 12:51 PM

Post #2 of 2 (2385 views)
Shortcut
Re: [frankieJ] Do not do linebreaks and CSS problems. [In reply to] Can't Post

Howdy!

Just create s custom defined button list, ala:


Code
  <script type="text/javascript"> 
// load the plugin files
HTMLArea.loadPlugin("TableOperations");

var editor = null;
function initEditor() {
editor = new HTMLArea("ta");
editor.registerPlugin(TableOperations);
var cfg = editor.config;
cfg.toolbar = [
[
"bold", "italic", "underline", "strikethrough", "separator",
"subscript", "superscript", "separator",
"copy", "cut", "paste", "separator",
"removeformat", "killword"
],
[
"justifyleft", "justifycenter", "justifyright", "separator",
"orderedlist", "unorderedlist", "outdent", "indent", "separator",
"forecolor", "hilitecolor", "separator",
"inserthorizontalrule", "createlink", "insertimage", "separator",
"popupeditor"
],
[
"inserttable", "separator",
"TO-row-prop", "TO-row-insert-above", "TO-row-insert-under", "TO-row-delete", "TO-row-split", "separator",
"TO-col-insert-before", "TO-col-insert-after", "TO-col-delete", "TO-col-split", "separator",
"TO-cell-prop","TO-cell-insert-before","TO-cell-insert-after","TO-cell-delete","TO-cell-merge","TO-cell-split"
]
]
HTMLArea.replace("ta", cfg);
}
</script>



See if that works for ya.

- Tim

 
 
 


Search for (options)