Help needed

Feb 19, 2012 at 9:35 PM

Hi, i can't use TinyMxeDeluxe in my orchard site.

I've read the instructions but it doeas not work and i don't understand where i fail.

 

1. Enable the module -> OK

2. Override orchard-tinymce.js:

1. Copy TinyMceDeluxe\Scripts\samples\orchard-tinymce.js to your Scripts/ folder -> Where is my Script/folder?

2. Declare it in your ResourceManifest.cs -> Where is my ResourceManifest.cs? How can i declare it? Can you write an example?

 

Thank you in advance.

 

Bye.

 

Coordinator
Feb 21, 2012 at 6:20 PM

The Scripts folder is in the root of your module. You can create it if it doesn't exist. If you need instructions/examples of ResourceManifest.cs you can look in the Orchard documentation for creating a custom module, and/or look at examples in the Orchard source.

Feb 21, 2012 at 8:35 PM

Thank you for your answer, but i don't want to create a custom module, i want to use tinymcedeluxe.

Bye

Coordinator
Feb 21, 2012 at 8:49 PM

I understand you want to use tinymcedeluxe, but what I meant by custom module was that in most cases you will want to create a custom module to house the functionality that is specific to your site. I guess you can use Orchard without creating a custom module if all you want to do is use the out of the box features like blogs. If that's what you are doing, the best way to do it is still to use a custom module -- even if all you are doing with the custom module is using it as a place to override the TinyMceDeluxe files. 

The alternative, if you really don't want to use a custom module, is not recommended because it requires that you modify the TinyMceDeluxe module directly. This is bad practice because it means you will potentially lose your edits if you deploy to another server or reinstall TinyMceDeluxe (e.g. a new version is released). If you are OK with this, then you can just copy orchard-tinymce.js from \Scripts\samples\ to \Scripts\, and modify that copy. 

Then, modify the  ResourceManifest.cs in TinyMceDeluxe, by adding this line at the end of the existing BuildManifests() method: 

manifest.DefineScript("OrchardTinyMce").SetUrl("orchard-tinymce.js").SetDependencies("TinyMce");

That should get you up an running. 

Feb 21, 2012 at 8:59 PM

Thank you very much, i'll try both solution. Bye

Mar 21, 2012 at 9:19 PM

Hi

I'm doing it according to instruction (by creating my own module) but normally my entry in ResourceManifest.cs doesn't work. It looks like Main TinyMce ResourceManifest overrides mine. I think that because when i'm commenting entry in ResourceManifest in TinyMce module the extended TinyMce works fine. But i knot tha isn't good way to implement TinyMceDeluxe

What i'm doing wrong? This is my ResourceManifest part

public void BuildManifests(ResourceManifestBuilder builder) {
     var manifest = builder.Add();
     manifest.DefineScript("OrchardTinyMce").SetUrl("orchard-tinymce.js").SetDependencies("TinyMce");
 }

Coordinator
Mar 21, 2012 at 9:35 PM

Have you declared TinyMceDeluxe as a dependency in your module's Module.txt?

Mar 21, 2012 at 11:56 PM

Yes.

My module depends on TinyMceDeluxe and TinyMceDeluxe depends on TinyMce

Coordinator
Mar 22, 2012 at 3:36 PM

Try this: 

            manifest.DefineScript("OrchardTinyMce")
                .SetUrl("orchard-tinymce.js")
                .SetDependencies("TinyMce", "TinyMceDeluxePlugins");

 

Try actually removing the tinymcedeluxe from your Module.txt's dependencies. I just looked at my own project and I don't have TinyMce declared there (can't remember why).

Mar 22, 2012 at 7:02 PM
Edited Mar 22, 2012 at 7:03 PM

Ok,

now it works more or less :)

When i removed dependency entry from Module.txt It started to work regardless of 1st or second proposed by you part of code in ResourceManifest.cs

But it works only in Internet Explorer 9. In Opera, Firefos, Chrome TinyMCE doesn't work in general (even standard version).

 

With dependency entry TinyMceDeluxe doesn't work in any browser, but standard TinyMCE forks in everyone.

 

It works in other than IE browser in yours environment?

Aug 21, 2012 at 2:56 PM
Edited Aug 21, 2012 at 2:59 PM

Don't think those 2 "tricks" are documented, but I couldn't make this module work without them:

1) In ResourceManifest.cs, use "SetVersion". Looks like Orchard doesn't override the script without that. My file looks like this (where "MyModule" is my module's name):

using Orchard.UI.Resources;

namespace MyModule {
    public class ResourceManifest : IResourceManifestProvider {
        public void BuildManifests(ResourceManifestBuilder builder) {
            var manifest = builder.Add();
            manifest.DefineScript("OrchardTinyMce").SetUrl("orchard-tinymce.js").SetDependencies("TinyMce").SetVersion("3.4.8");
        }
    }
}

2) Take a look at the file paths... depending on your site's root url, they might not work the way they appear on the "orchard-tinymce.js" sample file.

And yes, it works on Chrome to :-)

Aug 24, 2012 at 10:38 PM

hi, i can't find the resourcemanifest.cs in the tinymcedeluxe folder

i can't find it in my custom module folder too

can you help me please?

Thankyou in advance

bye

Coordinator
Oct 17, 2012 at 1:06 AM

In case any of the above posters, or any future posters are looking at this, starting with TinyMceDeluxe version 1.0.3, you will no longer need to override anything in your module/theme to use or customize TinyMceDeluxe. You can get the latest code from the repo now, or wait a couple of days for the 1.0.3 release. 

Hopefully the future versions will be much easier to use!

Oct 17, 2012 at 6:40 AM

Perfect!!

Thank you.

Bye