diff options
Diffstat (limited to 'help3/xhpeditor/snippets.js')
-rw-r--r-- | help3/xhpeditor/snippets.js | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/help3/xhpeditor/snippets.js b/help3/xhpeditor/snippets.js index 82b3b4f5..fa17cd0c 100644 --- a/help3/xhpeditor/snippets.js +++ b/help3/xhpeditor/snippets.js @@ -67,11 +67,6 @@ function pycode_par() { editor.replaceSelection(a1 + editor.doc.getSelection() + a2,''); } -function image_par() { - var a1 = '<paragraph role="image" id="' + random('par') + '"><image src="media/CHANGE-ME" id="' + random('img') + '" width="" height=""><alt id="' + random('alt') +'">'; - var a2 = '</alt></image></paragraph>'; - editor.replaceSelection(a1 + editor.doc.getSelection() + a2,''); -} // Tables // simple table cell function tCell (role,text){ @@ -229,6 +224,17 @@ function tEmbedvar(){ editor.replaceSelection(a1 + editor.doc.getSelection() + a2,''); } +// Images Objects +function image_par() { + var a1 = '<paragraph role="image" id="' + random('par') + '"><image src="media/CHANGE-ME" id="' + random('img') + '" width="CHANGE ME" height="CHANGE ME"><alt id="' + random('alt') +'">'; + var a2 = '</alt></image></paragraph>'; + editor.replaceSelection(a1 + editor.doc.getSelection() + a2,''); +} +function object_par() { + var a1 = '<paragraph role="image" id="' + random('par') + '"><object data="media/CHANGE-ME" id="' + random('img') + '" type="CHANGE mime-type" width="CHANGE ME" height="CHANGE ME"></object></paragraph>'; + editor.replaceRange(a1, editor.doc.getCursor()); +} + /* javascript code for snippets (originally for KDE kate)*/ function fileName() { return document.fileName(); } function fileUrl() { return document.url(); } |