MCPcopy Create free account
hub / github.com/diyhi/bbs / CommentComponent

Class CommentComponent

src/main/java/cms/component/topic/CommentComponent.java:26–288  ·  view source on GitHub ↗

评论组件 @author Gao

Source from the content-addressed store, hash-verified

24 *
25 */
26@Component("commentComponent")
27public class CommentComponent {
28 @Resource SettingComponent settingComponent;
29 @Resource CommentRepository commentRepository;
30 @Resource UserCacheManager userCacheManager;
31 @Resource UserRepository userRepository;
32 @Resource CommentCacheManager commentCacheManager;
33 @Resource JsonComponent jsonComponent;
34 /**
35 * 评论编辑器允许使用标签
36 * @return List<String> 类型json格式
37 */
38 public String availableTag(){
39 List<String> tag = new ArrayList<String>();
40 EditorTag editor = settingComponent.readEditorTag();
41 if(editor != null){
42 //标签区域1
43 boolean area_1 = false;
44 //标签区域2
45 boolean area_2 = false;
46 //标签区域3
47 boolean area_3 = false;
48
49 tag.add("source");
50 // tag.add("|");
51 if(editor.isCode()){//代码
52 tag.add("code");
53 area_1 = true;
54 }
55 if(editor.isFontname()){//字体
56 tag.add("fontname");
57 area_1 = true;
58 }
59 if(editor.isFontsize()){//文字大小
60 tag.add("fontsize");
61 area_1 = true;
62 }
63 if(area_1){
64 // tag.add("|");
65 }
66
67 if(editor.isForecolor()){//文字颜色
68 tag.add("forecolor");
69 area_2 = true;
70 }
71 if(editor.isHilitecolor()){//文字背景
72 tag.add("hilitecolor");
73 area_2 = true;
74 }
75 if(editor.isBold()){//粗体
76 tag.add("bold");
77 area_2 = true;
78 }
79 if(editor.isItalic()){//斜体
80 tag.add("italic");
81 area_2 = true;
82 }
83 if(editor.isUnderline()){//下划线

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…