Hey everyone, I’m trying to add a WordPress-like editor to my ASP.NET web app. I really dig the WordPress editor (v2.7) and want something similar. I’ve used TinyMCE before and even tweaked it a bit, but I can’t get the WordPress setup to work right.
I grabbed the TinyMCE stuff from WordPress and put it in my site, but I’m getting an error in tiny_mce.js:
The error says ‘undefined’ is null or not an object.
I’ve double-checked everything and it seems to match the WordPress demo site. I’m pretty good with JavaScript, but this has me stumped. Has anyone tried this before? What am I missing?
I’d really appreciate any tips or tricks to get this working. Thanks!
I’ve been down this road before, and it can be frustrating. Instead of wrestling with WordPress’s editor, have you considered Quill? It’s what I ended up using for my ASP.NET project, and it was a game-changer. Quill is lightweight, customizable, and plays nice with ASP.NET.
The setup is straightforward - just include the necessary files and initialize it with a few lines of JavaScript. What I love about Quill is its modular nature. You can start basic and add features as you need them.
One tip: if you’re handling image uploads, you’ll need to implement that separately on the server-side. I used a simple HttpHandler in ASP.NET to manage this, and it worked like a charm.
Remember, the goal is to give your users a smooth editing experience without pulling your hair out in the process. Sometimes, stepping away from the familiar (like WordPress) can lead to better solutions.
I’ve actually tackled a similar challenge in one of my projects. Instead of trying to directly port the WordPress editor, which can be tricky due to its deep integration with WordPress core, I’d suggest looking into modern WYSIWYG editors designed for easy integration with various platforms.
For ASP.NET specifically, I’ve had great success with CKEditor. It offers a WordPress-like experience but is much easier to implement in non-WordPress environments. The latest version (CKEditor 5) is particularly robust and customizable.
If you’re set on the TinyMCE route, make sure you’re using a compatible version with your ASP.NET setup. The error you’re encountering often stems from JavaScript conflicts or missing dependencies. Double-check that all required scripts are loaded in the correct order.
Alternatively, consider using a .NET-specific rich text editor like Telerik’s RadEditor. It integrates seamlessly with ASP.NET and offers a feature set comparable to WordPress’s editor.
hey tom, i’ve had similar issues. instead of messing with wordpress stuff, try summernote. it’s super easy to set up in asp.net and looks pretty close to wp editor. just add the cdn links, initialize it with a few lines of js, and you’re good to go. way less headache than porting wp editor