2

RichText コントロールを含む xpage を取得します (これは Domino 8.5.3 なので、ck-editor を使用しています)。ユーザーは、RT コンテンツを構造化するためにテーブルを使用することがよくあります。1 つの要求は、これらのテーブルに固有のフォーマット esp があることを確認することです。セル間隔とセルパディングについて。

Firebug を通じて、挿入されたテーブルが html 属性を使用して境界線と cell* パラメータを設定していることがわかります。そしてもちろん、エディタ内の html は「手動」html を使用して作成されているため、xsp エンジンはここで大きな影響を与えることはできません。

これらの属性を削除または操作するためにクライアント側の js を書き始める前に、これを実現する方法をきちんと考えている人がいるかもしれません。

4

1 に答える 1

1

Since the output from the RichText control is, AFAIK, always rendered within a <div> with a class called "domino-richtext" one could use CSS to get that identical appearance you're looking for (at least I think with "unique" you mean identical or uniform).

I pasted an HTML structure below, where the user added some cellspacing and cellpadding:

<div class="domino-richtext xspInputFieldRichText" id="view:_id1:inputRichText1">
  <table cellspacing="1" cellpadding="2" border="1" dir="ltr">
    <tbody>
      <tr>
        <td>Cell 1</td>
        <td>Cell 2</td>
      </tr>
      ...
    </tbody>
  </table>
  <p dir="ltr">Some more content besides the table...</p>
</div>

When the following styles are applied / defined within a theme or stylesheet, all tables, created within the RT control will look the same.

.domino-richtext table {
    border-collapse:collapse; /*remove spacing or padding when defined*/
}

.domino-richtext table tbody tr td,
.domino-richtext table thead tr th {
    padding: 0; /*define / remove padding*/
    border:1px solid #eee; /*border definition for all tables*/
}
于 2012-07-20T12:16:05.993 に答える