projects
/
roojs1
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f8f2b8f
)
store caption in data-caption
author
Alan
<alan@roojs.com>
Wed, 1 Mar 2023 03:33:54 +0000
(11:33 +0800)
committer
Alan
<alan@roojs.com>
Wed, 1 Mar 2023 03:33:54 +0000
(11:33 +0800)
Roo/htmleditor/BlockFigure.js
patch
|
blob
|
history
diff --git
a/Roo/htmleditor/BlockFigure.js
b/Roo/htmleditor/BlockFigure.js
index
bf0dca8
..
2d8a6e9
100644
(file)
--- a/
Roo/htmleditor/BlockFigure.js
+++ b/
Roo/htmleditor/BlockFigure.js
@@
-322,7
+322,8
@@
Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
var ret = {
tag: 'figure',
'data-block' : 'Figure',
var ret = {
tag: 'figure',
'data-block' : 'Figure',
- 'data-width' : this.width,
+ 'data-width' : this.width,
+ 'data-caption' : this.caption,
contenteditable : 'false',
style : {
contenteditable : 'false',
style : {
@@
-395,6
+396,8
@@
Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
this.image_src = this.getVal(node, 'img', 'src');
this.align = this.getVal(node, 'figure', 'align');
this.image_src = this.getVal(node, 'img', 'src');
this.align = this.getVal(node, 'figure', 'align');
+
+ /// not really used - as hidden captions do not store the content here..
var figcaption = this.getVal(node, 'figcaption', false);
if (figcaption !== '') {
this.caption = this.getVal(figcaption, 'i', 'html');
var figcaption = this.getVal(node, 'figcaption', false);
if (figcaption !== '') {
this.caption = this.getVal(figcaption, 'i', 'html');
@@
-402,6
+405,10
@@
Roo.extend(Roo.htmleditor.BlockFigure, Roo.htmleditor.Block, {
this.caption_display = this.getVal(node, 'figcaption', 'data-display');
this.caption_display = this.getVal(node, 'figcaption', 'data-display');
+ var dc = this.getVal(node, 'figcaption', 'data-caption');
+ if (dc && dc.length) {
+ this.caption = dc;
+ }
//this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
this.width = this.getVal(node, true, 'data-width');
//this.margin = this.getVal(node, 'figure', 'style', 'margin');
//this.text_align = this.getVal(node, 'figcaption', 'style','text-align');
this.width = this.getVal(node, true, 'data-width');
//this.margin = this.getVal(node, 'figure', 'style', 'margin');