1. #1
    Ext User
    Join Date
    May 2009
    Posts
    7
    Vote Rating
    0
    jobe451 is on a distinguished road

      0  

    Default Using styles in HTMLEditor

    Using styles in HTMLEditor


    Hi

    I'd like to use the HTMLeditor. However, currently there seem to be features missing which seem to be important to me:
    - The editor does not use the stylesheets of the page in what it is running
    - There is no way to assign a certain style to a selection

    Searching the forum, it seems to me that such features were already implemented for ext itself:
    http://www.extjs.net/forum/showthrea...tor+stylesheet
    http://www.extjs.net/forum/showthrea...Editor+heading

    Are those features also available for gxt?

  2. #2
    Sencha Premium Member dawesi's Avatar
    Join Date
    Mar 2007
    Location
    Melbourne, Australia (aka GMT+10)
    Posts
    1,071
    Vote Rating
    40
    dawesi has a spectacular aura about dawesi has a spectacular aura about

      0  

    Default


    it's a 'basic' editor only at the moment. I'm sure I've seen an example of styles in the editor somewhere on this forum though. There are plugins for mce and fckeditor if you want a more featured editor in ext.
    Senior Technical Training & Mentoring

    Teahouse Training Company
    Asia Pacific Region (Official Certified Sencha Trainer)

    Check out SenchaWorld.com - The best bits from the Sencha community (videos, blogs, etc)

    Code Validation : JSLint | JSONLint | JSONPLint

  3. #3
    Ext User
    Join Date
    May 2009
    Posts
    7
    Vote Rating
    0
    jobe451 is on a distinguished road

      0  

    Default


    I finally found an answer to my problems:

    There are a few free open source rich text editors which can be used. Here an example how to integrate tinyMCE in GWT.
    http://consult.goannatravel.com/blog...inymce-widget/

    Seems to be a full featured and highly customizable solution.

  4. #4
    Ext JS Premium Member
    Join Date
    Dec 2008
    Posts
    38
    Vote Rating
    0
    sthamman is on a distinguished road

      0  

    Thumbs up


    In case if anyone what's to add style sheets to HtmlEditor... here is the code...

    Code:
    new HtmlEditor(){
    	@Override
    	public void setRawValue(String value) {
    		super.setRawValue(value);
    		Timer t = new Timer() {
    			@Override
    			public void run() {
    				Document d = IFrameElement.as(
    						getElement().getElementsByTagName("iframe").getItem(0))
    						.getContentDocument();
    				LinkElement style = d.createLinkElement();
    				style.setType("text/css");
    				style.setHref("gxt/css/gxt-all.css");
    				style.setRel("stylesheet");
    				Element elt = (Element) d.getElementsByTagName("head").getItem(
    						0);
    				HeadElement head = HeadElement.as(elt);
    				head.insertFirst(style);
    			}
    		};
    		t.schedule(500);
    	}
    }

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar