Opened 21 years ago
Closed 21 years ago
#2533 closed enhancement (wontfix)
Click-down box for code snippets
| Reported by: | outchy | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Optimization | Version: | 2.0.1 |
| Severity: | normal | Keywords: | code, snippets |
| Cc: | Focuses: |
Description
It would be great to have a click-down box on the 'Write Post' page where you could create code snippets, save them and then be able to drag & drop them into the text editor. If you use a Mac, you can see exactly what I'm talking about by downloading and trying out Smultron.
So as an example, I could save the following code under the title 'Image Shadow':
<div class="img-left">
<img src="./images/image_01.jpg" alt="My house" /></div>
<br clear="all" />
Then, all I would have to do is click-down the Snippets box, drag the word 'Image Shadow' onto the text editor and the full code would appear. This would be tremendously handy.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Two files added as plugin files. They are rough as I just did them today. But they should work for the most part. They could use some cleaning up love and the ability to delete said macros is not there. But is this what you are looking for?
Note that this plugin adds a dropdown populated with macro names and an option to add a new macro from the write page. It also adds it's own management page.