Index: /trunk/plugins/SetId/set-id.js
===================================================================
--- /trunk/plugins/SetId/set-id.js (revision 467)
+++ /trunk/plugins/SetId/set-id.js (revision 467)
@@ -0,0 +1,93 @@
+function SetId(editor) {
+  this.editor = editor;
+  var cfg = editor.config;
+  var self = this;
+
+  // register the toolbar buttons provided by this plugin
+  cfg.registerButton({
+  id       : "setid", 
+  tooltip  : this._lc("Set Id and Name"), 
+  image    : editor.imgURL("set-id.gif", "SetId"),
+  textMode : false,
+  action   : function(editor) {
+               self.buttonPress(editor);
+             }
+  });
+  cfg.addToolbarElement("setid", "createlink", 1);
+}
+
+SetId._pluginInfo = {
+  name          : "SetId",
+  version       : "2.0",
+  developer     : "Udo Schmal",
+  developer_url : "http://www.schaffrath-neuemedien.de",
+  c_owner       : "Udo Schmal",
+  sponsor       : "L.N.Schaffrath NeueMedien",
+  sponsor_url   : "http://www.schaffrath-neuemedien.de",
+  license       : "htmlArea"
+};
+
+SetId.prototype._lc = function(string) {
+    return HTMLArea._lc(string, 'SetId');
+};
+
+
+SetId.prototype.onGenerate = function() {
+  var style_id = "ID-style";
+  var style = this.editor._doc.getElementById(style_id);
+  if (style == null) {
+    style = this.editor._doc.createElement("link");
+    style.id = style_id;
+    style.rel = 'stylesheet';
+    style.href = _editor_url + 'plugins/SetId/set-id.css';
+    this.editor._doc.getElementsByTagName("HEAD")[0].appendChild(style);
+  }
+};
+
+SetId.prototype.buttonPress = function(editor) {
+  var outparam = null;
+  var html = editor.getSelectedHTML();
+  var sel  = editor._getSelection();
+  var range  = editor._createRange(sel);
+  var node = editor._activeElement(sel);
+  if (node)
+    outparam = { name : node.id };
+  else
+    outparam = { name : '' };
+
+  editor._popupDialog( "plugin://SetId/set_id", function( param ) {
+    if ( param ) {
+      var name = param["name"];
+      if (name == "" || name == null) {
+        if (node) {
+					node.removeAttribute("name");
+					node.removeAttribute("id");
+					node.removeAttribute("title");
+        }
+        return;
+      } 
+      try {
+        var doc = editor._doc;
+        if (!node) {
+          node = doc.createElement("span");
+          node.id = name;
+          node.name = name;
+					node.title = name;
+          node.className = "hasid";
+          node.innerHTML = html;
+          if (HTMLArea.is_ie) {
+            range.pasteHTML(a.outerHTML);
+          } else {
+            editor.insertNodeAtSelection(a);
+          }
+        } else {
+          node.id = name;
+          node.name = name;
+					node.title = name;
+          node.className = "hasid";
+        }
+      }
+      catch (e) { }
+    }
+  }, outparam);
+};
Index: /trunk/plugins/SetId/lang/de.js
===================================================================
--- /trunk/plugins/SetId/lang/de.js (revision 467)
+++ /trunk/plugins/SetId/lang/de.js (revision 467)
@@ -0,0 +1,8 @@
+// I18N constants
+// LANG: "de", ENCODING: UTF-8
+// translated: Raimund Meyer xinha@ray-of-light.org
+{
+  "Set Id and Name": "Objekt ID und Name einfÃŒgen",
+  "Name/Id": "Name (ID)",
+  "Delete": "LÃ¶schen"
+};
Index: /trunk/plugins/SetId/popups/set_id.html
===================================================================
--- /trunk/plugins/SetId/popups/set_id.html (revision 467)
+++ /trunk/plugins/SetId/popups/set_id.html (revision 467)
@@ -0,0 +1,58 @@
+<html>
+<head>
+  <title>Set Id/Name</title>
+  <link rel="stylesheet" type="text/css" href="../../../popups/popup.css" />
+  <script type="text/javascript" src="../../../popups/popup.js"></script>
+  <script type="text/javascript">
+
+function Init() {
+  __dlg_translate("SetId");
+  __dlg_init();
+  var param = window.dialogArguments;
+  if (param) {
+    document.getElementById("name").value = param["name"];
+  }
+  document.getElementById("name").focus();
+}
+
+function onOK() {
+  // pass data back to the calling window
+  var param = new Object();
+  param["name"] = document.getElementById("name").value;
+  __dlg_close(param);
+  return false;
+}
+
+function onDelete() {
+  // pass data back to the calling window
+  var param = new Object();
+  param["name"] = "";
+  __dlg_close(param);
+  return false;
+}
+
+function onCancel() {
+  __dlg_close(null);
+  return false;
+}
+</script>
+</head>
+
+<body class="dialog" onload="Init()">
+<div class="title">Set ID/Name</div>
+<form>
+<table border="0" style="width: 300px;">
+  <tr>
+    <td class="label">ID/Name:</td>
+    <td><input type="text" id="name" style="width: 200px" /></td>
+  </tr>
+</table>
+
+<div id="buttons">
+  <button type="submit" name="ok" onclick="return onOK();">OK</button>
+  <button type="button" name="delete" onclick="return onDelete();">Delete</button>
+  <button type="button" name="cancel" onclick="return onCancel();">Cancel</button>
+</div>
+</form>
+</body>
+</html>
Index: /trunk/plugins/SetId/set-id.css
===================================================================
--- /trunk/plugins/SetId/set-id.css (revision 467)
+++ /trunk/plugins/SetId/set-id.css (revision 467)
@@ -0,0 +1,7 @@
+.hasid {
+  background-image: url(img/set-id.gif);
+  background-repeat: no-repeat;
+  background-position: left top;
+  padding-left: 19px;
+  border: 1px dotted blue;
+}
