is there a way to force the GWT's RichTextEditor to use custom stylesheet for the edited text?
From what i have seen, it uses an iframe to render the text, so the host documen's styles are ignored.
That's currently not possible (there's an open issue about it).
As a workaround you could manually add your style definitions to the head element of the iframe document. See here for an example.
Related
I am using TinyMCE version 4.
I also have a couple of html templates defined in my web project.
Now, I would like to make those templates draggable within textarea, so I would like to keep the style of the template and be able to move drag-and-drop/move it.
Does anybody know if it is achievable by using TinyMCE component?
Under the Google charts visualization, there is an "allowHTML" option that allows for placing HTML tags inside annotation descriptions. Is there something similar in Dygraphs where the annotation allows an HREF tag that allows the user to link to another web page?
For example, a stock chart shows a split on a specific date. The annotation, on click, would bring up the press release announcing the split. The description field would be in HTML and include the appropriate HREF anchor to the press release.
It is my understanding that dygraphs doesn't support HTML annotations. However, I think it should be pretty easy to provide this type of functionality by using an additional tooltip library.
Dygraphs relies on the title attribute for the annotations. That is, when you hover over the annotation, the tooltip content is populated from the title attribute on the div. As an aside, you could presumably change which attribute it uses quite easily by editing the dygraph annotation source code. If you use a more comprehensive tooltip library (there are loads of jQuery tooltip libraries out there supporting HTML content), it will supercede the basic browser tooltip that dygraphs uses.
For a basic tooltip library that does the job, you could consider:
http://api.jqueryui.com/tooltip/#option-content
or
http://qtip2.com/plugins#ajax
I know I can link a style sheet to TinyMCE and this will be used when I am editing. It also seems to apply the styling to the Heading options available in the format dropdown list which is great. I also know I can add custom formats menu using custom_formats (here) but is there a way for the Formats to be populated using my CSS automatically? I have various classes in my CSS for the P tag and would like to allow my users to utilise them.
No, this is not possible (at least not out of the box).
How could a piece of code guess what style or class to use from the pure CSS?
I am having some trouble styling filepicker.io widgets for web, specifically filepicker-dragdrop.
Is there any way to disable the inline styling and replace them with classes?
Something like data-fp-disable-styles or perhaps when using data-fp-dropzone-class="..." the inline styling is automatically disabled.
Although you can add classes to the button with the attribute data-fp-button-class, I cannot get rid of the inline styling on the on the dropzone and container div.
You can set the data-fp-drag-class and data-fp-class options to set the styling of the dropzone and container div and use the !important flag for any styles that you want to use to override the inline styles.
If you're looking for a more fully customizable solution, we'd recommend using the raw javascript api's to create your own drag pane (https://developers.filepicker.io/docs/web/#widgets-droppane) and/or pick button
I have an app in GWT that provides lots of little paragraphs and let's the user edit them. Right now I just have a view mode, just an HTML paragraph, and an edit mode, for which I use a standard HTML TextArea.
Is there a fluid GWT paragraph editing widget that does not require using a TextArea or switching between modes? Note that I do not need a rich text widget as I don't want bold, italic, bullet points, etc.
I would be willing to use a jQuery or other JavaScript library solution as long as it was really robust and cleanly separated from everything else I'm doing. I don't want to babysit/hack on JavaScript.
Somehow I think this problem is hard, as Google Docs doesn't do it well and even stackoverflow has me using a very TextArea-like box to edit text that is later displayed as an HTML paragraph.
I would use HTML ContentEditable. http://html5demos.com/contenteditable/
<div contenteditable="true">
</div>
You can use a JS framework to bind to changes. I have noticed issues with the JS 'change' event, but the 'blur' event works well.