View Source

Definitely a small thing in the grand scheme of things...

But unless I've missed something the Rich Text Editor could definitely do with a view source button. Or at the very least away of adding our own custom classes/styles to it.

Thanks,

Matt

Tagged:

Comments

  • BrendenKehren1BrendenKehren1 Sparta, WIMember, MVP MVP

    Hey Matt, based on my understanding of how and what Kentico Cloud is used for, the source could very well be invalid in other applications which is why it does not exist. For instance if you have a content type with 2 fields in it (title, copy) and you display that data in 3 applications (website, mobile app, desktop app), the HTML or markup will be irreverent for desktop and possibly mobile depending on how your developing in mobile. Although I see the flip side and if you only ever intend to use this to display content across multiple web applications then why not have a WYSIWYG editor of some sort.

  • MatthewSwainMatthewSwain Member

    Hey Brenden,

    Yeah totally makes sense to be fair when you look at it from that point of view!

    Maybe as you say a 'safe' text area where you simply enter text and then also a more web based WYSIWYG text area where you can adjust the source and add in html based markup.

    I do think though that the rich text editor adds in it's own html markup (wrapping p tags, h1 tags etc. as well)?

    Thanks,

    Matt

  • BrendenKehren1BrendenKehren1 Sparta, WIMember, MVP MVP

    You are correct, you pretty much have no control over it once it's entered. This was talked about a few days ago at the Roadshow in Chicago and lots of discussion about it.

  • MatthewSwainMatthewSwain Member

    OK Cool, well i'm sure it's being looked into at Kentico then :)

  • MartinD2@kentico.com[email protected] BrnoMember, Administrator, Kentico Staff admin

    Hi @MatthewSwain
    Take a look at the workaround I've shared few days ago. Not ideal but could help in some cases.

  • JanL@kentico.com[email protected] Czech RepublicMember, Administrator, Kentico Staff admin

    Hi @MatthewSwain ,

    I'm also thinking of such feature. Maybe we're on the very same page. Let's sync ourselves.

    I personally love structuring content to content types and having the ability to render content types with specific formatting. But the thing is that often there is a page where you cannot guess how many parts of that page will be of a specific class/type.

    In fact, you could make use of modular content and MVC Display templates to allow such variable amount of pieces of content in the page. You can do such a thing. I'm in a process of writing a series of posts about that.

    But I can imagine there could be even a niftier feature in the Content inventory service. I imagine it as a possibility of putting pieces of typed content into the rich text element. Or even putting modular content (content items) into the rich text. This is what I'm thinking of. Is that what you wrote about?

    I believe our colleagues in the product team are also aware of such scenario. I'll ask them about whether we're all on the same page and also about the timeframe of such potential feature.

    I'll keep you posted.

    Jan

  • MatthewSwainMatthewSwain Member
    Hi Jan,

    What you are talking about sounds great and would be a really useful/cool addition definately! Would be great to demo something like the above to clients.

    However in the short term all i'm really after as a very basic requirement is a 'view source' button on the rich text editor so I can in certain situations view/adjust the html that the rich text editor produces. I get that generally this shouldn't be needed and it should generate clean html but for those random situations I occasionally find I need to.

    Also the ability to add my own classes in. So a user could select a piece of text and choose a class which would then add as a span or maybe p tag etc. Like Kentico's WYSIWYG editor in the CMS product.

    Thanks,

    Matt
  • TomasH@kentico.com[email protected] Member, Kentico Staff mod
    edited June 2017

    Hi Matt,

    Interesting questions. I'd be interested to know more about how you would modify the source code.

    I get that generally this shouldn't be needed and it should generate clean HTML but for those random situations, I occasionally find I need to.

    • What are the most common examples when you need to change HTML directly?

    So a user could select a piece of text and choose a class which would then add as a span or maybe p tag etc.

    • What would the user usually need to do with the text?
    • Who is the user you're mentioning? Would they be experienced in HTML + CSS and capable of modifying the markup?

    As @BrendenKehren correctly mentioned, we're trying to keep content neatly structured and platform-agnostic. You'll have a better control over the rendering with no dirty-markup or limitations from our side. The best part is, that the content will stay ready for any potential device/channel you might add in the future. Eventually, we also see that content from RichText will be delivered in JSON format by default with the option to transforming to HTML.

    However, you'd still need to structure content according to your needs, so I'm curious what capabilities is our RTE missing?

    Can't wait to know your opinion.

  • MatthewSwainMatthewSwain Member

    Hi Thomas,

    I totally understand your points and understand that this content could be delivered into numerous platforms not just a website.

    However unless i'm mistaken the RTE currently does add html markup to content I add into it anyway. So for example if I type in some content the output through the Delivery API is returned as

    Some Content

    Now from general points of view when using Kentico, we quite often give clients a WYSIWYG area to add general content into for example on a page. They can add into this anything they want really from links to images etc. that they use the WYSIWYG editor for.

    Now in standard Kentico there are two buttons that are missing from the RTE in Cloud, one is 'View Source' which having re-thought the situation I agree potentially isn't right to give access to this, as you would then have no control over what somebody might put in there, which then as you rightly say could cause an issue when that is then rendered in an app for example.

    However one I do believe would be useful especially where the end target intention is a website or where html is used is the ability for a user to add a wrapping class to a section of text. So this already exists in the Editor used in Kentico as standard (where a normal non tech user can select a piece of text and then apply a separate style to it), these can be configured in the config.js file within the Kentico application.

    Instances where we have used this before:

    • For and script (super and sub scripts)
    • Adding a specific class for styling to a piece of text for different size/colour etc. to standard font
    • Adding a specific class to a specific piece of text for use in Javascript
    • Applying a different class to an image to allow something different to happen

    I understand the need for having clean text presented back for different scenarios, so I wonder if there needs to be an option against the RTE editor to allow you to have more control over HTML or to have it strip out all HTML?

    Thanks,

    Matt

  • MatthewSwainMatthewSwain Member

    This might fall under something else, but again is related to the above post about having more control over the html generated. At the moment when you create a link in the RTE there is no way to specify how the link should open. So if I am linking to an external site I want to open it in a new tab/window. But there is no option to do this. Which means people will then leave my site if I link to an external site.

  • BrendenKehren1BrendenKehren1 Sparta, WIMember, MVP MVP
    edited May 2017

    @MatthewSwain said:
    This might fall under something else, but again is related to the above post about having more control over the html generated. At the moment when you create a link in the RTE there is no way to specify how the link should open. So if I am linking to an external site I want to open it in a new tab/window. But there is no option to do this. Which means people will then leave my site if I link to an external site.

    Matt, this goes directly towards the first answer I posted. Since an < a > tag is not relevant in a desktop application there's no need to have a target attribute. I'd suggest using a straight text element and adding your own HTML if you plan to use the content in a web application of some sort since the use of a WYSIWYG editor isn't an option.

  • MatthewSwainMatthewSwain Member

    Hi @BrendenKehren,

    I understand that an < a > tag is not relevant in a desktop application and again it wouldn't be within an app but it would be within a website.

    So if we can't get a fully functioning WYSIWYG editor within the Kentico cloud content area, then it does mean I would struggle to sell this into a client for a platform to manage their content on for a public facing website. Or is this simply not the intention of Kentico Cloud? I can't expect a client with no knowledge or experience of html to create html and copy into a textbox for a product detail section for example. It simply wouldn't work and they wouldn't do it.

    Are you saying that I shouldn't be using the content generated by Kentico Cloud within a web application of some sort and this is purely designed for applications/desktop applications etc?

    Limiting the end client to the limited set of features currently in the RTE I just don't feel would be sufficient if an option (which surely it is) is to allow the client to edit the content within Kentico Cloud and then output this content to a website of some sort.

    I also tagged this under 'Product Wishlist' - I totally understand there are other priorities i'm sure that the devs are working on and it's not crucial or breaking and i'm not complaining that I don't have the facility now, I am merely trialling Kentico Cloud and seeing how I would be able to sell this to my clients and I think the ability to have a full WYSIWYG editor is something a lot of people will want, even if there is an option for a 'Clean' text editor or in the delivery API for a way to make it 'Clean' when outputting to none html based platforms.

    Thanks,

    Matt

  • JanL@kentico.com[email protected] Czech RepublicMember, Administrator, Kentico Staff admin

    Hi @MatthewSwain , hi @BrendenKehren ,

    I like your thoughts. Just to add my 5 cents to the discussion, I have my idea of how the overall concept of content management could look like. I'd just like to validate my thoughts with you.

    What if Kentico Cloud served as a platform-agnostic content management tool with platform-specific capabilities being added over time? The user could enable various channels (or 'renditions') they wish their content to be distributed over. Like web (through HTML), API (through JSON), or even more specific ones like MVC, React, iOS, Android, UWP, WPF, etc.

    The user would have something similar to a RTE, but instead of presentation-like controls, they would have semantic controls. Instead of a 'bold' button, there would be an 'emphasis' button (similarly to the shift that HTML had gone through in the past).

    Once the user activates a channel, Kentico Cloud Content management service could somehow offer additional user controls to streamline the process of rendering the content in that channel. E.g. the user would enable a 'web' channel. Then, they would be able to mark text as a 'link'. The editor would then display a control to point that link to another content item in the inventory (platform-agnostic). Also, it would display a text box to optionally add a static URL (web-specific). The channel-specific information would then be distributed through the Delivery/Preview API. The developer would still be free to handle that information in their way through our open-source SDKs (as it works today with e.g. the content link resolver).

    Would you like it that way?

  • MatthewSwainMatthewSwain Member

    Hi Jan,

    That sounds like a great solution to me. From a client point of view it would be great for them to be able to edit their content in a single place and then for the developer to be able to choose which version of this content they want to receive through the API. Whether this is through a single field which then returns different friendly content depending on what is requested by the developer (which would be awesome) or whether there would still be the need to create separate fields for the different streams (i.e. Web Description, App Description) with different controls being offered for each field. I don't know if the first one would be possible given the complexity of what could be added but would be pretty cool.

    Thanks,

    Matt

  • JanL@kentico.com[email protected] Czech RepublicMember, Administrator, Kentico Staff admin

    This is a good point Matt! It looks like there would have to be some usability tests being done to work out the best solution.

    Thanks for the suggestion!

Sign In or Register to comment.