[CLOSED] Editor support

  1. #1

    [CLOSED] Editor support

    Hi team,
    We are using Ext.Net 4.5 MVC version. We are in need of following features in the HTML Editor. Could you please let us know whether following features are supported or not(or) HTML editor can be extended to support these features or not. We did our investigation and we have no clue. Please let us know if you need any further information as well. Thanks in advance.
    1. Add margins in the editor
    2. Adding new font types beyond the available default fonts
    3. Adding font size
    3. Adding Page lay out
    4. Displaying page logos.

    Thanks,
    Ahmed
    Last edited by fabricio.murta; Feb 01, 2019 at 6:43 PM. Reason: no feedback from the user in 7+ days
  2. #2
    Hello @MOHAMMEDRAFI!

    I will quote your text and add responses to the inquiries right below them.

    Quote Originally Posted by MOHAMMEDRAFI
    Could you please let us know whether following features are supported or not(or) HTML editor can be extended to support these features or not.
    It looks like most of them are not fully supported. I will get to every enumeration you provided but, the Ext.NET components are fully customizable and extensible, be it from server side or client side. Of course, extending a component requires in-depth knowledge of how it works. But that's nevertheless possible and fully supported.

    Quote Originally Posted by MOHAMMEDRAFI
    1. Add margins in the editor
    Not supported. This should be relatively easy -if- what you need is a fixed margin. The interior of the HTMLEditor is but HTML code from an IFRAME HTML block, so that's just a matter of body-margins CSS that could be set up in the template. But as the editable area is, well, editable, the user could just wipe the margin block enclosing the contents (by accident or by purpose).

    You could probably just save the margin value, not use it in the editor but when wrapping the contents for printing.

    Adding a toolbars' textfield might require a more elaborate approach.

    Wouldn't in this case be a feature left for the browser's 'print' dialog? Usually HTML pages can be set-up on the fly to split pages, page size (A4, Letter, Legal), and margins?

    Quote Originally Posted by MOHAMMEDRAFI
    2. Adding new font types beyond the available default fonts
    Well, this is a feature the HTMLEditor does support. If custom font, you should ensure it is available to the page and in a format the browsers support -- sometimes you need to include a font in several formats for this. The setting Ext.form.field.HtmlEditor.fontFamilies. The list of fonts will probably show the way you specify no matter they are present or not; but it would require you to provide names that will match the actual available fonts for them to properly display in the browser.

    Quote Originally Posted by MOHAMMEDRAFI
    3. Adding font size
    This is partially supported as buttons to increase/decrease the font size under Ext.form.field.HtmlEditor.enableFontSize. But I guess you want to extend this to a combo/text field where the font size is entered in pixels. The way the "increase/decrease font size" works relies in HTML font element's size attribute, albeit discouraged by the HTML5 standard.

    The good news is that the initial font size is determined by a properly-styled <span /> element using the font size in pixels. You can see what I'm talking about if you run any of the two examples in Sencha documentation (by clicking the 'run' button), typing some text, increasing/decreasing the font size, and then switching to source view in the component's toolbar (you'd need to click the overflow menu to see the source view button, as all toolbar items won't probably fit the editor's toolbar width).

    Quote Originally Posted by MOHAMMEDRAFI
    3. Adding Page lay out
    This is not supported. I suppose this setting is left for web browsers' "print dialog", I'm not even sure it would be possible to achieve in a web context a page layout unless you build a comprehensive framework over the HTML enclosed in the editor (something like google docs probably do). Keeping in mind that the HTMLEditor relies in just an iframe within it, that will contain the formatted text as HTML.

    Quote Originally Posted by MOHAMMEDRAFI
    4. Displaying page logos.
    This may just be supported. If you just need a default initial template with the figure within, you can probably just use Ext.form.field.HtmlEditor.defaultValue. The setting seems to exist to address a focus issue with the component, but you can use this as a means to add a default text in the extended version -- or just set an initial value/content to the editor component in the page, as you would do with any component.

    But if the logo in the page shouldn't be editable by the user, then I would change the answer to "not supported". You'd have to extend the component to support that.

    Bottom line

    So, if you are planning on extending the component, I believe an important thing to keep in mind is that this a component made to edit an inner IFRAME HTML element; this would help understand limitations and how to find resources about changing specific aspects of the extensions needed.

    Well, hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hello again, @MOHAMMEDRAFI!

    It's been a while since we tried to step you thru the customization of the components, yet we didn't hear back from you. Do you still need help on this inquiry?

    We might be marking this thread as "closed" if you don't post a follow-up in 7+ days from now. This won't lock up the thread though.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. [CLOSED] Dynamically change column editor with row editor plugin
    By drizzie in forum 1.x Legacy Premium Help
    Replies: 3
    Last Post: Apr 04, 2014, 8:37 PM
  2. Replies: 7
    Last Post: Dec 13, 2012, 11:55 AM
  3. Replies: 1
    Last Post: Nov 15, 2011, 5:56 AM
  4. [CLOSED] Keyboard support in navigating Editor Grid Panel
    By jchau in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jun 15, 2009, 4:14 PM

Tags for this Thread

Posting Permissions