Permanently save customization of the zotero.jar (tinyMCE)
I customized some files in the zotero.jar but I have to do it again after each update because I loose all my change (partial update fails each time, maybe because of the edits).
So my question is: is there a way to save this change permanently?
I customized these files:
+ zotero.jar\resource\tinymce\note.html
I added a custom plugin that add keyboard shortcut with e.addShortcut (font color/size, highlight… ) and that create a mouse hover tooltip. I follow this code: https://github.com/Gettyk/TinyMCE-plugin/tree/master/custom_plug
+ zotero.jar\resource\tinymce\css\note-ui.css :
I added new css rules to be able to move the "search and replace pop up" around ex:
.mce-window {
width: 300px; /* xedit was set to : auto !important; */
background: none !important;
position: fixed; /* xedit*/
top: 0; /* xedit*/
right: 0; /* xedit*/
}
+ zotero.jar\resource\tinymce\tinymce.js
I modified the removeformat and the subscript and superscript:
- I added a font-size rule for the subscript and superscript ( I tried to add subscript {font-size: 70%} in extensions.zotero.note.css of about:config but it did not work )
- I added these html tags in "selector" of removeformat: h1, h2, h3, h4, h5, h6 (I don't know how to add it to about:config)
Is there a way to save this change in the profile folder or as an external plugin or any other solution that doesn't require me to rewrite them after each udpdate?
So my question is: is there a way to save this change permanently?
I customized these files:
+ zotero.jar\resource\tinymce\note.html
I added a custom plugin that add keyboard shortcut with e.addShortcut (font color/size, highlight… ) and that create a mouse hover tooltip. I follow this code: https://github.com/Gettyk/TinyMCE-plugin/tree/master/custom_plug
+ zotero.jar\resource\tinymce\css\note-ui.css :
I added new css rules to be able to move the "search and replace pop up" around ex:
.mce-window {
width: 300px; /* xedit was set to : auto !important; */
background: none !important;
position: fixed; /* xedit*/
top: 0; /* xedit*/
right: 0; /* xedit*/
}
+ zotero.jar\resource\tinymce\tinymce.js
I modified the removeformat and the subscript and superscript:
- I added a font-size rule for the subscript and superscript ( I tried to add subscript {font-size: 70%} in extensions.zotero.note.css of about:config but it did not work )
- I added these html tags in "selector" of removeformat: h1, h2, h3, h4, h5, h6 (I don't know how to add it to about:config)
Is there a way to save this change in the profile folder or as an external plugin or any other solution that doesn't require me to rewrite them after each udpdate?
Basically, you'd generate a diff with some additional context lines, and then you'd have a script that unzipped the .jar file, applied the patch, and rezipped it. So when a new release came out, it would just take a second to update it with your changes.
That's not something we can help with, but it would be trivial to set up for someone comfortable with command-line tools.
https://gist.github.com/bwiernik/45f514da37af92491893f2f7212710f9
Here is what I ended up doing : https://pastebin.com/vU8FXiDy
I am so happy, no more struggle with copy/find the code/paste!
I would like to customize the interface's CSS and add custom shortcuts to do things like changing the background color. I haven't been able to find the zotero.jar file, however. And I also don't know how to use/run the python script. Could you perhaps give me some pointers? :)