Is there a way to reuse the built-in HTML editor in Cofoundry - cofoundry

I would like to embed Cofoundry's built-in administration interface visual editor in other custom non-admin pages. The idea is not to use any of the fancy attributes like [HTML], but rather be able to load the editor using low level JavaScript and HTML instead of installing yet another editor myself and use that.
I suppose it is a standard HTML editor, so given the URLs for it in Cofoundry, I assume it would be possible to use the editor's own standard documentation for embedding the editor.
So, question, which editor is it - and what are the built-in URLs (paths) to it's components?

As of v0.9 Cofoundry uses TinyMCE as the HTML editor. You'd be better off using your own build of the editor than linking to the Cofoundry source as it's liable to change.

Related

Emmet-Atom custom snippet for CSS module

I'm using CSS modules with ReactJs (jsx). Is there a way to create a custom snippet within Emmet or Atom to use CSS modules instead of regular classes?
Example, currently Emmet works as follows:
.title expands to <div className="title"></div>
I want to be able to create a snippet similar to:
.styles-title expands to <div className={styles.title}></div>
This actually turned out to be rather tricky. Emmet and the Atom extension both allow for customization, but a security policy in Atom does not allow loading custom filters from outside the extension.
With some nudging in the right direction (see the GitHub issue linked above) I was able to write my own Atom extension that does this.

overriding styles defined on production server for DITA XML files

Here is scenario I am working in.
Using Eclipse with IXIASoft DITA CMS and Oxygen XML editor.
Retrieve files stored in DITA CMS and edit in oxygen.
Generate pdf output. PDF creation is controlled by antennae house libraries on a production server and I do not have access to xsl stylesheets or css files on production server.
I tried embedding styles in dita file, but it appears that files on production server override whatever I do. Tried linking to local css file, but it too seems to be overridden.
Also limited by what is allowed in the custom DTD. Did find an outputclass attribute for the p element, but not sure how to use it. Any suggestions.
The PDF output generated via the DITA Open Toolkit (used also by Ixiasoft) is not related in any way to CSS styling. The DITA content gets translated to an XSL-FO format which then gets processed to PDF using a PDF processor like the default Apache FOP.
So you need access to the XSLT code on the server side in order to provide any PDF customization.
Usually a PDF customization without directly modifying the XSLT code from the DITA OT is done like this:
http://www.oxygenxml.com/doc/ug-oxygen/#topics/dita_pdf_output_customization.html
Regards,
Radu
If you cannot add a plugin to the DITA-OT image on the server, you're actually out of luck for changing the PDF output. If, however, you can create a plugin for the DITA-OT image used by Ixiasoft, and can run the ant integrator on that image, then you should be able to change those styles.
Keep in mind that overriding PDF is not for the faint of heart and if you have no experience with XSLT and XSL-FO, I suggest you get a consultant to help you.
Julio J. Vazquez
Write Spirit

To add a Java script file in a customize feature in drupal

i have create a customize feature in open atrium. now i have to implement the a javascript file like mindmap in that customise feature. how can this possible to add in the open atrium feature.
i have completed the feature using the book module of the open atrium. Now i have to change only the text area in to mindmap.how can it implemented in the feature.plz help me.
You are using the open atrium custom feature and want add a js file then you can follow the build a feature link https://community.openatrium.com/documentation-en/node/449
and then read the drupal_add_js function in the link http://drupal.org/node/304255.
You want to use drupal_add_js() in a custom module or theme depending on what you are making. If it is a one off site just add it to your theme. If youre trying to fix the moduel add it directly to the upstream module. If youre augmenting the module for your own purposes add it to a new helper module so that you can upgrade that module in the future without concerns of losig your work.
http://api.drupal.org/api/drupal/includes%21common.inc/function/drupal_add_js/6

Unable to hide Products.Carousel.viewlet in version 1.1

Products,Carousel adds a viewlet to the plone.contentviews manager using some funky inline code in setuphandlers. I am trying to hide this viewlet. I have tried various techniques such as:
overriding the template in my configure.zcml
using the <hidden> tag in my viewlets.xml
But nothing seems to take effect. However if I go into ##manage-viewlets, I am able to hide it by hand.
How can i do this automatically on startup?
Not very elegant, but you could override the viewlet template using z3c.jbot if you're really desperate. Just provide an empty template called Products.Carousel.browser.viewlet.pt in your z3c.jbot templates folder, inside your custom product.

How to create a QT plugin that customizes UI?

We would want the users to be able to optionally customize our QT applications. So if they would want to create their own theme for our applications, all they have to do is load their own CSS file.
Do we really need to create a plugin to be able to do that? If yes, could somebody give me the basic steps/ or a jump start on how to do it? If no, are there features in QT that I need to know to be able to do that without creating a plugin?
I have a Jabber instant messenger which is plugin based and written in Qt. It includes a style plugin that does exactly what you describe. The source for that plugin is here:
https://github.com/sje397/saje/tree/master/plugins/styles/
(Note: this is a plugin for my application - not a 'Qt style plugin')
Basically all you need to do is load a style sheet and call QApplication::setStyleSheet:
QFile f("filename");
if(f.open(QIODevice::ReadOnly)) {
qApp->setStyleSheet(f.readAll());
}
An example of a valid style sheet is here. Note that it is for my app, so includes some of my own class names etc.

Resources