www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit bd8debb2df92da80524be25f7323cf1c9d352a7f
parent ef0d9afe8e96517288b76097fb82e9682a6cb487
Author: Dan Stillman <dstillman@zotero.org>
Date:   Wed,  1 Feb 2017 16:56:01 -0500

Use entity_encoding: 'raw' in notes

This (and some other things) will help avoid changes in uploaded notes, which
cause loss of cursor position and other problems after local notes are updated
with the server version.

A side effect is that multiple spaces won't be converted to `&nbsp;`, so
anything consuming note content will have to use `white-space: pre`.

(Notes in reports appear to be substituting `&nbsp;` as necessary,
though I'm not sure where that's happening.)

Diffstat:
Mresource/tinymce/note.html | 27+++------------------------
1 file changed, 3 insertions(+), 24 deletions(-)

diff --git a/resource/tinymce/note.html b/resource/tinymce/note.html @@ -9,10 +9,10 @@ tinymce.init({ body_id: "zotero-tinymce-note", content_css: "css/note-content.css", - entities: "160,nbsp", - + browser_spellcheck: true, convert_urls: false, + entity_encoding: 'raw', fix_list_elements: true, plugins: "autolink,code,contextmenu,directionality,link,lists,paste,searchreplace", @@ -66,28 +66,7 @@ }); }); }); - }, - - // More restrictive version of default set, with JS/etc. removed - valid_elements: "@[id|class|style|title|dir<ltr?rtl|lang|xml::lang]," - + "a[rel|rev|charset|hreflang|tabindex|accesskey|type|" - + "name|href|target|title|class],strong/b,em/i,strike,u," - + "#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|" - + "src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup," - + "-blockquote[cite],-table[border=0|cellspacing|cellpadding|width|frame|rules|" - + "height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|" - + "height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot," - + "#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor" - + "|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div," - + "-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face" - + "|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite]," - + "object[classid|width|height|codebase|type],param[name|value|_value]," - + "map[name],area[shape|coords|href|alt|target],bdo," - + "button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|" - + "valign|width],dfn,fieldset," - + "kbd,label[for],legend,optgroup[label|disabled],option[disabled|label|selected|value]," - + "q[cite],samp,select[disabled|multiple|name|size],small," - + "textarea[cols|rows|disabled|name|readonly],tt,var,big" + } }); tinymce.execCommand("mceAddEditor", true, "tinymce"); </script>