Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • mike 90 posts 258 karma points
    Mar 19, 2015 @ 20:51
    mike
    0

    Defining the style inside the RTE window

    Hi,

    I have setup a rte.css so I can drop tags and classes I want the user to be able to use.  I have then ticked my main css files on the RTE property editor settings so the user can see straight away how it's meant to look.

    tinyMCE creates an iframe and adds these css references to a new page. The edit area is then the tag of this new page.  With my current css this just shows the background as there is no container on this page.  This then throws out all of my CSS.

    I need some way to be able to wrap the edit area in a

    or series of tags so I can set the context and parent items so it displays the styles as it will on the real site.  Ideally I want to be able to create several different RTE and specify a different html wrapper for each of them so if works with the structured CSS.

     

    Can I do this or is there a simpler way to go about this?  I think managing two seperate sets of style sheets in parallel will be difficult.  Any help appreciated, if I didn't make something clear just ask.

    ** EDIT **

    I downloaded tinyMCE MVC via nuget to empty solution to have a look and it seem the page being generated is actually a .htm file.  In Umbraco all the .js is minified and there is no template .htm file as I imagine umbraco is generating this dynamically so it can insert the css links.

    Does anyone know where to find this file?

  • mike 90 posts 258 karma points
    Mar 19, 2015 @ 22:21
    mike
    0

    I found this tutorial: https://our.umbraco.org/wiki/how-tos/enabling-the-%27template%27-plugin-for-tinymce

    I followed it but it seems just to work for inserting snippets, not for setting initial template.  I followed the tutorial but for some reason tinyMCE said there were no templates to insert (although I don't need an insert template snippet feature I just thought I would mention it).

    Anyone know how to get to the page where umbraco inserts the css?

    ** EDIT **

    I got insert temlplate working using - https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/48983-How-to-add-tinymce-Templates-in-v7?p=1 ;

    It still doesnt help me :(

  • mike 90 posts 258 karma points
    Mar 20, 2015 @ 04:08
    mike
    0

    As far as I can see, what I need to do is change the way the RTE renders so it is inline and then I can create a field for the wrap html and have whichever part I like as the editable region.

    I decided to just duplicate css for time being, I will come back to it at a later date.  If anyone finds this post and has already done it, please ping me your code.

Please Sign in or register to post replies

Write your reply to:

Draft