Removing the borders from focus-plugin in readonly-mode (draftjs-plugins) - draftjs

I use the alignment plugin from draftjs-plugins, which in turn uses the focus-plugin.
Now, however, in the read mode of the editor (readonly=true), the focus-border is displayed on mouseover.
Is there anything I can do to prevent this?

Related

Disabling Vaadin Errorindicator

I'm using validators on several TextFields, which causes to show a popup next to them. As far as I found out, this is realted to the Vaadin errorindicator.
I now want to disable this popup-message, because it creates unhandy behaviour when it comes to using the application on tablets, e.g. an iPad. I already created a separate label showing the error-message and set the errorindicator to hide using CSS as follows:
.v-errorindicator { display: none; }
The pop up keeps showing anyway. Does anyone know how to disable the popup irrevocable?
Thanks, Hendrik
You should cover the validators with try-catch blocks, in the catch block you can remove the errorstyle with yourTextfield.removeStyleName("v-textfield-error"), also the pop-up won't show.

is it okay to use loadOverlay() in a restartless addon?

Firefox addon. I'm porting an existing addon to a restartless one. I have a panel with a lot of UI elements (mostly boxes/description and images) in it, and it is very convenient for me to define the panel elements in an XUL overlay file. I will have lots of bloated js code if I don't.
The panel element (parent) itself is created in code dynamically, and then I use loadOverlay, wait for the 'merged' event and then append the panel element's children from the overlayed document. I also make sure that the elements are cleaned up upon a remove.
However, using overlays will most probably won't pass an AMO review. And some of the reasons I think are :
In most cases overlay elements will cause problems while removing (eg: toolbar buttons remembering their positions etc.)
There are problems with attaching js/css files in an overlay file.
loadOverlay is buggy (496320, 330458)
And here are my inferences :
loadOverlay() API itself is not deprecated - in fact it is 'not frozen and may change later' - which means possibly it will be use-able in future.
The bug that a second overlay load fails, is not applicable in my case, as I don't initialize without an overlay merge.
Using static overlay for preference windows etc. is perfectly acceptable as of now.
The panel in my case behaves a lot like a preference window (which is brought up on demand and cleaned up upon addon removal)
I don't have any js/css attached to the overlay, nor any event listeners for the elements. The overlay is only used to define boxes and description text - nothing more.
So considering these, is it acceptable to use overlays and loadOverlay() for a restartless addon ? If not, is there an alternative ?
About overlays, by checking source code of restartless addon that extend existing addon (like ehh), I see the overlay.xul is auto merged with the existing addon's. So it shouldn't be a problem to use overlay.

Too many problems on tables in Tinymce?

im working on a CMS it is almost finished
but im struggling serious unfamiliar problems in WYSIWYG editor.
i was first using ckeditor but after experiencing problems with it i switched to tinymce.
some problems are solved but this time someother problems showed up.
problems occuring especially on tables.
1-Anchor element underline removal not working
2-Duplicating Phone numbers
--->might be due to skype phone number converting toolbar
3-too many s how to clean those why even those are there?
4-how to convert
<p>text</p>
back into just
text
because tinymce converting some texts into p element *automatically if it's not the client doing it unknowingly.
*=even though i did that force_paragraph:false setting.
5-As client reports : sometimes cursor turns into loading cursor and wysiwyg editor causes browser to stuck.not even allowing to click links outside of the editor.
6-as i experience sometimes it really does stuck and not allow you to edit anything at all.
here is that problematic page created with tiny_mce and causing lots of errors in process of editing:
Here some answers
2-Duplicating Phone numbers --->might be due to skype phone number converting toolbar
Might be - this cannot ba a tinymce related problem.
3-too many & nbsp;s how to clean those why even those are there?
Browsers will show several spaces (character code 32) as a single one. Thus & nbsp;s are inserted alternating instead of natural spaces.
4-how to convert
text
back into just text
Tinymce is a rte editor and will generate html code. In order to be able to style editor content, the content need to be wrapped inside a block element - eighter ps or divs. You may use server side code to remove tags.
6-as i experience sometimes it really does stuck and not allow you to edit anything at all.
Please describe a bit more in detail - there needs to be a reason for this.

Is it possible to control top & bottom page margins when using UIMarkupTextPrintFormatter?

I'm trying to use the printing stuff in iOS 4.2 to print from my iPhone app, but I'm having real trouble getting multi-page content to display nicely. As you can see in the attached screenshots of PDFs generated through the iOS printing API, UIMarkupTextPrintFormatter really likes to use a painfully small top-margin when rendering.
Additionally, it doesn't seem to try to split block-elements too nicely either ... it's tough to see in the screenshot but the page break actually occurs halfway through a table row, rather than on a border between rows.
I've tried using the CSS #page directives to specify page boundaries, however iOS Webkit doesn't seem to support these at all.
Does anyone know of any techniques, either in HTML or through the iOS SDK to make these top-margins bigger?
I really don't want to write a custom UIPrintPageRenderer class because I'm trying to give my users the ability to customize their printouts through HTML templates ... going with a custom renderer would almost certainly make this impossible (or really difficult).
Any help is much appreciated!
You're on the right track with UIPrintPageRenderer, but fortunately you don't need to write a custom subclass to do this. All you need to do is instantiate a vanilla UIPrintPageRenderer, set the headerHeight and footerHeight properties, and add your HTML formatter to the renderer using addPrintFormatter:startingAtPage:. It only takes a few extra lines of code, I have posted my method here: Print paper size and content inset

How to change background color of GtkTextView?

How to change background color of GtkTextView? I tried with normal widget set bg functionality but gtk is just changing border color of GtkText View.
Plus can some some please explain me with simple example, that how to change Text Color/Font/Text Size in GtkTextView (Whole text in GtkTextView)?
I fond some examples but they are not working..
Thnaks,
PP.
gtk_widget_override_background_color()
This the GTK 3.x+ way (until GTK 3.16). From
https://developer.gnome.org/gtk3/unstable/GtkWidget.html#gtk-widget-modify-base
"gtk_widget_modify_base has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead"
UPDATE: thegtknerd notes that this method too is now deprecated and it has been since 3.16.
gtk_widget_modify_base()
http://library.gnome.org/devel/gtk/unstable/GtkWidget.html#gtk-widget-modify-base
As of gtk3, I believe the proper way to do that is through CSS. Register a gtk style sheet though GtkCssProvider, then you can write this CSS:
textview text {
background-color: #theme_bg_color;
}
We can see the relevant CSS nodes in the documentation for GtkTextView. In this case I put #theme_bg_color which is an adwaita CSS variable, but you can as well put anything that goes in a usual CSS file, like red or #ff0000.