简体   繁体   English

SharePoint加载项用户可以更改Web部件的颜色

[英]SharePoint Add-in user can change color of web part

I have made a application for SharePoint online and want the users to be able to customize every element like the background color font color etc. I would like to have a color pallet that the user can pick from like this: 我已经为SharePoint在线制作了一个应用程序,希望用户能够自定义每个元素,例如背景色,字体颜色等。我希望有一个供用户选择的色板,如下所示:

在此处输入图片说明

I know SharePoint have its limitations but is this possible to accomplish? 我知道SharePoint有其局限性,但这有可能实现吗? I want it to be under the Edit web part options. 我希望它位于“编辑Web部件”选项下。

There is a jscolor library which allow user select color, while you may need store the value with proper policy so you could use it in future(Or store in a SharePoint list). 有一个jscolor库,允许用户选择颜色,而您可能需要使用适当的策略存储值,以便将来使用(或存储在SharePoint列表中)。 localStorage, sessionStorage, session and cookies localStorage,sessionStorage,会话和cookie

Then, set element CSS by jQuery . 然后,通过jQuery设置元素CSS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM