ckeditor plugin for custom links / tags - plugins

I'm using CKeditor 3.6 and find myself in need of writing a simple plugin. What I need is a button that works much like the format buttons (bold, italic, etc.) except that it will turn this:
SelectedWord
not into, say,
<b>SelectedWord</b>
but into:
SelectedWord
I've tried looking into the various plugins that come with CKeditor, but quite frankly, they are more confusing then helpful. I've read the tutorials, I know the basics of writing a plugin, but what eludes me is the functionality itself.

You are going to have to hack the CKEditor code base, but let me tell you that hacking around ckeditor is not so difficult. Also, there are versions of the older fckeditor floating around. Compare the two and see which one would be easier to hack for your mod. I have had to use the older version specifically for creating pinholes against Coldfusion so I could use the file upload segment of the tool. And in another case to function against domain cookies, because of security issues with regular cookies. FCKEditor and CKEditor has never been a clear install for me with the base product. I hope this is somewhat helpful.

Related

Human editable snippet store in eclipse

I am looking for a easier way to manage my eclipse code snippets. I know and have used Eclipse's template and snippets features. But as far as I have found, they can only be exported and imported as XML files.
Since I use many versions of eclipse and I keep migrating between machines managing the snippets is a hassle. I am looking for a UltiSnips like method to manage these snippets/templates. Is there one?
I also looked at snip2code, but it didn't appeal to me because I sometime work offline. Also, I want to have much greater control over the snippets using version control.
Oh well! I couldn't find anything that matched the set of requirements I had. So, I've ended up creating my own.

How well does the current DreamWeaver work with complex PHP frameworks?

I've always been intrigued by DreamWeaver, particularly the ability to click on something and edit its CSS right there so I don't have to find it in my huge list of CSS. However, I use a pretty complex home-made MVC framework for my coding that loads and creates pages through a series of includes, classes, function calls, etc. Quite a while ago, I tried a little to get Dreamweaver to even load a page but gave up pretty quickly. It wouldn't even display a single thing. I didn't try anything special though to get it to work like messing in the settings though.
I was wondering if DreamWeaver can handle something like this at this point and if so, what version would I need and how can I find out how to do it? If not, does anyone know of a good visual IDE where I can edit CSS just by clicking on something that would also support a complex PHP MVC framework page loading process?
You have to know how to develop a Dreamweaver extensions. The following resource, official Adobe website, offers a manual to do that:
http://www.adobe.com/support/dreamweaver/extend.html#dw8

Netbeans - How to extend HTML vocabulary

I've been using netbeans for a couple of years now, mainly on PHP / CakePHP projects.
Recently I've started using Coldfusion, which isn't directly supported. I've found, however, that if I use PHP as a project type, I can load the files and the HTML Renderer does an admirable job with the Coldfusion tags.
I want to make it better and help the renderer to understand some of the tags and, hopefully, thereby improve code indentation and syntax highlighting.
My question, then, is how can I access the HTML dictionary to extend the vocabulary?
NB: This isn't a 'which IDE' question so don't recommend them. I want to know if and how I can achieve this in NetBeans and only Netbeans.
Here are a few ideas. If you render it in HTML, you could probably add a custom name space to the HTML. If setup correctly it can help NetBeans realize that the tags are valid and shouldn't show as an error. It might not give you all the preview and WYSIWYG functionality, but it may be better than what you are getting now. I have only done this on other platforms, but I'm pretty sure NetBeans supports it.
Also I think that NetBeans will let you add CustomTags doing something like this:
http://wiki.netbeans.org/CustomTagActions
Just to note, in terms of ColdFusion the other alternatives are NotePad++ with the CF plugin and IntelliJ now supports CF.
I really like Eclipse - the number of plugins available (SVN, Javascript, CSS, CodCollab, Flashbuilder etc.) is what makes it indispensable IMHO.
I am, however, looking forward to the new version of CFBuilder.
This answer on the same/similar question suggests that there is nothing out there for ColdFusion on netbeans : NetBeans as an editor for ColdFusion scripts?
If you want to build your own ColdFusion plugin for netbeans you need to look at plugin development; http://platform.netbeans.org/tutorials/60/nbm-google.html You could use the Dictionary project from cfeclipse as a basis for your plugin. See this Google Group thread for a bit more information

CKEditor Plugins Documentation

I looked on CKEditor's website and I noticed that there's no plugins documentation yet.
But I'm wondering if there is any anywhere else?
I'd like to make a little plugin to add youtube video from CKEditor. Pretty simple plugin but still I'd like to know how to make it.
Documentation is sparse at the moment, but not completely non-existent.
Check out my CKEDitor link survival pack from a previous question.
As a starting point, you may want to copy and use one of the existing plugins (the unpacked ones from the _source directory, of course).
The symbols plugin is extremely simple but shows the basic points of inserting HTML into the editor
The links plugin may be a good starting point for how to add input fields, tabs, and make them interact (If you want to go the road of understanding CKEditor's highly sophisticated dialog layout system, that is. My cup of tea, it wasn't. You may want to just set up an Iframe dialog, and do everything by yourself).
Since this question was first posted, CK has added documentation for creating plugins - http://docs.cksource.com/CKEditor_3.x/Tutorials/Abbr_Plugin_Part_1

Is Dreamweaver worth getting if I probably won't use its WYSIWYG editor?

In the past I've done web application development using Visual Studio. Initially I'd use the design view, editing the page visually. But over time I learned more and more (X)HTML, CSS, and Javascript. I became familiar with the tags for ASP.NET server controls and their common attributes.
I got to the point where I'd do all the markup by hand (still in Visual Studio though) and then test the site in an actual browser. Of course I'd also still use Visual Studio for programming server side functionality in C#, but never the WYSIWYG page editor. I was able to get work done faster too, getting the site to look just the way I wanted, and the same across different browsers.
Now I'm going to be taking charge of a public facing website (entirely static content - no ASP.NET, PHP, or anything). The website was created and maintained using Dreamweaver, which I don't have and never used before.
I'll be working from home, so the organization is looking into getting me a copy of Dreamweaver. Even though it's not money out of my own pocket ...
Is it worth using Dreamweaver if I probably won't touch the visual editor?
Or should I tell them to save their money and I'll just use Notepad++.
Or am I crazy and should relearn to use a WYSIWYG editor?
I do 95% of my web dev stuff using Dreamweaver's code editor. But, for the other 5%, the WYSIWYG stuff really comes in handy.
Plus, it's not your money anyway. I'd say get it and if the WYSIWYG stuff is too much for you just keep it in source code mode and use it as an editor.
You may not know until you see the code. If they were using things like Dreamweaver templates, unless you are going to extricate them, you may end up needing Dreamweaver for sanity sake.
Dreamweaver is really useful if you maintain a site with templates. If the site is in PHP or ASP, then all you need to do is put the common parts (header, footer etc.) in a separate file and include them in the different pages. If the pages are static then the common parts can't be included. Which means that if you want to change the menu, you have to change it in all pages. With dreamweaver, you can save a page as a template and when you create a new page from a template, dreamweaver stores it in the comments. Next time you update the template, all the pages that use the template are updated. I found this to be the best use of dreamweaver.
I haven't used a WYSIWYG HTML editor in years, all the HTML I produce these days is hand-coded, and it's something I would recommend to anyone. WYSIWYG Editors simply make it far too easy to throw in tons of unnecessary markup, and then you end up with unwieldy pages that are tricky to work with and hard to fix browser compatibility problems in.
However. If you're taking over a large existing codebase that has been produced this way, I'd say you probably want to make sure you at least have access to Dreamweaver or a similar editor (if they were produced in Dreamweaver, that's probably the best choice). Simply because many pages designed in this way are rather verbose, and can be a nightmare to deal with in a text editor.
This depends - you mean old school Dreamweaver or CS4 Dreamweaver?
With all the new additions (code hinting with some of the newer javascript frameworks, a "preview" that is integrated with webkit so you can see your page in action, being able to test AJAX calls and do a "code freeze") I'm tempted to walk away from jedit and try it out.
I believe that DreamWeaver gives you intellisense in the code editor for HTML, so I would use it for that, if you're not paying for it. I wouldn't pay for that myself though :)
If the Visual Studio editor works fine for you, there is no point in switching.
And if you don't like WYSIWIG editing, then there's no point in learning it. I stopped using WYSIWIG years ago, and like you, I've found it to be much more flexible and reliable to edit HTML/CSS by hand.
If you like DreamWeaver more and the organisation is willing to pay for it, then go for it!
FWIW, I do a lot of HTML and javascript coding in dreamweaver's code view- the JSF extensions are nice as well. I got it as part of the CS3 bundle, since I needed to get my hands on photoshop and illustrator as well to carve up graphics. If possible, try to get your company to get the whole bundle, since graphics manipulation is always important when you're maintaining a site- and most designers will be giving you photoshop source files. I never ever go in wysiwyg mode, and it's still useful.
I use dreamweaver, but not for the same reasons as everyone here seem to. I like the syntax highlighting, and I absolutely LOVE the way Dreamweaver handles FTP in the window on the right. If I could find another editor that would offer these two things, I would, but none seem to be that great.
I code my pages by hand usually (I do a LOT of PHP, which dreamweaver 8 obviously can't preview) so I do a lot of things like (1) edit page (2) upload changes (3) preview live on testing server. However, I still use the WYSIWIG editor occasionally, especially if I need to throw something together using tables or form elements. I just find it to be a bit quicker that way than doing things by hand.
That said, I never use Dreamweaver (8, mind) for CSS, as the implementation is buggy at best. I much prefer to do CSS and more complex HTML by hand. I also do not use the standard method of templating, as I prefer to have one "index.php" that calls in the appropriate template and stuffs data into it that it generated before.
All that said though, Dreamweaver offers a nice enough set of tools that I don't really want to leave it, and it certainly won't hurt to learn it, especially if its free. I'd say at least try it out and see if its going to work before making a final decision. It comes down to what you personally prefer to use.
I hand-code but there are times Dreamweaver is incredibly useful:
Making visual-tweaks to someone else's complex HTML. It's much quicker to use the WYSIWYG if you're short on time and the code is a mess.
Dreamweaver has got an incredibly good search and replace. The tag-based searching is the best I've seen anywhere for you whilst the regex seach/replace allows back-references, named groups in the replace field etc.
The code Dreamweaver produces isn't too horrific and it's fairly good at not breaking your own nice code if you ever dip into the visual editor.
I use dreamweaver CS5 for code only on a daily basis, and it's a great tool. It is very effective, and its a great tool even for people who already know how to write code. Some of its' features that make it one of the best editors, in my opinion, are:
Code coloring
Customizable color-schemes
Error highlighting
in-app validation
Autocomplete & Codehinting (works great!)
in-app FTP
New document type dialog (great for quick start)
Search & replace
Code Snippets
There are many more features, like setting up a local server and binding it to a database so you can write queries more easily and use dreamweaver's "help" with server-side code, but I haven't really got into it.
Bottom line:
If you are considering getting Dreamweaver mostly for code editing, then I'd say it's definitely a great deal - even if you aren't going to use some of its' other features.
Dreamweaver's a tad bloated for something which you really can just do in Notepad (++ or otherwise). No WYSIWYG will give you code to the same quality as hand-crafted code. Especially since it's vanilla HTML, just use an everyday programmer's text editor. Having intellisense isn't that important: I mean, there's only about 10 tags you need to know.